summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorNarinder Gupta <narinder.gupta@canonical.com>2017-02-16 22:57:16 -0600
committerNarinder Gupta <narinder.gupta@canonical.com>2017-02-16 22:59:04 -0600
commit38256368b7d330e2ce1309cc0a64bf57bbeeae41 (patch)
tree0a0a044eea3729c7b3ab32ac6697fe6999a5f50c
parente095e9e24eacbd0aacc92f0d58461c2d7f7e7834 (diff)
modfiied to fix parse error.
Change-Id: Id7ba0c333065d3997531ba7a1a727e54349956b0 Signed-off-by: Narinder Gupta <narinder.gupta@canonical.com>
-rwxr-xr-xci/03-maasdeploy.sh17
1 files changed, 8 insertions, 9 deletions
diff --git a/ci/03-maasdeploy.sh b/ci/03-maasdeploy.sh
index 311abb92..d082f466 100755
--- a/ci/03-maasdeploy.sh
+++ b/ci/03-maasdeploy.sh
@@ -376,22 +376,21 @@ addnodes(){
maas $PROFILE tag update-nodes compute add=$compute2nodeid || true
maas $PROFILE tag update-nodes compute add=$compute5nodeid || true
else
- untis=`cat deployconfig.json | jq .opnfv.units`
+ units=`cat deployconfig.json | jq .opnfv.units`
until [ $(($units)) -lt 1 ]; do
- 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 `
+ 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 `
maas $PROFILE machines create autodetect_nodegroup='yes' name=$NODE_NAME \
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='amd64/generic'
-
- units=$(($units - 1));
done
fi