diff options
| author | Todd Willey <todd@ansolabs.com> | 2011-06-01 19:44:01 -0400 |
|---|---|---|
| committer | Todd Willey <todd@ansolabs.com> | 2011-06-01 19:44:01 -0400 |
| commit | 5c187a17216b76d730c3dcf983f905d2b5ce1bd9 (patch) | |
| tree | 2136b5a09676ab57b67fec842b47757a52c2906e /nova/compute | |
| parent | 2c1dd72060fccbe7f32a6aa08c1ce67476806680 (diff) | |
| parent | 78093e8101d1981fc1fbafc963023bc70ad6b3b6 (diff) | |
Merge trunk.
Diffstat (limited to 'nova/compute')
| -rw-r--r-- | nova/compute/api.py | 20 |
1 files changed, 9 insertions, 11 deletions
diff --git a/nova/compute/api.py b/nova/compute/api.py index 1455e2de9..7615caf91 100644 --- a/nova/compute/api.py +++ b/nova/compute/api.py @@ -91,7 +91,6 @@ class API(base.Base): """Enforce quota limits on injected files. Raises a QuotaError if any limit is exceeded. - """ if injected_files is None: return @@ -140,7 +139,6 @@ class API(base.Base): """Create the number and type of instances requested. Verifies that quota and other arguments are valid. - """ if not instance_type: instance_type = instance_types.get_default_instance_type() @@ -268,10 +266,17 @@ class API(base.Base): {"method": "run_instance", "args": {"topic": FLAGS.compute_topic, "instance_id": instance_id, - "instance_type": instance_type, + "request_spec": { + 'instance_type': instance_type, + 'filter': + 'nova.scheduler.host_filter.' + 'InstanceTypeFilter', + }, "availability_zone": availability_zone, "injected_files": injected_files, - "admin_password": admin_password}}) + "admin_password": admin_password, + }, + }) for group_id in security_groups: self.trigger_security_group_members_refresh(elevated, group_id) @@ -294,7 +299,6 @@ class API(base.Base): already exist. :param context: the security context - """ try: db.security_group_get_by_name(context, context.project_id, @@ -327,7 +331,6 @@ class API(base.Base): Sends an update request to each compute node for whom this is relevant. - """ # First, we get the security group rules that reference this group as # the grantee.. @@ -384,7 +387,6 @@ class API(base.Base): updated :returns: None - """ rv = self.db.instance_update(context, instance_id, kwargs) return dict(rv.iteritems()) @@ -434,7 +436,6 @@ class API(base.Base): Use this method instead of get() if this is the only operation you intend to to. It will route to novaclient.get if the instance is not found. - """ return self.get(context, instance_id) @@ -444,7 +445,6 @@ class API(base.Base): If there is no filter and the context is an admin, it will retreive all instances in the system. - """ if reservation_id is not None: return self.db.instance_get_all_by_reservation( @@ -474,7 +474,6 @@ class API(base.Base): compute worker :returns: None - """ if not params: params = {} @@ -524,7 +523,6 @@ class API(base.Base): """Snapshot the given instance. :returns: A dict containing image metadata - """ properties = {'instance_id': str(instance_id), 'user_id': str(context.user_id)} |
