feat: add ochami rcs XXX subcommands#96
Conversation
3f6206f to
81316a7
Compare
|
@synackd Do you know what is up with the CI here? |
|
Looks like something with Chainguard. I reran the job and it completed fine. Thanks for this change @cjh1! Got some fixes I'm trying to get in as well as metadata-service stuff for the new release PR, but I will take a look at this when I can. |
Thanks, I figured it was probably something transient, but didn't have the power to rerun the job.
No rush, thanks |
synackd
left a comment
There was a problem hiding this comment.
Haven't tested just yet, but am requesting some small code/docs changes in the meantime. Also, there have been some features that have been merged in that have modified go.mod. Can you rebase, resolve the conflicts, and go mod tidy?
|
|
||
| # SYNOPSIS | ||
|
|
||
| ochami rcs [OPTIONS] COMMAND |
There was a problem hiding this comment.
With some of the recent changes, we've changed this to be a bit more descriptive by having the generic form at the top, followed by a blank line, followed by the specific command syntax. Can we adapt that form for rcs as well? See:
Lines 9 to 18 in bd364da
ochami/man/ochami-metadata.1.sc
Lines 9 to 18 in bd364da
There was a problem hiding this comment.
E.g:
*ochami rcs* [_global-options_] _command_ [_command-options_] [_arguments_]
*ochami rcs console list* [-F _format_]++
*ochami rcs console show* [-F _format_] [--follow] [--lines _n_] _nodeID_++
*ochami rcs console connect* _nodeID_++
*ochami rcs service status* [-F _format_]
There was a problem hiding this comment.
Whoops, my bad... I put list before connect in my comment above. Can you reorder so it's:
*ochami rcs* [_global-options_] _command_ [_command-options_] [_arguments_]
*ochami rcs console connect* _nodeID_++
*ochami rcs console list* [-F _format_]++
*ochami rcs console show* [-F _format_] [--follow] [--lines _n_] _nodeID_++
*ochami rcs service status* [-F _format_]
a932d40 to
a8a5d3a
Compare
Signed-off-by: Chris Harris <cjh@lbl.gov>
synackd
left a comment
There was a problem hiding this comment.
I've tested this using the development docker-compose file and it appears to work fine. Just have a couple small comments to resolve and we can merge this.
| *show* [-F _format_] [--follow] [--lines _n_] _nodeID_ | ||
| Show console output for the specified node. | ||
|
|
||
| This command accepts the following options: | ||
|
|
||
| *-F, --format-output* _format_ | ||
| Output response data in specified _format_. Supported values are: | ||
|
|
||
| - _json_ (default) | ||
| - _json-pretty_ | ||
| - _yaml_ | ||
|
|
||
| *-f, --follow* | ||
| Follow the console output in real-time. | ||
|
|
||
| *--lines* _n_ | ||
| Number of lines to show from history. Defaults to 100. | ||
|
|
||
| *nodeID* | ||
| Node ID of the console to show. | ||
|
|
||
| *connect* _nodeID_ | ||
| Start an interactive session with the console of the specified node. | ||
|
|
||
| *nodeID* | ||
| Node ID of the console to connect to. |
There was a problem hiding this comment.
I think there might have been confusion from my comment. These two commands, (connect and show), should be under the console command, in that order.
Checklist
make test(or equivalent) locally and all tests passgit commit -s) with my real name and email<filename>.licensesidecarLICENSES/directoryDescription
This adds subcommands to access the remote console service:
ochami rcs service status- Return the status of the service.ochami rcs console list- List the currently active consoles.ochami rcs console show <xname>- Show the console output for a particular console.ochami rcs console connect <xname>- Will connect you to an interactive console session.The best way to try this out is to use the dev docker-compose env in remote-console, which will setup an environment with a mock console. This can be brought up using:
You can then update you config with the folllowing:
Then you should be able run for example:
Fixes #72
Type of Change
For more info, see Contributing Guidelines.