create_backup xml interface does not honour the "name" argument
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Cinder |
Invalid
|
Medium
|
John Griffith |
Bug Description
A new test (in tempest) for the backup API fails against the XML interface only, which apparently is not honouring (or maybe showing) the "name" argument passed in the POST request:
2014-01-18 23:53:43,963 Large body (10866) md5 summary: f2b62af496b561f
2014-01-18 23:53:43,964 Request: POST http://
2014-01-18 23:53:43,964 Request Headers: {'Content-Type': 'application/xml', 'Accept': 'application/xml', 'X-Auth-Token': '<Token omitted>'}
2014-01-18 23:53:43,965 Request Body: <?xml version="1.0" encoding="UTF-8"?>
<backup xmlns="http://
2014-01-18 23:53:44,319 Response Status: 202
2014-01-18 23:53:44,320 Nova request id: req-5f1c9f45-
2014-01-18 23:53:44,320 Response Headers: {'content-length': '170', 'date': 'Sat, 18 Jan 2014 23:53:44 GMT', 'content-type': 'application/xml', 'connection': 'close'}
2014-01-18 23:53:44,320 Response Body: <?xml version='1.0' encoding='UTF-8'?>
<backup xmlns:backups="http://
JSON interface works well:
2014-01-18 18:02:14,484 Request: POST http://
2014-01-18 18:02:14,485 Request Headers: {'Content-Type': 'application/json', 'Accept': 'application/json', 'X-Auth-Token': '<Token omitted>'}
2014-01-18 18:02:14,485 Request Body: {"backup": {"name": "Backup-
2014-01-18 18:02:14,780 Response Status: 202
2014-01-18 18:02:14,780 Nova request id: req-c4e5dd4f-
2014-01-18 18:02:14,780 Response Headers: {'content-length': '369', 'date': 'Sat, 18 Jan 2014 18:02:14 GMT', 'content-type': 'application/json', 'connection': 'close'}
2014-01-18 18:02:14,780 Response Body: {"backup": {"id": "cb4be5c6-
description: | updated |
description: | updated |
Changed in cinder: | |
assignee: | nobody → Leandro Ignacio Costantino (leandro-i-costantino) |
Changed in cinder: | |
assignee: | nobody → John Griffith (john-griffith) |
tags: | added: backup |
It seems that 'name' field is not taken in account on XML Deserializer but display_name instead.
Which should be the right one?
something like this in cinder/ api/contrib/ backups. py should work:
@@ -90,7 +90,7 @@ class CreateDeseriali zer(wsgi. MetadataXMLDese rializer) :
backup_ node = self.find_ first_child_ named(node, 'backup')
backup = {}
- attributes = ['container', 'display_name',
'display_ description' , 'volume_id']
+ attributes = ['container', 'display_name', 'name',
for attr in attributes: