From: Narinder Gupta Date: Fri, 17 Feb 2017 06:39:08 +0000 (+0000) Subject: Merge "fixed more errors." X-Git-Tag: danube.1.0~29 X-Git-Url: https://gerrit.opnfv.org/gerrit/gitweb?a=commitdiff_plain;h=5e6e48d3ffb8b917477331fe22af71b49865d360;hp=-c;p=joid.git Merge "fixed more errors." --- 5e6e48d3ffb8b917477331fe22af71b49865d360 diff --combined ci/03-maasdeploy.sh index 93f81020,857fc94b..aa329261 --- a/ci/03-maasdeploy.sh +++ b/ci/03-maasdeploy.sh @@@ -327,7 -327,7 +327,7 @@@ addnodes() power_parameters_power_address='qemu+ssh://'$USER'@'$MAAS_IP'/system' \ architecture='amd64/generic' power_parameters_power_id='bootstrap' - bootstrapid=$(maas $PROFILE machines read | jq -r 'select(.[].hostname == "bootstrap")[0].system_id') + bootstrapid=$(maas $PROFILE machines read | jq -r '.[] | select(.hostname == "bootstrap").system_id') maas $PROFILE tag update-nodes bootstrap add=$bootstrapid @@@ -360,17 -360,17 +360,17 @@@ tags='control' hostname='node1-control' power_type='virsh' mac_addresses=$node1controlmac \ power_parameters_power_address='qemu+ssh://'$USER'@'$MAAS_IP'/system' \ architecture='amd64/generic' power_parameters_power_id='node1-control' - controlnodeid=$(maas $PROFILE machines read | jq -r 'select(.[].hostname == "node1-control")[0].system_id') + controlnodeid=$(maas $PROFILE machines read | jq -r '.[] | select(.hostname == "node1-control").system_id') maas $PROFILE machines create autodetect_nodegroup='yes' name='node2-compute' \ tags='compute' hostname='node2-compute' power_type='virsh' mac_addresses=$node2computemac \ power_parameters_power_address='qemu+ssh://'$USER'@'$MAAS_IP'/system' \ architecture='amd64/generic' power_parameters_power_id='node2-compute' - compute2nodeid=$(maas $PROFILE machines read | jq -r 'select(.[].hostname == "node2-compute")[0].system_id') + compute2nodeid=$(maas $PROFILE machines read | jq -r '.[] | select(.hostname == "node2-compute").system_id') maas $PROFILE machines create autodetect_nodegroup='yes' name='node5-compute' \ tags='compute' hostname='node5-compute' power_type='virsh' mac_addresses=$node5computemac \ power_parameters_power_address='qemu+ssh://'$USER'@'$MAAS_IP'/system' \ architecture='amd64/generic' power_parameters_power_id='node5-compute' - compute5nodeid=$(maas $PROFILE machines read | jq -r 'select(.[].hostname == "node5-compute")[0].system_id') + compute5nodeid=$(maas $PROFILE machines read | jq -r '.[] | select(.hostname == "node5-compute").system_id') maas $PROFILE tag update-nodes control add=$controlnodeid || true maas $PROFILE tag update-nodes compute add=$compute2nodeid || true @@@ -380,12 -380,12 +380,12 @@@ until [ $(($units)) -lt 1 ]; do units=$(($units - 1)); - NODE_NAME=`cat labconfig.json | jq ".lab.racks[].nodes[i].name" | cut -d \" -f 2 ` - MAC_ADDRESS=`cat labconfig.json | jq ".lab.racks[].nodes[i].nics[] | select(.spaces[]==\"admin\").mac"[0] | cut -d \" -f 2 ` - POWER_TYPE=`cat labconfig.json | jq ".lab.racks[].nodes[i].power.type" | cut -d \" -f 2 ` - POWER_IP=`cat labconfig.json | jq ".lab.racks[].nodes[i].power.address" | cut -d \" -f 2 ` - POWER_USER=`cat labconfig.json | jq ".lab.racks[].nodes[i].power.user" | cut -d \" -f 2 ` - POWER_PASS=`cat labconfig.json | jq ".lab.racks[].nodes[i].power.pass" | cut -d \" -f 2 ` + NODE_NAME=`cat labconfig.json | jq ".lab.racks[].nodes[$units].name" | cut -d \" -f 2 ` + MAC_ADDRESS=`cat labconfig.json | jq ".lab.racks[].nodes[$units].nics[] | select(.spaces[]==\"admin\").mac"[0] | cut -d \" -f 2 ` + POWER_TYPE=`cat labconfig.json | jq ".lab.racks[].nodes[$units].power.type" | cut -d \" -f 2 ` + POWER_IP=`cat labconfig.json | jq ".lab.racks[].nodes[$units].power.address" | cut -d \" -f 2 ` + POWER_USER=`cat labconfig.json | jq ".lab.racks[].nodes[$units].power.user" | cut -d \" -f 2 ` + POWER_PASS=`cat labconfig.json | jq ".lab.racks[].nodes[$units].power.pass" | cut -d \" -f 2 ` maas $PROFILE machines create autodetect_nodegroup='yes' name=$NODE_NAME \ hostname=$NODE_NAME power_type=$POWER_TYPE power_parameters_power_address=$POWER_IP \