Fix CLI argument handling in nsb_setup.sh 77/61477/4
authorPatrice Buriez <patrice.buriez@intel.com>
Tue, 28 Aug 2018 15:45:03 +0000 (17:45 +0200)
committerPatrice Buriez <patrice.buriez@intel.com>
Tue, 4 Sep 2018 17:27:25 +0000 (17:27 +0000)
commit1f0f973e791962c2282f9f564769a14152d12a25
tree27dcba8fa3317e9b90de23dbe5ce513c0181e5b0
parent00f9e63336b0af1e11dc4048e74cba0fb690e906
Fix CLI argument handling in nsb_setup.sh

CLI argument $1 was used for both admin-openrc file with OpenStack
credentials and Yardstick Docker image, so obviously one of them would
be wrong, and NSB setup would fail at some point.

Historically, admin-openrc could be supplied as CLI argument $1, but
change https://gerrit.opnfv.org/gerrit/56493 broke it, which means
specifying Yardstick Docker image as CLI argument never worked.

This fix implements support for the following CLI options:
  -o openrc     Specify admin-openrc file with OpenStack credentials
  -i image      Specify Yardstick Docker image
  -h            Provide usage information

For backward compatibility reasons, admin-openrc file can be supplied
either with the -o option, or as a CLI argument.

JIRA: YARDSTICK-1137

Change-Id: I3e9904970560468c24b21738203bc67b7591f9e4
Signed-off-by: Patrice Buriez <patrice.buriez@intel.com>
nsb_setup.sh