Browse code

exercices: aggregates needs to be more flexible

The actual regex checks a result in python format and
because of the change in the bug 1132961, Jekins failed.

I have update the regex to work with the old result
and the new result.

Change-Id: I393e1358f99be5f20d9ac8b3e214355a453ecfcb
Closes-Bug: 1239726

Sahid Orentino Ferdjaoui authored on 2013/10/16 17:34:05
Showing 1 changed files
... ...
@@ -100,7 +100,7 @@ META_DATA_2_KEY=foo
100 100
 META_DATA_3_KEY=bar
101 101
 
102 102
 #ensure no additional metadata is set
103
-nova aggregate-details $AGGREGATE_ID | egrep "{u'availability_zone': u'$AGGREGATE_A_ZONE'}|{}"
103
+nova aggregate-details $AGGREGATE_ID | egrep "\|[{u ]*'availability_zone.+$AGGREGATE_A_ZONE'[ }]*\|"
104 104
 
105 105
 nova aggregate-set-metadata $AGGREGATE_ID ${META_DATA_1_KEY}=123
106 106
 nova aggregate-details $AGGREGATE_ID | grep $META_DATA_1_KEY
... ...
@@ -117,7 +117,7 @@ nova aggregate-details $AGGREGATE_ID | grep $META_DATA_3_KEY
117 117
 nova aggregate-details $AGGREGATE_ID | grep $META_DATA_2_KEY && die $LINENO "ERROR metadata was not cleared"
118 118
 
119 119
 nova aggregate-set-metadata $AGGREGATE_ID $META_DATA_3_KEY $META_DATA_1_KEY
120
-nova aggregate-details $AGGREGATE_ID | egrep "{u'availability_zone': u'$AGGREGATE_A_ZONE'}|{}"
120
+nova aggregate-details $AGGREGATE_ID | egrep "\|[{u ]*'availability_zone.+$AGGREGATE_A_ZONE'[ }]*\|"
121 121
 
122 122
 
123 123
 # Test aggregate-add/remove-host