HDDS-469. Rename 'ozone oz' to 'ozone sh'. Contributed by Arpit Agarwal.

This commit is contained in:
Arpit Agarwal 2018-09-15 22:12:47 -07:00
parent f0b87e3d29
commit 259d6e81e2
7 changed files with 62 additions and 62 deletions

View File

@ -48,39 +48,39 @@ RpcClient without scheme
*** Keywords *** *** Keywords ***
Test ozone shell Test ozone shell
[arguments] ${protocol} ${server} ${volume} [arguments] ${protocol} ${server} ${volume}
${result} = Execute on datanode ozone oz volume create ${protocol}${server}/${volume} --user bilbo --quota 100TB --root ${result} = Execute on datanode ozone sh volume create ${protocol}${server}/${volume} --user bilbo --quota 100TB --root
Should not contain ${result} Failed Should not contain ${result} Failed
Should contain ${result} Creating Volume: ${volume} Should contain ${result} Creating Volume: ${volume}
${result} = Execute on datanode ozone oz volume list ${protocol}${server}/ --user bilbo | grep -Ev 'Removed|WARN|DEBUG|ERROR|INFO|TRACE' | jq -r '.[] | select(.volumeName=="${volume}")' ${result} = Execute on datanode ozone sh volume list ${protocol}${server}/ --user bilbo | grep -Ev 'Removed|WARN|DEBUG|ERROR|INFO|TRACE' | jq -r '.[] | select(.volumeName=="${volume}")'
Should contain ${result} createdOn Should contain ${result} createdOn
${result} = Execute on datanode ozone oz volume list --user bilbo | grep -Ev 'Removed|DEBUG|ERROR|INFO|TRACE|WARN' | jq -r '.[] | select(.volumeName=="${volume}")' ${result} = Execute on datanode ozone sh volume list --user bilbo | grep -Ev 'Removed|DEBUG|ERROR|INFO|TRACE|WARN' | jq -r '.[] | select(.volumeName=="${volume}")'
Should contain ${result} createdOn Should contain ${result} createdOn
Execute on datanode ozone oz volume update ${protocol}${server}/${volume} --user bill --quota 10TB Execute on datanode ozone sh volume update ${protocol}${server}/${volume} --user bill --quota 10TB
${result} = Execute on datanode ozone oz volume info ${protocol}${server}/${volume} | grep -Ev 'Removed|WARN|DEBUG|ERROR|INFO|TRACE' | jq -r '. | select(.volumeName=="${volume}") | .owner | .name' ${result} = Execute on datanode ozone sh volume info ${protocol}${server}/${volume} | grep -Ev 'Removed|WARN|DEBUG|ERROR|INFO|TRACE' | jq -r '. | select(.volumeName=="${volume}") | .owner | .name'
Should Be Equal ${result} bill Should Be Equal ${result} bill
${result} = Execute on datanode ozone oz volume info ${protocol}${server}/${volume} | grep -Ev 'Removed|WARN|DEBUG|ERROR|INFO|TRACE' | jq -r '. | select(.volumeName=="${volume}") | .quota | .size' ${result} = Execute on datanode ozone sh volume info ${protocol}${server}/${volume} | grep -Ev 'Removed|WARN|DEBUG|ERROR|INFO|TRACE' | jq -r '. | select(.volumeName=="${volume}") | .quota | .size'
Should Be Equal ${result} 10 Should Be Equal ${result} 10
Execute on datanode ozone oz bucket create ${protocol}${server}/${volume}/bb1 Execute on datanode ozone sh bucket create ${protocol}${server}/${volume}/bb1
${result} = Execute on datanode ozone oz bucket info ${protocol}${server}/${volume}/bb1 | grep -Ev 'Removed|WARN|DEBUG|ERROR|INFO|TRACE' | jq -r '. | select(.bucketName=="bb1") | .storageType' ${result} = Execute on datanode ozone sh bucket info ${protocol}${server}/${volume}/bb1 | grep -Ev 'Removed|WARN|DEBUG|ERROR|INFO|TRACE' | jq -r '. | select(.bucketName=="bb1") | .storageType'
Should Be Equal ${result} DISK Should Be Equal ${result} DISK
${result} = Execute on datanode ozone oz bucket update ${protocol}${server}/${volume}/bb1 --addAcl user:frodo:rw,group:samwise:r | grep -Ev 'Removed|WARN|DEBUG|ERROR|INFO|TRACE' | jq -r '. | select(.bucketName=="bb1") | .acls | .[] | select(.name=="samwise") | .type' ${result} = Execute on datanode ozone sh bucket update ${protocol}${server}/${volume}/bb1 --addAcl user:frodo:rw,group:samwise:r | grep -Ev 'Removed|WARN|DEBUG|ERROR|INFO|TRACE' | jq -r '. | select(.bucketName=="bb1") | .acls | .[] | select(.name=="samwise") | .type'
Should Be Equal ${result} GROUP Should Be Equal ${result} GROUP
${result} = Execute on datanode ozone oz bucket update ${protocol}${server}/${volume}/bb1 --removeAcl group:samwise:r | grep -Ev 'Removed|WARN|DEBUG|ERROR|INFO|TRACE' | jq -r '. | select(.bucketName=="bb1") | .acls | .[] | select(.name=="frodo") | .type' ${result} = Execute on datanode ozone sh bucket update ${protocol}${server}/${volume}/bb1 --removeAcl group:samwise:r | grep -Ev 'Removed|WARN|DEBUG|ERROR|INFO|TRACE' | jq -r '. | select(.bucketName=="bb1") | .acls | .[] | select(.name=="frodo") | .type'
Should Be Equal ${result} USER Should Be Equal ${result} USER
${result} = Execute on datanode ozone oz bucket list ${protocol}${server}/${volume}/ | grep -Ev 'Removed|WARN|DEBUG|ERROR|INFO|TRACE' | jq -r '.[] | select(.bucketName=="bb1") | .volumeName' ${result} = Execute on datanode ozone sh bucket list ${protocol}${server}/${volume}/ | grep -Ev 'Removed|WARN|DEBUG|ERROR|INFO|TRACE' | jq -r '.[] | select(.bucketName=="bb1") | .volumeName'
Should Be Equal ${result} ${volume} Should Be Equal ${result} ${volume}
Run Keyword Test key handling ${protocol} ${server} ${volume} Run Keyword Test key handling ${protocol} ${server} ${volume}
Execute on datanode ozone oz bucket delete ${protocol}${server}/${volume}/bb1 Execute on datanode ozone sh bucket delete ${protocol}${server}/${volume}/bb1
Execute on datanode ozone oz volume delete ${protocol}${server}/${volume} --user bilbo Execute on datanode ozone sh volume delete ${protocol}${server}/${volume} --user bilbo
Test key handling Test key handling
[arguments] ${protocol} ${server} ${volume} [arguments] ${protocol} ${server} ${volume}
Execute on datanode ozone oz key put ${protocol}${server}/${volume}/bb1/key1 NOTICE.txt Execute on datanode ozone sh key put ${protocol}${server}/${volume}/bb1/key1 NOTICE.txt
Execute on datanode rm -f NOTICE.txt.1 Execute on datanode rm -f NOTICE.txt.1
Execute on datanode ozone oz key get ${protocol}${server}/${volume}/bb1/key1 NOTICE.txt.1 Execute on datanode ozone sh key get ${protocol}${server}/${volume}/bb1/key1 NOTICE.txt.1
Execute on datanode ls -l NOTICE.txt.1 Execute on datanode ls -l NOTICE.txt.1
${result} = Execute on datanode ozone oz key info ${protocol}${server}/${volume}/bb1/key1 | grep -Ev 'Removed|WARN|DEBUG|ERROR|INFO|TRACE' | jq -r '. | select(.keyName=="key1")' ${result} = Execute on datanode ozone sh key info ${protocol}${server}/${volume}/bb1/key1 | grep -Ev 'Removed|WARN|DEBUG|ERROR|INFO|TRACE' | jq -r '. | select(.keyName=="key1")'
Should contain ${result} createdOn Should contain ${result} createdOn
${result} = Execute on datanode ozone oz key list ${protocol}${server}/${volume}/bb1 | grep -Ev 'Removed|WARN|DEBUG|ERROR|INFO|TRACE' | jq -r '.[] | select(.keyName=="key1") | .keyName' ${result} = Execute on datanode ozone sh key list ${protocol}${server}/${volume}/bb1 | grep -Ev 'Removed|WARN|DEBUG|ERROR|INFO|TRACE' | jq -r '.[] | select(.keyName=="key1") | .keyName'
Should Be Equal ${result} key1 Should Be Equal ${result} key1
Execute on datanode ozone oz key delete ${protocol}${server}/${volume}/bb1/key1 Execute on datanode ozone sh key delete ${protocol}${server}/${volume}/bb1/key1

