summaryrefslogtreecommitdiffstats
path: root/mcp/scripts
diff options
context:
space:
mode:
authorAlexandru Avadanii <Alexandru.Avadanii@enea.com>2018-09-21 13:33:15 +0000
committerGerrit Code Review <gerrit@opnfv.org>2018-09-21 13:33:15 +0000
commit7099ffcba4c7a84dfd2ac53fd59149948665f884 (patch)
treefe68e49cf2a320020479528068d4da849e44d085 /mcp/scripts
parent857797a2c50d20299dac43135bd8f688905b9d37 (diff)
parentdae5c2c5e677e4af8e56370c10316219a539321e (diff)
Merge "[infra] Bind mas01 mcpcontrol DHCP to MAAS_IP"
Diffstat (limited to 'mcp/scripts')
-rw-r--r--mcp/scripts/globals.sh1
-rw-r--r--mcp/scripts/lib.sh7
2 files changed, 8 insertions, 0 deletions
diff --git a/mcp/scripts/globals.sh b/mcp/scripts/globals.sh
index d95448d45..629bac8ca 100644
--- a/mcp/scripts/globals.sh
+++ b/mcp/scripts/globals.sh
@@ -16,6 +16,7 @@ export SALT_MASTER_USER=${SALT_MASTER_USER:-ubuntu}
# Derived from INSTALLER_IP
export MCPCONTROL_NET=${MCPCONTROL_NET:-${SALT_MASTER%.*}.0}
export MCPCONTROL_PREFIX=${MCPCONTROL_PREFIX:-24}
+export MAAS_IP=${MAAS_IP:-${SALT_MASTER%.*}.3}
# Derived from above global vars, not overideable
export SSH_OPTS="-o StrictHostKeyChecking=no -o UserKnownHostsFile=/dev/null -i ${SSH_KEY}"
diff --git a/mcp/scripts/lib.sh b/mcp/scripts/lib.sh
index df35f3706..293262e89 100644
--- a/mcp/scripts/lib.sh
+++ b/mcp/scripts/lib.sh
@@ -463,6 +463,13 @@ function create_vms {
done
}
+function update_mcpcontrol_network {
+ # set static ip address for salt master node, MaaS node
+ local amac=$(virsh domiflist mas01 2>&1| awk '/mcpcontrol/ {print $5; exit}')
+ [ -z "${amac}" ] || virsh net-update "mcpcontrol" add ip-dhcp-host \
+ "<host mac='${amac}' name='mas01' ip='${MAAS_IP}'/>" --live --config
+}
+
function reset_vms {
local vnodes=("$@")
local cmd_str="ssh ${SSH_OPTS} ${SSH_SALT}"