Skip to content

Commit 5f553f4

Browse files
committed
Use microversion in put allocations in test_report_client
In some places test_report_client uses a raw client.put when writing allocations. This defaults to the latest microversion. This means that if the allocations format changes in the latest microversion in a patch in placement, the nova functional tests fail. In this change we pin the microversion to the minimum one providing the features used in the PUT. Change-Id: Ia0fee6bb931770792b552ae32ef31f0a4cc466ee
1 parent 160d104 commit 5f553f4

File tree

1 file changed

+6
-3
lines changed

1 file changed

+6
-3
lines changed

nova/tests/functional/test_report_client.py

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1192,8 +1192,10 @@ def _set_up_provider_tree_allocs(self):
11921192
'user_id': uuids.user,
11931193
},
11941194
}
1195-
self.client.put('/allocations/' + uuids.cn_inst1, ret[uuids.cn_inst1])
1196-
self.client.put('/allocations/' + uuids.cn_inst2, ret[uuids.cn_inst2])
1195+
self.client.put('/allocations/' + uuids.cn_inst1, ret[uuids.cn_inst1],
1196+
version='1.28')
1197+
self.client.put('/allocations/' + uuids.cn_inst2, ret[uuids.cn_inst2],
1198+
version='1.28')
11971199
# And on the other compute (with sharing)
11981200
self.client.put(
11991201
'/allocations/' + uuids.othercn_inst,
@@ -1204,7 +1206,8 @@ def _set_up_provider_tree_allocs(self):
12041206
'consumer_generation': None,
12051207
'project_id': uuids.proj,
12061208
'user_id': uuids.user,
1207-
})
1209+
},
1210+
version='1.28')
12081211

12091212
return ret
12101213

0 commit comments

Comments
 (0)