View File

@ -27,13 +27,13 @@ ${PROJECTDIR} ${CURDIR}/../../../../../..
*** Test Cases *** *** Test Cases ***
Create volume and bucket Create volume and bucket
Execute on datanode ozone oz volume create http://ozoneManager/fstest --user bilbo --quota 100TB --root Execute on datanode ozone sh volume create http://ozoneManager/fstest --user bilbo --quota 100TB --root
Execute on datanode ozone oz bucket create http://ozoneManager/fstest/bucket1 Execute on datanode ozone sh bucket create http://ozoneManager/fstest/bucket1
Check volume from ozonefs Check volume from ozonefs
${result} = Execute on datanode ozone fs -ls o3://bucket1.fstest/ ${result} = Execute on datanode ozone fs -ls o3://bucket1.fstest/
Create directory from ozonefs Create directory from ozonefs
Execute on datanode ozone fs -mkdir -p o3://bucket1.fstest/testdir/deep Execute on datanode ozone fs -mkdir -p o3://bucket1.fstest/testdir/deep
${result} = Execute on ozoneManager ozone oz key list o3://ozoneManager/fstest/bucket1 | grep -v WARN | jq -r '.[].keyName' ${result} = Execute on ozoneManager ozone sh key list o3://ozoneManager/fstest/bucket1 | grep -v WARN | jq -r '.[].keyName'
Should contain ${result} testdir/deep Should contain ${result} testdir/deep

