From fe1c97ff4c36d1cc2642d9a485f82874e4b3bda2 Mon Sep 17 00:00:00 2001 From: Deepak Garg Date: Fri, 13 Jan 2012 16:03:45 +0530 Subject: Blueprint xenapi-provider-firewall and Bug #915403. 1. Provides dom0 IPtables driver to implement the Provider firewall rules. 2. Existing libvirt code has been refactored to reduce the amount of duplicated code to a minimum 3. The three provider apis in ec2/admin.py file are now fixed the following way: a. remove_external_address_block returned 'OK' on removing blocks which didn't exist. This is now fixed. b. block_external_addresses raised exception earlier on duplicate network blocks. Now the exception is logged and failed status message is returned. c. all the three provider apis now logs for invalid and improper inputs and return uniform (a dictionary ) and proper status messages for all cases. 4. appropriate unit tests added to cover the same Change-Id: I27d83186f850423a6268947aed0c9a349d8f8d65 --- nova/compute/api.py | 2 +- nova/compute/manager.py | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) (limited to 'nova/compute') diff --git a/nova/compute/api.py b/nova/compute/api.py index a4c228e26..0e874358b 100644 --- a/nova/compute/api.py +++ b/nova/compute/api.py @@ -710,7 +710,7 @@ class API(base.Base): "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""" + """Called when a rule is added/removed from a provider firewall""" hosts = [x['host'] for (x, idx) in self.db.service_get_all_compute_sorted(context)] diff --git a/nova/compute/manager.py b/nova/compute/manager.py index f43c7a1a0..59e228e45 100644 --- a/nova/compute/manager.py +++ b/nova/compute/manager.py @@ -261,9 +261,9 @@ class ComputeManager(manager.SchedulerDependentManager): return self.driver.refresh_security_group_members(security_group_id) @exception.wrap_exception(notifier=notifier, publisher_id=publisher_id()) - def refresh_provider_fw_rules(self, context, **_kwargs): + def refresh_provider_fw_rules(self, context, **kwargs): """This call passes straight through to the virtualization driver.""" - return self.driver.refresh_provider_fw_rules() + return self.driver.refresh_provider_fw_rules(**kwargs) def _get_instance_nw_info(self, context, instance): """Get a list of dictionaries of network data of an instance. -- cgit