From 1f672431f998ded2277d37261fc567b10a5d7757 Mon Sep 17 00:00:00 2001 From: Sahid Orentino Ferdjaoui Date: Wed, 30 Apr 2014 11:08:50 +0200 Subject: [PATCH] wrap_check_security_groups_policy is already defined Removes the local method 'wrap_check_security_groups_policy' to the module neutron_driver.py - This method is already defined in compute_api. Change-Id: I008326f7b77515a0fc878befe45fe705420835ad Closes-Bug: #1314548 --- nova/network/security_group/neutron_driver.py | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/nova/network/security_group/neutron_driver.py b/nova/network/security_group/neutron_driver.py index 69ddf55d8a06..cd03578c01d2 100644 --- a/nova/network/security_group/neutron_driver.py +++ b/nova/network/security_group/neutron_driver.py @@ -33,9 +33,6 @@ from nova.openstack.common import uuidutils from nova import utils -wrap_check_security_groups_policy = compute_api.policy_decorator( - scope='compute:security_groups') - CONF = cfg.CONF LOG = logging.getLogger(__name__) @@ -389,7 +386,7 @@ class SecurityGroupAPI(security_group_base.SecurityGroupBase): return port_security_enabled return False - @wrap_check_security_groups_policy + @compute_api.wrap_check_security_groups_policy def add_to_instance(self, context, instance, security_group_name): """Add security group to the instance.""" @@ -443,7 +440,7 @@ class SecurityGroupAPI(security_group_base.SecurityGroupBase): with excutils.save_and_reraise_exception(): LOG.exception(_("Neutron Error:")) - @wrap_check_security_groups_policy + @compute_api.wrap_check_security_groups_policy def remove_from_instance(self, context, instance, security_group_name): """Remove the security group associated with the instance.""" neutron = neutronv2.get_client(context)