View File

@ -27,23 +27,23 @@ ${PROJECTDIR} ${CURDIR}/../../../../../..
*** Test Cases *** *** Test Cases ***
Create volume and bucket Create volume and bucket
Execute on datanode ozone oz -createVolume http://ozoneManager/fstest -user bilbo -quota 100TB -root Execute on datanode ozone sh -createVolume http://ozoneManager/fstest -user bilbo -quota 100TB -root
Execute on datanode ozone oz -createBucket http://ozoneManager/fstest/bucket1 Execute on datanode ozone sh -createBucket http://ozoneManager/fstest/bucket1
Check volume from ozonefs Check volume from ozonefs
${result} = Execute on datanode ozone fs -ls o3://bucket1.fstest/ ${result} = Execute on datanode ozone fs -ls o3://bucket1.fstest/
Create directory from ozonefs Create directory from ozonefs
Execute on datanode ozone fs -mkdir -p o3://bucket1.fstest/testdir/deep Execute on datanode ozone fs -mkdir -p o3://bucket1.fstest/testdir/deep
${result} = Execute on ozoneManager ozone oz -listKey o3://ozoneManager/fstest/bucket1 | grep -v WARN | jq -r '.[].keyName' ${result} = Execute on ozoneManager ozone sh -listKey o3://ozoneManager/fstest/bucket1 | grep -v WARN | jq -r '.[].keyName'
Should contain ${result} testdir/deep Should contain ${result} testdir/deep
Test key handling Test key handling
Execute on datanode ozone oz -putKey o3://ozoneManager/fstest/bucket1/key1 -file NOTICE.txt -replicationFactor 1 Execute on datanode ozone sh -putKey o3://ozoneManager/fstest/bucket1/key1 -file NOTICE.txt -replicationFactor 1
Execute on datanode rm -f NOTICE.txt.1 Execute on datanode rm -f NOTICE.txt.1
Execute on datanode ozone oz -getKey o3://ozoneManager/fstest/bucket1/key1 -file NOTICE.txt.1 Execute on datanode ozone sh -getKey o3://ozoneManager/fstest/bucket1/key1 -file NOTICE.txt.1
Execute on datanode ls -l NOTICE.txt.1 Execute on datanode ls -l NOTICE.txt.1
${result} = Execute on datanode ozone oz -infoKey o3://ozoneManager/fstest/bucket1/key1 | grep -Ev 'Removed|WARN|DEBUG|ERROR|INFO|TRACE' | jq -r '. | select(.keyName=="key1")' ${result} = Execute on datanode ozone sh -infoKey o3://ozoneManager/fstest/bucket1/key1 | grep -Ev 'Removed|WARN|DEBUG|ERROR|INFO|TRACE' | jq -r '. | select(.keyName=="key1")'
Should contain ${result} createdOn Should contain ${result} createdOn
${result} = Execute on datanode ozone oz -listKey o3://ozoneManager/fstest/bucket1 | grep -Ev 'Removed|WARN|DEBUG|ERROR|INFO|TRACE' | jq -r '.[] | select(.keyName=="key1") | .keyName' ${result} = Execute on datanode ozone sh -listKey o3://ozoneManager/fstest/bucket1 | grep -Ev 'Removed|WARN|DEBUG|ERROR|INFO|TRACE' | jq -r '.[] | select(.keyName=="key1") | .keyName'
Should Be Equal ${result} key1 Should Be Equal ${result} key1
Execute on datanode ozone oz -deleteKey o3://ozoneManager/fstest/bucket1/key1 -v Execute on datanode ozone sh -deleteKey o3://ozoneManager/fstest/bucket1/key1 -v

