diff options
| author | Jenkins <jenkins@review.openstack.org> | 2012-02-29 16:55:35 +0000 |
|---|---|---|
| committer | Gerrit Code Review <review@openstack.org> | 2012-02-29 16:55:35 +0000 |
| commit | 0ab9f2cbaee13207d41e1475bc19e70db7046113 (patch) | |
| tree | c734560ea8d916f3a46c0ecd918fb92e571b8c46 /nova/compute | |
| parent | 36100f6f99b317ef9f10f101f7cecfb1639255a8 (diff) | |
| parent | e3530a06c4d84e101e07bbe22075a0e2b3a72086 (diff) | |
Merge "Include launch_index when creating instances."
Diffstat (limited to 'nova/compute')
| -rw-r--r-- | nova/compute/api.py | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/nova/compute/api.py b/nova/compute/api.py index 0aee6dc2f..d900fb77f 100644 --- a/nova/compute/api.py +++ b/nova/compute/api.py @@ -462,7 +462,7 @@ class API(base.Base): #NOTE(bcwaldon): No policy check since this is only used by scheduler and # the compute api. That should probably be cleaned up, though. def create_db_entry_for_new_instance(self, context, instance_type, image, - base_options, security_group, block_device_mapping, num=1): + base_options, security_group, block_device_mapping): """Create an entry in the DB for this new instance, including any related table updates (such as security group, etc). @@ -483,8 +483,8 @@ class API(base.Base): security_group_name) security_groups.append(group['id']) - instance = dict(launch_index=num, **base_options) - instance = self.db.instance_create(context, instance) + base_options.setdefault('launch_index', 0) + instance = self.db.instance_create(context, base_options) instance_id = instance['id'] instance_uuid = instance['uuid'] |
