summaryrefslogtreecommitdiffstats
path: root/nova/api
diff options
context:
space:
mode:
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": {