From 2b761537334f56608db4a1ebc1d8abb0553cdbb2 Mon Sep 17 00:00:00 2001 From: Tim Rozet Date: Thu, 28 Jan 2016 15:03:51 -0500 Subject: Various fixes and improvements Changes Include: - New Interactive mode. Allows you to pause deployments in order to make changes before continuing (or exit and deploy manually). Useful when needing to modify NIC order for baremetal deployments. - deploy_settings -d is now required. - ha_enabled no longer defaults to true. It can be specified in deploy_settings or overridden with via command line. - compute nodes now scale correctly with what is defined by inventory JIRA: APEX-70 APEX-71 APEX-72 Change-Id: Id45808f4d0435d66f12c020bd4455faaa43da191 Signed-off-by: Tim Rozet --- lib/common-functions.sh | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) (limited to 'lib') diff --git a/lib/common-functions.sh b/lib/common-functions.sh index 7435411e..0b1eb7d2 100644 --- a/lib/common-functions.sh +++ b/lib/common-functions.sh @@ -544,3 +544,19 @@ iptables -A FORWARD -s ${external_cidr} -m state --state ESTABLISHED,RELATED -j service iptables save EOI } + +# Interactive prompt handler +# params: step stage, ex. deploy, undercloud install, etc +function prompt_user { + while [ 1 ]; do + echo -n "Would you like to proceed with ${1}? (y/n) " + read response + if [ "$response" == 'y' ]; then + return 0 + elif [ "$response" == 'n' ]; then + return 1 + else + continue + fi + done +} -- cgit 1.2.3-korg