diff options
| author | Sandy Walsh <sandy.walsh@rackspace.com> | 2011-06-01 17:35:49 -0700 |
|---|---|---|
| committer | Sandy Walsh <sandy.walsh@rackspace.com> | 2011-06-01 17:35:49 -0700 |
| commit | cf464dc7f2093ea3d1f831915ce22f54f0d1c90a (patch) | |
| tree | 58ff42f6a8df40629340c270bd44dd028ee045a0 /nova/api | |
| parent | b05dcdc69387ecd54e40063e66355961d39b4430 (diff) | |
| download | nova-cf464dc7f2093ea3d1f831915ce22f54f0d1c90a.tar.gz nova-cf464dc7f2093ea3d1f831915ce22f54f0d1c90a.tar.xz nova-cf464dc7f2093ea3d1f831915ce22f54f0d1c90a.zip | |
list --reservation now works across zones
Diffstat (limited to 'nova/api')
| -rw-r--r-- | nova/api/openstack/create_instance_controller.py | 2 | ||||
| -rw-r--r-- | nova/api/openstack/views/servers.py | 12 |
2 files changed, 9 insertions, 5 deletions
diff --git a/nova/api/openstack/create_instance_controller.py b/nova/api/openstack/create_instance_controller.py index 786d74e37..edb1a5007 100644 --- a/nova/api/openstack/create_instance_controller.py +++ b/nova/api/openstack/create_instance_controller.py @@ -116,8 +116,6 @@ class OpenstackCreateInstanceController(common.OpenstackController): zone_blob = env['server'].get('blob') reservation_id = env['server'].get('reservation_id') - LOG.exception("******* CREATE_INSTANCE RES_ID=%s of %s" % (reservation_id, env)) - inst_type = instance_types.get_instance_type_by_flavor_id(flavor_id) extra_values = { 'instance_type': inst_type, diff --git a/nova/api/openstack/views/servers.py b/nova/api/openstack/views/servers.py index 0be468edc..0ee461dde 100644 --- a/nova/api/openstack/views/servers.py +++ b/nova/api/openstack/views/servers.py @@ -41,10 +41,13 @@ class ViewBuilder(object): def build(self, inst, is_detail): """Return a dict that represenst a server.""" - if is_detail: - server = self._build_detail(inst) + if inst.get('_is_precooked', False): + server = dict(server=inst) else: - server = self._build_simple(inst) + if is_detail: + server = self._build_detail(inst) + else: + server = self._build_simple(inst) self._build_extra(server, inst) @@ -78,6 +81,9 @@ class ViewBuilder(object): ctxt = nova.context.get_admin_context() compute_api = nova.compute.API() + + # TODO(sandy): Could be a bug here since the instance ID + # may have come from another Zone. if compute_api.has_finished_migration(ctxt, inst['id']): inst_dict['status'] = 'RESIZE-CONFIRM' |
