summaryrefslogtreecommitdiffstats
path: root/deploy/host_baremetal.sh
diff options
context:
space:
mode:
authorJustin chi <chigang@huawei.com>2016-09-28 02:13:20 +0000
committerGerrit Code Review <gerrit@172.30.200.206>2016-09-28 02:13:21 +0000
commit066871de64c28d3e6adb4fe5a17bd9c894074f75 (patch)
tree067a6cee5c642e55112e5739bf3f3c55e9419168 /deploy/host_baremetal.sh
parentf5d302d1f71637df5fdd3fc815c1d7a760b6e9d4 (diff)
parente9c6204c777d4d5169d6678a868782a7835d1350 (diff)
Merge "Add a expansion functionality"
Diffstat (limited to 'deploy/host_baremetal.sh')
-rwxr-xr-xdeploy/host_baremetal.sh10
1 files changed, 9 insertions, 1 deletions
diff --git a/deploy/host_baremetal.sh b/deploy/host_baremetal.sh
index fc02875f..4c63f823 100755
--- a/deploy/host_baremetal.sh
+++ b/deploy/host_baremetal.sh
@@ -15,6 +15,14 @@ function reboot_hosts() {
}
function get_host_macs() {
- machines=`echo $HOST_MACS | sed -e 's/,/'\',\''/g' -e 's/^/'\''/g' -e 's/$/'\''/g'`
+ if [[ "$EXPANSION" == "false" ]]; then
+ machines=`echo $HOST_MACS | sed -e 's/,/'\',\''/g' -e 's/^/'\''/g' -e 's/$/'\''/g'`
+ echo $machines > $WORK_DIR/switch_machines
+ else
+ machines_old=`cat $WORK_DIR/switch_machines`
+ machines_add=`echo $HOST_MACS | sed -e 's/,/'\',\''/g' -e 's/^/'\''/g' -e 's/$/'\''/g'`
+ echo $machines_add $machines_old > $WORK_DIR/switch_machines
+ machines=`echo $machines_add $machines_old|sed 's/ /,/g'`
+ fi
echo $machines
}