summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorZuul <zuul@review.openstack.org>2019-03-12 19:59:35 +0000
committerGerrit Code Review <review@openstack.org>2019-03-12 19:59:35 +0000
commit041cbcbafe1a031af97d403de57831e73875e0c8 (patch)
tree5fb7510575ab42249e7cf4af9e1dd55636f808f2
parent38956c7b27a3fe7c060fb6745b6e91133afc3724 (diff)
parentc234b72abd3f052f1147f21dc96a1a9a34b2f748 (diff)
Merge "tools: generalize execute_shipyard_action"HEADmaster
-rwxr-xr-xtools/execute_shipyard_action.sh14
-rwxr-xr-xtools/redeploy_server.sh2
2 files changed, 3 insertions, 13 deletions
diff --git a/tools/execute_shipyard_action.sh b/tools/execute_shipyard_action.sh
index 024fb24..c9407d0 100755
--- a/tools/execute_shipyard_action.sh
+++ b/tools/execute_shipyard_action.sh
@@ -32,7 +32,7 @@ run_action () {
32 32
33 # Define Variables 33 # Define Variables
34 action=$1 34 action=$1
35 servers=$2 35 action_args="${@:2}"
36 36
37 # Define Color 37 # Define Color
38 NC='\033[0m' 38 NC='\033[0m'
@@ -47,17 +47,7 @@ run_action () {
47 # Execute action 47 # Execute action
48 echo -e "Execute ${action} Dag...\n" 48 echo -e "Execute ${action} Dag...\n"
49 49
50 # Note that deploy and update site do not require additional parameter 50 ${base_docker_command} ${SHIPYARD_IMAGE} create action ${action} ${action_args}
51 # to be passed in while redeploy_server requires user to indicate which
52 # servers to redeploy
53 if ! [[ ${servers} ]] && [[ ${action} ]]; then
54 ${base_docker_command} ${SHIPYARD_IMAGE} create action ${action}
55 elif [[ ${action} == 'redeploy_server' && ${servers} ]]; then
56 ${base_docker_command} ${SHIPYARD_IMAGE} create action redeploy_server --param="target_nodes=${servers}"
57 else
58 echo "Invalid Input!"
59 exit 1
60 fi
61 51
62 # The status or lifecycle phase of an action can be 52 # The status or lifecycle phase of an action can be
63 # 53 #
diff --git a/tools/redeploy_server.sh b/tools/redeploy_server.sh
index 8b35077..7ca7558 100755
--- a/tools/redeploy_server.sh
+++ b/tools/redeploy_server.sh
@@ -34,4 +34,4 @@ servers=$1
34source set_env 34source set_env
35 35
36# Execute shipyard action for redeploy_server 36# Execute shipyard action for redeploy_server
37bash execute_shipyard_action.sh 'redeploy_server' ${servers} 37bash execute_shipyard_action.sh 'redeploy_server' --param="target_nodes=${servers}"