diff options
author | Dan Radez <dradez@redhat.com> | 2015-11-08 12:55:16 -0500 |
---|---|---|
committer | Dan Radez <dradez@redhat.com> | 2015-11-08 12:55:16 -0500 |
commit | 02f299a5ffb749822234faf34ea5eddc1374724d (patch) | |
tree | 79c141985efdac60c4f690f15299b0846dc7f58c | |
parent | 9adcc8960d835607317810b1d060beaca0f6cec5 (diff) |
arg parse updates
- replacing the echo | cut with bash string slicing
- replacing underscores with dashes in long args
- adding no-ha to the usage display
Change-Id: Ie87709c60a485bbcd97f168207e03d43bd85f24a
-rwxr-xr-x | ci/deploy.sh | 18 |
1 files changed, 5 insertions, 13 deletions
diff --git a/ci/deploy.sh b/ci/deploy.sh index 0a5a2a82..13b7c042 100755 --- a/ci/deploy.sh +++ b/ci/deploy.sh @@ -275,8 +275,8 @@ display_usage() { echo -e "\n -c|--config : Full path of settings file to parse. Optional. Will provide a new base settings file rather than the default. Example: --config /opt/myinventory.yml \n" echo -e "\n -r|--resources : Full path of settings file to parse. Optional. Will provide a new base settings file rather than the default. Example: --config /opt/myinventory.yml \n" echo -e "\n -v|--virtual : Virtualize compute nodes instead of using baremetal. \n" - echo -e "\n --ping_site : site to use to verify IP connectivity from the VM when -virtual is used. Format: -ping_site www.blah.com \n" - echo -e "\n --floating_ip_count : number of IP address from the public range to be used for floating IP. Default is 20.\n" + echo -e "\n -p|--ping-site : site to use to verify IP connectivity from the VM when -virtual is used. Format: -ping_site www.blah.com \n" + echo -e "\n -n|--no-ha : disable High Availablility deploymnet scheme, this assumes a single controller and single compute node \n" } ##translates the command line paramaters into variables @@ -287,7 +287,7 @@ parse_cmdline() { echo "Use -h to display help" sleep 2 - while [ "$(echo $1 | cut -c1)" = "-" ] + while [ "${1:0:1}" = "-" ] do echo $1 case "$1" in @@ -307,15 +307,11 @@ parse_cmdline() { virtual="TRUE" shift 1 ;; - --ping_site) + -p|--ping-site) ping_site=$2 shift 2 ;; - --floating_ip_count) - floating_ip_count=$2 - shift 2 - ;; - -n|--no_ha ) + -n|--no-ha ) vm_index=1 shift 1 ;; @@ -325,10 +321,6 @@ parse_cmdline() { ;; esac done - - if [ -z "$floating_ip_count" ]; then - floating_ip_count=20 - fi } ##END FUNCTIONS |