View File

@ -28,26 +28,26 @@ function hadoop_usage
hadoop_add_option "--buildpaths" "attempt to add class files from build tree" hadoop_add_option "--buildpaths" "attempt to add class files from build tree"
hadoop_add_option "--daemon (start|status|stop)" "operate on a daemon" hadoop_add_option "--daemon (start|status|stop)" "operate on a daemon"
hadoop_add_option "--hostnames list[,of,host,names]" "hosts to use in worker mode" hadoop_add_option "--hostnames list[,of,host,names]" "hosts to use in worker mode"
hadoop_add_option "--loglevel level" "set the log4j level for this command"
hadoop_add_option "--hosts filename" "list of hosts to use in worker mode" hadoop_add_option "--hosts filename" "list of hosts to use in worker mode"
hadoop_add_option "--loglevel level" "set the log4j level for this command"
hadoop_add_option "--workers" "turn on worker mode" hadoop_add_option "--workers" "turn on worker mode"
hadoop_add_subcommand "classpath" client "prints the class path needed to get the hadoop jar and the required libraries" hadoop_add_subcommand "classpath" client "prints the class path needed to get the hadoop jar and the required libraries"
hadoop_add_subcommand "fs" client "run a filesystem command on ozone file system"
hadoop_add_subcommand "datanode" daemon "run a HDDS datanode" hadoop_add_subcommand "datanode" daemon "run a HDDS datanode"
hadoop_add_subcommand "envvars" client "display computed Hadoop environment variables" hadoop_add_subcommand "envvars" client "display computed Hadoop environment variables"
hadoop_add_subcommand "freon" client "runs an ozone data generator" hadoop_add_subcommand "freon" client "runs an ozone data generator"
hadoop_add_subcommand "fs" client "run a filesystem command on Ozone file system. Equivalent to 'hadoop fs'"
hadoop_add_subcommand "genconf" client "generate minimally required ozone configs and output to ozone-site.xml in specified path"
hadoop_add_subcommand "genesis" client "runs a collection of ozone benchmarks to help with tuning." hadoop_add_subcommand "genesis" client "runs a collection of ozone benchmarks to help with tuning."
hadoop_add_subcommand "getozoneconf" client "get ozone config values from configuration" hadoop_add_subcommand "getozoneconf" client "get ozone config values from configuration"
hadoop_add_subcommand "jmxget" admin "get JMX exported values from NameNode or DataNode." hadoop_add_subcommand "jmxget" admin "get JMX exported values from NameNode or DataNode."
hadoop_add_subcommand "om" daemon "Ozone Manager"
hadoop_add_subcommand "oz" client "command line interface for ozone"
hadoop_add_subcommand "noz" client "ozone debug tool, convert ozone metadata into relational data" hadoop_add_subcommand "noz" client "ozone debug tool, convert ozone metadata into relational data"
hadoop_add_subcommand "om" daemon "Ozone Manager"
hadoop_add_subcommand "scm" daemon "run the Storage Container Manager service" hadoop_add_subcommand "scm" daemon "run the Storage Container Manager service"
hadoop_add_subcommand "scmcli" client "run the CLI of the Storage Container Manager" hadoop_add_subcommand "scmcli" client "run the CLI of the Storage Container Manager"
hadoop_add_subcommand "sh" client "command line interface for object store operations"
hadoop_add_subcommand "version" client "print the version" hadoop_add_subcommand "version" client "print the version"
hadoop_add_subcommand "genconf" client "generate minimally required ozone configs and output to ozone-site.xml in specified path"
hadoop_generate_usage "${HADOOP_SHELL_EXECNAME}" false hadoop_generate_usage "${HADOOP_SHELL_EXECNAME}" false
} }
@ -100,7 +100,7 @@ function ozonecmd_case
HDFS_OM_OPTS="${HDFS_OM_OPTS} -Dlog4j.configurationFile=${HADOOP_CONF_DIR}/om-audit-log4j2.properties" HDFS_OM_OPTS="${HDFS_OM_OPTS} -Dlog4j.configurationFile=${HADOOP_CONF_DIR}/om-audit-log4j2.properties"
HADOOP_OPTS="${HADOOP_OPTS} ${HDFS_OM_OPTS}" HADOOP_OPTS="${HADOOP_OPTS} ${HDFS_OM_OPTS}"
;; ;;
oz) sh | shell)
HADOOP_CLASSNAME=org.apache.hadoop.ozone.web.ozShell.Shell HADOOP_CLASSNAME=org.apache.hadoop.ozone.web.ozShell.Shell
;; ;;
noz) noz)

