diff options
| author | Cerberus <matt.dietz@rackspace.com> | 2011-02-02 10:49:02 -0600 |
|---|---|---|
| committer | Cerberus <matt.dietz@rackspace.com> | 2011-02-02 10:49:02 -0600 |
| commit | 6d2e2c52012abac8cab322357ce0ffd0ffc2fbaf (patch) | |
| tree | 1d0ba6a4782483b2416b32e4c1aa2a17c32b1802 | |
| parent | 7b8ddb4e00c7b592697a2db521a8655d84ca0356 (diff) | |
| download | nova-6d2e2c52012abac8cab322357ce0ffd0ffc2fbaf.tar.gz nova-6d2e2c52012abac8cab322357ce0ffd0ffc2fbaf.tar.xz nova-6d2e2c52012abac8cab322357ce0ffd0ffc2fbaf.zip | |
Casting to the scheduler
| -rw-r--r-- | nova/compute/api.py | 10 | ||||
| -rw-r--r-- | nova/rpc.py | 2 |
2 files changed, 8 insertions, 4 deletions
diff --git a/nova/compute/api.py b/nova/compute/api.py index 0faa066b5..283845709 100644 --- a/nova/compute/api.py +++ b/nova/compute/api.py @@ -404,10 +404,14 @@ class API(base.Base): process.""" raise NotImplemented() - def resize(self, context, instance_id, flavor_id): + def resize(self, context, instance_id, flavor): """Resize a running instance.""" - self._cast_compute_message('resize_instance', context, instance_id, - flavor_id) + rpc.cast(context, + FLAGS.scheduler_topic, + {"method": "resize_instance", + "args": {"topic": FLAGS.compute_topic, + "instance_id": instance_id, + "flavor": flavor}}) def pause(self, context, instance_id): """Pause the given instance.""" diff --git a/nova/rpc.py b/nova/rpc.py index 01fc6d44b..c4c938f4d 100644 --- a/nova/rpc.py +++ b/nova/rpc.py @@ -119,7 +119,7 @@ class Consumer(messaging.Consumer): LOG.error(_("Reconnected to queue")) self.failed_connection = False # NOTE(vish): This is catching all errors because we really don't - # exceptions to be logged 10 times a second if some + # want exceptions to be logged 10 times a second if some # persistent failure occurs. except Exception: # pylint: disable-msg=W0703 if not self.failed_connection: |
