diff options
author | Narinder Gupta <narinder.gupta@canonical.com> | 2016-01-11 18:06:18 -0600 |
---|---|---|
committer | Narinder Gupta <narinder.gupta@canonical.com> | 2016-01-12 05:47:17 +0000 |
commit | 6434a0cec7309d16ca220c19a395a92caf143ac7 (patch) | |
tree | 283af3c360bad408ca35f1e33f67dffad87c7200 /ci/02-maasdeploy.sh | |
parent | 07b35e22299c8e0cd5c39340b05420a1109b6268 (diff) |
ymodified to include the changes needed for MAAS 1.9
Change-Id: Ia7638dda099342bb65b89cddb90813a66aa53d08
(cherry picked from commit f27f64a537b51c35979cef258e933fad5330fc52)
Diffstat (limited to 'ci/02-maasdeploy.sh')
-rwxr-xr-x | ci/02-maasdeploy.sh | 28 |
1 files changed, 25 insertions, 3 deletions
diff --git a/ci/02-maasdeploy.sh b/ci/02-maasdeploy.sh index dedd56cc..b4daf795 100755 --- a/ci/02-maasdeploy.sh +++ b/ci/02-maasdeploy.sh @@ -78,13 +78,27 @@ fi #Below function will mark the interfaces in Auto mode to enbled by MAAS enableautomode() { listofnodes=`maas maas nodes list | grep system_id | cut -d '"' -f 4` - for nodes in $listofnodes do maas maas interface link-subnet $nodes $1 mode=$2 subnet=$3 done } +#Below function will mark the interfaces in Auto mode to enbled by MAAS +# using hostname of the node added into MAAS + +enableautomodebyname() { + if [ ! -z "$4" ]; then + for i in `seq 1 7`; + do + listofnodes=`maas maas nodes list hostname=node$i-$4 | grep system_id | cut -d '"' -f 4` + if [ ! -z "$listofnodes" ]; then + maas maas interface link-subnet $nodes $1 mode=$2 subnet=$3 + fi + done + fi +} + #Below function will create vlan and update interface with the new vlan # will return the vlan id created crvlanupdsubnet() { @@ -152,12 +166,20 @@ case "$1" in crvlanupdsubnet vlan724 2 "PublicNetwork" 724 3 || true crnodevlanint $vlan721 || true crnodevlanint $vlan724 || true - enableautomode eth2.721 AUTO "10.4.9.0/24" || true + enableautomodebyname eth1.721 AUTO "10.4.9.0/24" compute || true + enableautomodebyname eth1.721 AUTO "10.4.9.0/24" control || true ;; 'intelpod6' ) - enableautomode eth1 AUTO "10.4.9.0/24" || true + maas refresh + enableautomodebyname eth1 AUTO "10.4.9.0/24" compute || true + enableautomodebyname eth1 AUTO "10.4.9.0/24" control || true ;; 'orangepod2' ) + maas refresh + enableautomodebyname eth4 AUTO "192.168.22.0/24" compute || true + enableautomodebyname eth5 AUTO "192.168.12.0/24" compute || true + enableautomodebyname eth2 AUTO "192.168.22.0/24" control || true + enableautomodebyname eth3 AUTO "192.168.12.0/24" control || true ;; 'attvirpod1' ) ;; |