From 60a876bf16e7e78dd725cd9c8aa8ea442f86bf5c Mon Sep 17 00:00:00 2001 From: Deepak Garg Date: Fri, 13 Jan 2012 16:03:45 +0530 Subject: [PATCH] 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/utils.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/nova/utils.py b/nova/utils.py index bd68c6966..818dc2b73 100644 --- a/nova/utils.py +++ b/nova/utils.py @@ -1075,12 +1075,12 @@ def monkey_patch(): if isinstance(module_data[key], pyclbr.Class): clz = import_class("%s.%s" % (module, key)) for method, func in inspect.getmembers(clz, inspect.ismethod): - setattr(clz, method,\ + setattr(clz, method, decorator("%s.%s.%s" % (module, key, method), func)) # set the decorator for the function if isinstance(module_data[key], pyclbr.Function): func = import_class("%s.%s" % (module, key)) - setattr(sys.modules[module], key,\ + setattr(sys.modules[module], key, decorator("%s.%s" % (module, key), func))