View File

@ -24,14 +24,14 @@ with simple authentication.
The Ozone commands take the following format. The Ozone commands take the following format.
``` ```
ozone oz --command_ /volume/bucket/key -user <username> [-root] ozone sh --command_ /volume/bucket/key -user <username> [-root]
``` ```
The `port` specified in command should match the port mentioned in the config The `port` specified in command should match the port mentioned in the config
property `hdds.rest.http-address`. This property can be set in `ozone-site.xml`. property `hdds.rest.http-address`. This property can be set in `ozone-site.xml`.
The default value for the port is `9880` and is used in below commands. The default value for the port is `9880` and is used in below commands.
The `-root` option is a command line short cut that allows *ozone oz* The `-root` option is a command line short cut that allows *ozone fs*
commands to be run as the user that started the cluster. This is useful to commands to be run as the user that started the cluster. This is useful to
indicate that you want the commands to be run as some admin user. The only indicate that you want the commands to be run as some admin user. The only
reason for this option is that it makes the life of a lazy developer more reason for this option is that it makes the life of a lazy developer more
@ -46,7 +46,7 @@ ozone cluster.
### Create Volume ### Create Volume
Volumes can be created only by administrators. Here is an example of creating a volume. Volumes can be created only by administrators. Here is an example of creating a volume.
``` ```
ozone oz -createVolume hive -user bilbo -quota 100TB -root ozone sh -createVolume hive -user bilbo -quota 100TB -root
``` ```
The above command creates a volume called `hive` owned by user `bilbo`. The The above command creates a volume called `hive` owned by user `bilbo`. The
`-root` option allows the command to be executed as user `hdfs` which is an `-root` option allows the command to be executed as user `hdfs` which is an
@ -55,7 +55,7 @@ admin in the cluster.
### Update Volume ### Update Volume
Updates information like ownership and quota on an existing volume. Updates information like ownership and quota on an existing volume.
``` ```
ozone oz -updateVolume hive -quota 500TB -root ozone sh -updateVolume hive -quota 500TB -root
``` ```
The above command changes the volume quota of hive from 100TB to 500TB. The above command changes the volume quota of hive from 100TB to 500TB.
@ -63,21 +63,21 @@ The above command changes the volume quota of hive from 100TB to 500TB.
### Delete Volume ### Delete Volume
Deletes a Volume if it is empty. Deletes a Volume if it is empty.
``` ```
ozone oz -deleteVolume /hive -root ozone sh -deleteVolume /hive -root
``` ```
### Info Volume ### Info Volume
Info volume command allows the owner or the administrator of the cluster Info volume command allows the owner or the administrator of the cluster
to read meta-data about a specific volume. to read meta-data about a specific volume.
``` ```
ozone oz -infoVolume /hive -root ozone sh -infoVolume /hive -root
``` ```
### List Volumes ### List Volumes
List volume command can be used by administrator to list volumes of any List volume command can be used by administrator to list volumes of any
user. It can also be used by any user to list their own volumes. user. It can also be used by any user to list their own volumes.
``` ```
ozone oz -listVolume / -user bilbo ozone sh -listVolume / -user bilbo
``` ```
The above command lists all volumes owned by user bilbo. The above command lists all volumes owned by user bilbo.
@ -92,7 +92,7 @@ volume or bucket.
### Create Bucket ### Create Bucket
Create bucket call allows the owner of a volume to create a bucket. Create bucket call allows the owner of a volume to create a bucket.
``` ```
ozone oz -createBucket /hive/january ozone sh -createBucket /hive/january
``` ```
This call creates a bucket called `january` in the volume called `hive`. If This call creates a bucket called `january` in the volume called `hive`. If
@ -101,24 +101,24 @@ the volume does not exist, then this call will fail.
### Update Bucket ### Update Bucket
Updates bucket meta-data, like ACLs. Updates bucket meta-data, like ACLs.
``` ```
ozone oz -updateBucket /hive/january -addAcl user:spark:rw ozone sh -updateBucket /hive/january -addAcl user:spark:rw
``` ```
### Delete Bucket ### Delete Bucket
Deletes a bucket if it is empty. Deletes a bucket if it is empty.
``` ```
ozone oz -deleteBucket /hive/january ozone sh -deleteBucket /hive/january
``` ```
### Info Bucket ### Info Bucket
Returns information about a given bucket. Returns information about a given bucket.
``` ```
ozone oz -infoBucket /hive/january ozone sh -infoBucket /hive/january
``` ```
### List Buckets ### List Buckets
List buckets in a given volume. List buckets in a given volume.
``` ```
ozone oz -listBucket /hive ozone sh -listBucket /hive
``` ```
## Ozone Key Commands ## Ozone Key Commands
@ -129,30 +129,30 @@ Ozone key commands allows users to put, delete and get keys from Ozone buckets.
Creates or overwrites a key in Ozone store, -file points to the file you want Creates or overwrites a key in Ozone store, -file points to the file you want
to upload. to upload.
``` ```
ozone oz -putKey /hive/january/processed.orc -file processed.orc ozone sh -putKey /hive/january/processed.orc -file processed.orc
``` ```
### Get Key ### Get Key
Downloads a file from the Ozone bucket. Downloads a file from the Ozone bucket.
``` ```
ozone oz -getKey /hive/january/processed.orc -file processed.orc.copy ozone sh -getKey /hive/january/processed.orc -file processed.orc.copy
``` ```
### Delete Key ### Delete Key
Deletes a key from the Ozone store. Deletes a key from the Ozone store.
``` ```
ozone oz -deleteKey /hive/january/processed.orc ozone sh -deleteKey /hive/january/processed.orc
``` ```
### Info Key ### Info Key
Reads key metadata from the Ozone store. Reads key metadata from the Ozone store.
``` ```
ozone oz -infoKey /hive/january/processed.orc ozone sh -infoKey /hive/january/processed.orc
``` ```
### List Keys ### List Keys
List all keys in an Ozone bucket. List all keys in an Ozone bucket.
``` ```
ozone oz -listKey /hive/january ozone sh -listKey /hive/january
``` ```

