Browse code

Merge "Fix aggregates test with multi host setup"

Jenkins authored on 2012/09/06 03:15:24
Showing 1 changed files
... ...
@@ -125,16 +125,16 @@ nova aggregate-details $AGGREGATE_ID | grep {}
125 125
 if [ "$VIRT_DRIVER" == "xenserver" ]; then
126 126
     echo "TODO(johngarbutt) add tests for add/remove host from pool aggregate"
127 127
 fi
128
-HOST=`nova host-list | grep compute | get_field 1`
128
+FIRST_HOST=`nova host-list | grep compute | get_field 1 | head -1`
129 129
 # Make sure can add two aggregates to same host
130
-nova aggregate-add-host $AGGREGATE_ID $HOST
131
-nova aggregate-add-host $AGGREGATE2_ID $HOST
132
-if nova aggregate-add-host $AGGREGATE2_ID $HOST; then
130
+nova aggregate-add-host $AGGREGATE_ID $FIRST_HOST
131
+nova aggregate-add-host $AGGREGATE2_ID $FIRST_HOST
132
+if nova aggregate-add-host $AGGREGATE2_ID $FIRST_HOST; then
133 133
     echo "ERROR could add duplicate host to single aggregate"
134 134
     exit -1
135 135
 fi
136
-nova aggregate-remove-host $AGGREGATE2_ID $HOST
137
-nova aggregate-remove-host $AGGREGATE_ID $HOST
136
+nova aggregate-remove-host $AGGREGATE2_ID $FIRST_HOST
137
+nova aggregate-remove-host $AGGREGATE_ID $FIRST_HOST
138 138
 
139 139
 # Test aggregate-delete
140 140
 # =====================