From 1f0f973e791962c2282f9f564769a14152d12a25 Mon Sep 17 00:00:00 2001 From: Patrice Buriez Date: Tue, 28 Aug 2018 17:45:03 +0200 Subject: 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 --- nsb_setup.sh | 77 ++++++++++++++++++++++++++++++++++++++++++++++++++++-------- 1 file changed, 67 insertions(+), 10 deletions(-) (limited to 'nsb_setup.sh') diff --git a/nsb_setup.sh b/nsb_setup.sh index 1f5344980..335db8dd2 100755 --- a/nsb_setup.sh +++ b/nsb_setup.sh @@ -13,14 +13,78 @@ # See the License for the specific language governing permissions and # limitations under the License. +usage() +{ + cat <