View File

@ -314,23 +314,23 @@ public class TestOzoneShell {
public void testShellIncompleteCommand() throws Exception { public void testShellIncompleteCommand() throws Exception {
LOG.info("Running testShellIncompleteCommand"); LOG.info("Running testShellIncompleteCommand");
String expectedError = "Incomplete command"; String expectedError = "Incomplete command";
String[] args = new String[] {}; //executing 'ozone oz' String[] args = new String[] {}; //executing 'ozone sh'
executeWithError(shell, args, expectedError, executeWithError(shell, args, expectedError,
"Usage: ozone oz [-hV] [--verbose] [-D=<String=String>]..." + "Usage: ozone sh [-hV] [--verbose] [-D=<String=String>]..." +
" [COMMAND]"); " [COMMAND]");
args = new String[] {"volume"}; //executing 'ozone oz volume' args = new String[] {"volume"}; //executing 'ozone sh volume'
executeWithError(shell, args, expectedError, executeWithError(shell, args, expectedError,
"Usage: ozone oz volume [-hV] [COMMAND]"); "Usage: ozone sh volume [-hV] [COMMAND]");
args = new String[] {"bucket"}; //executing 'ozone oz bucket' args = new String[] {"bucket"}; //executing 'ozone sh bucket'
executeWithError(shell, args, expectedError, executeWithError(shell, args, expectedError,
"Usage: ozone oz bucket [-hV] [COMMAND]"); "Usage: ozone sh bucket [-hV] [COMMAND]");
args = new String[] {"key"}; //executing 'ozone oz key' args = new String[] {"key"}; //executing 'ozone sh key'
executeWithError(shell, args, expectedError, executeWithError(shell, args, expectedError,
"Usage: ozone oz key [-hV] [COMMAND]"); "Usage: ozone sh key [-hV] [COMMAND]");
} }
@Test @Test

View File

@ -34,8 +34,8 @@ import picocli.CommandLine.Command;
* This class uses dispatch method to make calls * This class uses dispatch method to make calls
* to appropriate handlers that execute the ozone functions. * to appropriate handlers that execute the ozone functions.
*/ */
@Command(name = "ozone oz", @Command(name = "ozone sh",
description = "Client for the Ozone object store", description = "Shell for Ozone object store",
subcommands = { subcommands = {
VolumeCommands.class, VolumeCommands.class,
BucketCommands.class, BucketCommands.class,