From 03f6cb884b4ba8ac3d03000bc94b7816160da1c6 Mon Sep 17 00:00:00 2001 From: Tim Rozet Date: Thu, 30 Jun 2016 12:53:56 -0400 Subject: Adds overcloud ssh support and other fixes Changes include: - Copies root pub key to overcloud nodes - Introduces overcloud util command to login control/computes - Minor fixes to undercloud util command JIRA: APEX-192 Change-Id: I903fda4b1d232fc623137490630ac905ebb781d7 Signed-off-by: Tim Rozet --- ci/util.sh | 22 +++++++++++++++++++--- 1 file changed, 19 insertions(+), 3 deletions(-) (limited to 'ci/util.sh') diff --git a/ci/util.sh b/ci/util.sh index b262c203..f55e1e0f 100755 --- a/ci/util.sh +++ b/ci/util.sh @@ -5,7 +5,7 @@ CONFIG=${CONFIG:-'/var/opt/opnfv'} RESOURCES=${RESOURCES:-"$CONFIG/images"} LIB=${LIB:-"$CONFIG/lib"} -VALID_CMDS="undercloud debug-stack -h --help" +VALID_CMDS="undercloud overcloud debug-stack -h --help" source $LIB/utility-functions.sh @@ -22,7 +22,11 @@ resolve_cmd() { display_usage() { echo -e "Usage:\n$0 [arguments] \n" - echo -e " undercloud : Connect to Undercloud VM as \n" + echo -e " undercloud : Connect to Undercloud VM as and execute command \n" + echo -e " Optional: Defaults to 'stack', Optional: Defaults to none\n" + echo -e " overcloud : Connect to an Overcloud and execute command \n" + echo -e " Required in format controller|compute. Example: controller0\n" + echo -e " Optional: Defaults to none\n" echo -e " debug-stack : Print parsed deployment failures to stdout \n" } @@ -52,8 +56,20 @@ parse_cmdline() { if [ -z "$2" ]; then # connect as stack by default undercloud_connect stack + elif [ -z "$3" ]; then + undercloud_connect "$2" else - undercloud_connect $2 + undercloud_connect "$2" "$3" + fi + exit 0 + ;; + overcloud) + if [ -z "$2" ]; then + overcloud_connect + elif [ -z "$3" ]; then + overcloud_connect "$2" + else + overcloud_connect "$2" "$3" fi exit 0 ;; -- cgit 1.2.3-korg