summaryrefslogtreecommitdiffstats
path: root/nova/api
diff options
context:
space:
mode:
authorAnthony Young <sleepsonthefloor@gmail.com>2011-08-22 16:21:29 -0700
committerAnthony Young <sleepsonthefloor@gmail.com>2011-08-22 16:21:29 -0700
commit49ef06ba21115a64c2efbb6fa81e0e6ee3f9095d (patch)
tree3f66b2a7edc3accec77e74ce7f921f8d5737862c /nova/api
parent34ef09beb3bf00fd9eb16b8517c520af24641e8c (diff)
downloadnova-49ef06ba21115a64c2efbb6fa81e0e6ee3f9095d.tar.gz
nova-49ef06ba21115a64c2efbb6fa81e0e6ee3f9095d.tar.xz
nova-49ef06ba21115a64c2efbb6fa81e0e6ee3f9095d.zip
xml deserialization, and test fixes
Diffstat (limited to 'nova/api')
-rw-r--r--nova/api/openstack/servers.py9
1 files changed, 8 insertions, 1 deletions
diff --git a/nova/api/openstack/servers.py b/nova/api/openstack/servers.py
index 57ed5f45e..7faeb7278 100644
--- a/nova/api/openstack/servers.py
+++ b/nova/api/openstack/servers.py
@@ -183,6 +183,10 @@ class Controller(object):
self.helper._validate_server_name(name)
update_dict['display_name'] = name.strip()
+ if 'description' in body['server']:
+ description = body['server']['description']
+ update_dict['display_description'] = description.strip()
+
try:
self.compute_api.update(ctxt, id, **update_dict)
except exception.NotFound:
@@ -836,9 +840,12 @@ class ServerXMLSerializer(wsgi.XMLDictSerializer):
def _add_server_attributes(self, node, server):
node.setAttribute('id', str(server['id']))
+ node.setAttribute('userId', str(server['user_id']))
+ node.setAttribute('tenantId', str(server['tenant_id']))
node.setAttribute('uuid', str(server['uuid']))
node.setAttribute('hostId', str(server['hostId']))
node.setAttribute('name', server['name'])
+ node.setAttribute('description', server['description'])
node.setAttribute('created', str(server['created']))
node.setAttribute('updated', str(server['updated']))
node.setAttribute('status', server['status'])
@@ -945,7 +952,7 @@ def create_resource(version='1.0'):
"attributes": {
"server": ["id", "imageId", "name", "flavorId", "hostId",
"status", "progress", "adminPass", "flavorRef",
- "imageRef"],
+ "imageRef", "userId", "tenantId", "description"],
"link": ["rel", "type", "href"],
},
"dict_collections": {