summaryrefslogtreecommitdiffstats
path: root/nova/api
diff options
context:
space:
mode:
authorVishvananda Ishaya <vishvananda@gmail.com>2011-08-31 12:02:14 -0700
committerVishvananda Ishaya <vishvananda@gmail.com>2011-08-31 12:02:14 -0700
commitabd6b240b5247a2981e86c1d3161306fb2b4c4c5 (patch)
treec24944f28f3a161f863ff511275b0d1a70fe1b51 /nova/api
parentc1d71294a1fc2f65089b5e539f9b610668e03b2f (diff)
moved key_name per review
Diffstat (limited to 'nova/api')
-rw-r--r--nova/api/openstack/views/servers.py3
1 files changed, 1 insertions, 2 deletions
diff --git a/nova/api/openstack/views/servers.py b/nova/api/openstack/views/servers.py
index 35821f9a7..cd01c9373 100644
--- a/nova/api/openstack/views/servers.py
+++ b/nova/api/openstack/views/servers.py
@@ -79,8 +79,6 @@ class ViewBuilder(object):
metadata[item['key']] = str(item['value'])
inst_dict['metadata'] = metadata
- inst_dict['key_name'] = inst.get('key_name', '')
-
inst_dict['hostId'] = ''
if inst.get('host'):
inst_dict['hostId'] = hashlib.sha224(inst['host']).hexdigest()
@@ -190,6 +188,7 @@ class ViewBuilderV11(ViewBuilder):
def _build_extra(self, response, inst):
self._build_links(response, inst)
response['uuid'] = inst['uuid']
+ response['key_name'] = inst.get('key_name', '')
self._build_config_drive(response, inst)
def _build_links(self, response, inst):