diff options
| author | Chris Behrens <cbehrens@codestud.com> | 2011-06-28 08:12:56 -0700 |
|---|---|---|
| committer | Chris Behrens <cbehrens@codestud.com> | 2011-06-28 08:12:56 -0700 |
| commit | b497b7b95124fa52259637d0fc1a67f4ff625b0c (patch) | |
| tree | fc7d84ea68e74e2319ff9299b01ece51028e0ef5 /nova/compute | |
| parent | e611d3210911bfb6276da495d0b3943d2ce1b511 (diff) | |
| parent | 53b067431a4484ff243546f99c938b76f8f67972 (diff) | |
Merged trunk
Diffstat (limited to 'nova/compute')
| -rw-r--r-- | nova/compute/api.py | 13 | ||||
| -rw-r--r-- | nova/compute/manager.py | 5 |
2 files changed, 17 insertions, 1 deletions
diff --git a/nova/compute/api.py b/nova/compute/api.py index 31333ad18..1092ec727 100644 --- a/nova/compute/api.py +++ b/nova/compute/api.py @@ -500,6 +500,16 @@ class API(base.Base): {"method": "refresh_security_group_members", "args": {"security_group_id": group_id}}) + def trigger_provider_fw_rules_refresh(self, context): + """Called when a rule is added to or removed from a security_group""" + + hosts = [x['host'] for (x, idx) + in db.service_get_all_compute_sorted(context)] + for host in hosts: + rpc.cast(context, + self.db.queue_get_for(context, FLAGS.compute_topic, host), + {'method': 'refresh_provider_fw_rules', 'args': {}}) + def update(self, context, instance_id, **kwargs): """Updates the instance in the datastore. @@ -714,7 +724,7 @@ class API(base.Base): raise exception.Error(_("Unable to find host for Instance %s") % instance_id) - def snapshot(self, context, instance_id, name): + def snapshot(self, context, instance_id, name, extra_properties=None): """Snapshot the given instance. :returns: A dict containing image metadata @@ -722,6 +732,7 @@ class API(base.Base): properties = {'instance_id': str(instance_id), 'user_id': str(context.user_id), 'image_state': 'creating'} + properties.update(extra_properties or {}) sent_meta = {'name': name, 'is_public': False, 'status': 'creating', 'properties': properties} recv_meta = self.image_service.create(context, sent_meta) diff --git a/nova/compute/manager.py b/nova/compute/manager.py index 54eaf2082..5aed2c677 100644 --- a/nova/compute/manager.py +++ b/nova/compute/manager.py @@ -215,6 +215,11 @@ class ComputeManager(manager.SchedulerDependentManager): """ return self.driver.refresh_security_group_members(security_group_id) + @exception.wrap_exception + def refresh_provider_fw_rules(self, context, **_kwargs): + """This call passes straight through to the virtualization driver.""" + return self.driver.refresh_provider_fw_rules() + def _setup_block_device_mapping(self, context, instance_id): """setup volumes for block device mapping""" self.db.instance_set_state(context, |
