-
Notifications
You must be signed in to change notification settings - Fork 2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Refactor fs subcommands into fs command #1150
Conversation
Refactors `nomad fs` command to eliminate `fs` subcommands. Automatically displays the file, if the path specified is a file; lists the directory if the path is a directory; or displays stat information if the `-stat` flag is set. Currently running `nomad fs ls` to find a file, then running the exact same command with the exception of `cat` instead of `ls` is time consuming and awkward. This allows operational testing to be greatly enhanced, and makes our lives so much better.
@grubernaut Can you also please update the docs for this change? |
@diptanu done! |
) | ||
|
||
type FSCommand struct { | ||
Meta | ||
} | ||
|
||
func (f *FSCommand) Help() string { | ||
return "This command is accessed by using one of the subcommands below." | ||
helpText := ` | ||
Usage: nomad fs <alloc-id> <path> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Fix indents to be in-line with the rest of the commands
LGTM |
@dadgar PTAL |
use this for volume names in drivers/rkt to address #1150
I'm going to lock this pull request because it has been closed for 120 days ⏳. This helps our maintainers find and focus on the active contributions. |
Refactors
nomad fs
command to eliminatefs
subcommands.Automatically displays the file, if the path specified is a file; lists
the directory if the path is a directory; or displays stat information
if the
-stat
flag is set.Currently running
nomad fs ls
to find a file, then running the exactsame command with the exception of
cat
instead ofls
is timeconsuming and awkward. This allows operational testing to be greatly
enhanced, and makes our lives so much better.