diff options
author | Narinder Gupta <narinder.gupta@canonical.com> | 2017-08-09 04:13:12 -0500 |
---|---|---|
committer | Narinder Gupta <narinder.gupta@canonical.com> | 2017-08-09 04:15:08 -0500 |
commit | 2f823d98d676b0465c01361f1ba942d14a3e974c (patch) | |
tree | 5d0bd93b608b0a96dbdc87d8a557b8235c689698 /ci/03-maasdeploy.sh | |
parent | 2fd94dfa321cd3becc3aa675e4cd31166cfd4adc (diff) |
Added architecture specific code as enabling for power.
Same should work for ARM as well.
Change-Id: I72f38bf046b2bbded3bc49073d2541010f374d5e
Signed-off-by: Narinder Gupta <narinder.gupta@canonical.com>
Diffstat (limited to 'ci/03-maasdeploy.sh')
-rwxr-xr-x | ci/03-maasdeploy.sh | 21 |
1 files changed, 11 insertions, 10 deletions
diff --git a/ci/03-maasdeploy.sh b/ci/03-maasdeploy.sh index 18cf4d9f..0207e89a 100755 --- a/ci/03-maasdeploy.sh +++ b/ci/03-maasdeploy.sh @@ -15,7 +15,7 @@ NODE_ARCTYPE=`arch` NODE_ARC="amd64/generic" if [ "x86_64" == "$NODE_ARCTYPE" ]; then - NODE_ARC="adm64/generic" + NODE_ARC="amd64/generic" elif [ "ppc64le" == "$NODE_ARCTYPE" ]; then NODE_ARC='ppc64el' else @@ -377,16 +377,16 @@ addnodes(){ # prepare a file containing virsh remote url to connect without adding it n command line echo "export VIRSH_DEFAULT_CONNECT_URI=$VIRSHURL" > virsh_uri.sh else + netw="" + brid=`brctl show | grep 8000 | cut -d "8" -f 1 | tr "\n" " " | tr " " " " | tr -s " "` + ADMIN_BR=`cat labconfig.json | jq '.opnfv.spaces[] | select(.type=="admin")'.bridge | cut -d \" -f 2 ` - netw="" for feature in $brid; do - if [ "$feature" == "" ]; then - netw=$netw - elif [ "$feature" == "virbr0" ]; then - netw=$netw - else + if [ "$feature" == "$ADMIN_BR" ]; then netw=$netw" --network bridge="$feature",model=virtio" + else + netw=$netw fi done fi @@ -467,8 +467,10 @@ addnodes(){ POWER_PASS=`cat labconfig.json | jq ".lab.racks[].nodes[$units].power.pass" | cut -d \" -f 2 ` NODE_ARCTYPE=`cat labconfig.json | jq ".lab.racks[].nodes[$units].architecture" | cut -d \" -f 2 ` - if [ "x86_64" -eq $NODE_ARCTYPE ]; then - NODE_ARC='adm64/generic' + if [ "x86_64" == "$NODE_ARCTYPE" ]; then + NODE_ARC="amd64/generic" + elif [ "ppc64le" == "$NODE_ARCTYPE" ]; then + NODE_ARC='ppc64el' else NODE_ARC=$NODE_ARCTYPE fi @@ -478,7 +480,6 @@ addnodes(){ hostname=$NODE_NAME power_type=$POWER_TYPE power_parameters_power_address=$POWER_IP \ power_parameters_power_user=$POWER_USER power_parameters_power_pass=$POWER_PASS mac_addresses=$MAC_ADDRESS \ architecture=$NODE_ARC - #mac_addresses=$MAC_ADDRESS1 architecture=$NODE_ARCH done fi |