Verify the response attributes of 'create-aggregate' API
This patch verifies the response attributes of 'create-aggregate'.
The response attributes of v2 and v3 are the same:
{
"aggregate": {
"availability_zone": "nova",
"created_at": "2012-10-01T18:50:27.781065",
"deleted": false,
"deleted_at": null,
"id": 1,
"name": "name",
"updated_at": null
}
}
The status_code is different:
v2 -> 200
v3 -> 201
This patch also fixed a typo bug in the compute/aggregates.py
Partially implements blueprint nova-api-attribute-test
Change-Id: I584ee2b9ac6033fb365a8dadd4e3844b1c37edb2
This commit is contained in:
@@ -50,6 +50,7 @@ class AggregatesV3ClientJSON(rest_client.RestClient):
|
||||
resp, body = self.post('os-aggregates', post_body)
|
||||
|
||||
body = json.loads(body)
|
||||
self.validate_response(v3_schema.create_aggregate, resp, body)
|
||||
return resp, body['aggregate']
|
||||
|
||||
def update_aggregate(self, aggregate_id, name, availability_zone=None):
|
||||
|
||||
Reference in New Issue
Block a user