summaryrefslogtreecommitdiffstats
path: root/nova/api
diff options
context:
space:
mode:
authorAnthony Young <sleepsonthefloor@gmail.com>2011-08-18 22:15:13 -0700
committerAnthony Young <sleepsonthefloor@gmail.com>2011-08-18 22:15:13 -0700
commit5ef94944514c3f81e31cc60d3d63b903859dca45 (patch)
treecb97f9feee56066ca5ff2ab03c3914b8e5dbfe82 /nova/api
parent965f82ac122173f942806cd8a39890a1678a641e (diff)
add user_id and description. without user_id, there is no way for a tenant to tell which user created the server. description should be added for ec2 parity.
Diffstat (limited to 'nova/api')
-rw-r--r--nova/api/openstack/create_instance_helper.py3
-rw-r--r--nova/api/openstack/views/servers.py2
2 files changed, 4 insertions, 1 deletions
diff --git a/nova/api/openstack/create_instance_helper.py b/nova/api/openstack/create_instance_helper.py
index 978741682..96f817d38 100644
--- a/nova/api/openstack/create_instance_helper.py
+++ b/nova/api/openstack/create_instance_helper.py
@@ -154,7 +154,8 @@ class CreateInstanceHelper(object):
kernel_id=kernel_id,
ramdisk_id=ramdisk_id,
display_name=name,
- display_description=name,
+ display_description=\
+ server_dict.get('description', ''),
key_name=key_name,
key_data=key_data,
metadata=server_dict.get('metadata', {}),
diff --git a/nova/api/openstack/views/servers.py b/nova/api/openstack/views/servers.py
index edc328129..c5f1e6021 100644
--- a/nova/api/openstack/views/servers.py
+++ b/nova/api/openstack/views/servers.py
@@ -64,6 +64,8 @@ class ViewBuilder(object):
inst_dict = {
'id': inst['id'],
'name': inst['display_name'],
+ 'user_id': inst['user_id'],
+ 'description': inst['display_description'],
'status': common.status_from_power_state(inst.get('state'))}
ctxt = nova.context.get_admin_context()