diff options
| author | jaypipes@gmail.com <> | 2010-10-27 14:55:01 -0400 |
|---|---|---|
| committer | jaypipes@gmail.com <> | 2010-10-27 14:55:01 -0400 |
| commit | 213b9987365c4b336b63e08e1ca187a43d00fa3d (patch) | |
| tree | ab33bdd58c9438303d4b5bf34c008a6270f67394 /nova/api | |
| parent | 79acdcca7d37e81d626be7a3369394ef9dface1b (diff) | |
| download | nova-213b9987365c4b336b63e08e1ca187a43d00fa3d.tar.gz nova-213b9987365c4b336b63e08e1ca187a43d00fa3d.tar.xz nova-213b9987365c4b336b63e08e1ca187a43d00fa3d.zip | |
OK, let's try this one more time.
Diffstat (limited to 'nova/api')
| -rw-r--r-- | nova/api/ec2/cloud.py | 13 | ||||
| -rw-r--r-- | nova/api/openstack/servers.py | 4 |
2 files changed, 8 insertions, 9 deletions
diff --git a/nova/api/ec2/cloud.py b/nova/api/ec2/cloud.py index 9084958a1..7b6144ba5 100644 --- a/nova/api/ec2/cloud.py +++ b/nova/api/ec2/cloud.py @@ -837,13 +837,11 @@ class CloudController(object): for num in range(num_instances): - instance_data = base_options - instance_ref = self.compute_manager.create_instance(context, - instance_data, security_groups, mac_address=utils.generate_mac(), - launch_index=num) + launch_index=num, + **base_options) inst_id = instance_ref['id'] internal_id = instance_ref['internal_id'] @@ -851,7 +849,6 @@ class CloudController(object): self.compute_manager.update_instance(context, inst_id, - instance_ref, hostname=ec2_id) # TODO(vish): This probably should be done in the scheduler @@ -903,8 +900,10 @@ class CloudController(object): 'state': 0, 'terminated_at': now} self.compute_manager.update_instance(context, - instance_ref['id'], - updated_data) + instance_ref['id'], + state_description='terminating', + state=0, + terminated_at=now) # FIXME(ja): where should network deallocate occur? address = db.instance_get_floating_address(context, diff --git a/nova/api/openstack/servers.py b/nova/api/openstack/servers.py index e1a254d4e..1d8aa2fa4 100644 --- a/nova/api/openstack/servers.py +++ b/nova/api/openstack/servers.py @@ -246,11 +246,11 @@ class Controller(wsgi.Controller): inst['mac_address'] = utils.generate_mac() inst['launch_index'] = 0 - ref = self.compute_manager.create_instance(ctxt, inst) + ref = self.compute_manager.create_instance(ctxt, **inst) inst['id'] = ref['internal_id'] inst['hostname'] = str(ref['internal_id']) - self.compute_manager.update_instance(ctxt, inst['id'], inst) + self.compute_manager.update_instance(ctxt, inst['id'], **inst) address = self.network_manager.allocate_fixed_ip(ctxt, inst['id']) |
