diff options
| author | Tushar Patil <tushar.vitthal.patil@gmail.com> | 2011-09-08 13:49:03 -0700 |
|---|---|---|
| committer | Tushar Patil <tushar.vitthal.patil@gmail.com> | 2011-09-08 13:49:03 -0700 |
| commit | 7e96a2d7c5f2ac8572c6d0fd20e4e8c7e146dce9 (patch) | |
| tree | 055e839e762222bd1ab9f8cc8362e17d09b61da0 /nova/compute | |
| parent | 9773d900d35316edbad4468a869ca62a353d3114 (diff) | |
| parent | b48ccfdfbc42f399aaeb29e5305c3855a719b02d (diff) | |
Added docstring to explain usage of reserved keyword argument
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 e045ef3de..4e2944bb7 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} |
