diff options
| author | Dan Prince <dan.prince@rackspace.com> | 2011-09-07 09:28:45 -0400 |
|---|---|---|
| committer | Dan Prince <dan.prince@rackspace.com> | 2011-09-07 09:28:45 -0400 |
| commit | 1a22d1da448eb08fc4559619b450d716757b6e11 (patch) | |
| tree | fca9749f448d370d8101c29316ed6cb04b9c465b /nova/compute | |
| parent | 2c16115e236760f3933eadd3a5d7d20dda39866d (diff) | |
| parent | d01010583d5d581591c9edcf36c4da54f0c78da9 (diff) | |
Merge w/ trunk.
Fix test_rescue_with_preset_password.
Diffstat (limited to 'nova/compute')
| -rw-r--r-- | nova/compute/api.py | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/nova/compute/api.py b/nova/compute/api.py index ca59b5701..53040f06e 100644 --- a/nova/compute/api.py +++ b/nova/compute/api.py @@ -383,10 +383,6 @@ class API(base.Base): If you are changing this method, be sure to update both call paths. """ - instance = dict(launch_index=num, **base_options) - instance = self.db.instance_create(context, instance) - instance_id = instance['id'] - elevated = context.elevated() if security_group is None: security_group = ['default'] @@ -400,6 +396,10 @@ 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) + instance_id = instance['id'] + for security_group_id in security_groups: self.db.instance_add_security_group(elevated, instance_id, @@ -877,6 +877,7 @@ class API(base.Base): 'image': 'image_ref', 'name': 'display_name', 'instance_name': 'name', + 'tenant_id': 'project_id', 'recurse_zones': None, 'flavor': _remap_flavor_filter, 'fixed_ip': _remap_fixed_ip_filter} |
