[ 
https://issues.apache.org/jira/browse/HDDS-438?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16613083#comment-16613083
 ] 

Dinesh Chitlangia edited comment on HDDS-438 at 9/13/18 6:38 AM:
-----------------------------------------------------------------

[~anu] I have made changes to GenericCLI thereby fixing 'ozone scmcli' and 
'ozone oz' scenarios. Also added integration test to check for various 
incomplete combinations for 'ozone oz'.

Attached patch 001 for your review.

 
{noformat}
mypc:bin dchitlangia$ ./ozone oz
Incomplete command
Usage: ozone oz [-hV] [--verbose] [-D=<String=String>]... [COMMAND]
Client for the Ozone object store
--verbose More verbose output. Show the stack trace of the errors.
-D, --set=<String=String>

-h, --help Show this help message and exit.
-V, --version Print version information and exit.
Commands:
volume, vol Volume specific operations
bucket Bucket specific operations
key Key specific operations

mypc:bin dchitlangia$ ./ozone oz ovl
Unmatched argument: ovl
Usage: ozone oz [-hV] [--verbose] [-D=<String=String>]... [COMMAND]
Client for the Ozone object store
--verbose More verbose output. Show the stack trace of the errors.
-D, --set=<String=String>

-h, --help Show this help message and exit.
-V, --version Print version information and exit.
Commands:
volume, vol Volume specific operations
bucket Bucket specific operations
key Key specific operations

mypc:bin dchitlangia$ ./ozone oz vol
Incomplete command
Usage: ozone oz volume [-hV] [COMMAND]
Volume specific operations
-h, --help Show this help message and exit.
-V, --version Print version information and exit.
Commands:
info returns information about a specific volume
list List the volumes of a given user
create Creates a volume for the specified user
update Updates parameter of the volumes
delete deletes a volume if it is empty

mypc:bin dchitlangia$ ./ozone oz bucket
Incomplete command
Usage: ozone oz bucket [-hV] [COMMAND]
Bucket specific operations
-h, --help Show this help message and exit.
-V, --version Print version information and exit.
Commands:
info returns information about a bucket
list lists the buckets in a volume.
create creates a bucket in a given volume
update allows changing bucket attributes
delete deletes an empty bucket

mypc:bin dchitlangia$ ./ozone oz key
Incomplete command
Usage: ozone oz key [-hV] [COMMAND]
Key specific operations
-h, --help Show this help message and exit.
-V, --version Print version information and exit.
Commands:
info returns information about an existing key
list list all keys in a given bucket
get Gets a specific key from ozone server
put creates or overwrites an existing key
delete deletes an existing key

mypc:bin dchitlangia$ ./ozone scmcli
Incomplete command
Usage: ozone scmcli [-hV] [--verbose] [--scm=<scm>] [-D=<String=String>]...
[COMMAND]
Developer tools to handle SCM specific operations.
--scm=<scm> The destination scm (host:port)
--verbose More verbose output. Show the stack trace of the errors.
-D, --set=<String=String>

-h, --help Show this help message and exit.
-V, --version Print version information and exit.
Commands:
list List containers
info Show information about a specific container
delete Delete container
create Create container
close close container

mypc:bin dchitlangia$ ./ozone scmcli list
Missing required option '--start=<startId>'
Usage: ozone scmcli list [-hV] [-c=<count>] -s=<startId>
List containers
-c, --count=<count> Maximum number of containers to list
Default: 20
-h, --help Show this help message and exit.
-s, --start=<startId> Container id to start the iteration
-V, --version Print version information and exit.


{noformat}


was (Author: dineshchitlangia):
[~anu] I have made changes to GenericCLI thereby fixing 'ozone scmcli' and 
'ozone oz' scenarios. Also added integration test to check for various 
incomplete combinations for 'ozone oz'.

Attached patch 001 for your review.

> 'ozone oz' should print usage when command or sub-command is missing
> --------------------------------------------------------------------
>
>                 Key: HDDS-438
>                 URL: https://issues.apache.org/jira/browse/HDDS-438
>             Project: Hadoop Distributed Data Store
>          Issue Type: Improvement
>          Components: Tools
>            Reporter: Arpit Agarwal
>            Assignee: Dinesh Chitlangia
>            Priority: Major
>              Labels: newbie
>         Attachments: HDDS-438.001.patch
>
>
> When invoked without the command or sub-command, _ozone oz_ prints the 
> following error:
> {code:java}
> $ ozone oz
> Please select a subcommand
> {code}
> and
> {code:java}
> $ ozone oz volume
> Please select a subcommand
> {code}
> For most familiar with Unix utilities it is obvious they should rerun the 
> command with _--help._ However we can just print the usage instead to avoid 
> guesswork



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to