diff --git a/quantum/db/securitygroups_db.py b/quantum/db/securitygroups_db.py index 7eba36cf53..5295630608 100644 --- a/quantum/db/securitygroups_db.py +++ b/quantum/db/securitygroups_db.py @@ -398,11 +398,11 @@ class SecurityGroupDbMixin(ext_sg.SecurityGroupPluginBase): raise ext_sg.SecurityGroupRuleNotFound(id=id) return sgr - def delete_security_group_rule(self, context, sgrid): + def delete_security_group_rule(self, context, id): if (cfg.CONF.SECURITYGROUP.proxy_mode and not context.is_admin): raise ext_sg.SecurityGroupProxyModeNotAdmin() with context.session.begin(subtransactions=True): - rule = self._get_security_group_rule(context, sgrid) + rule = self._get_security_group_rule(context, id) context.session.delete(rule) def _extend_port_dict_security_group(self, context, port): diff --git a/quantum/extensions/securitygroup.py b/quantum/extensions/securitygroup.py index 756c0753c2..8dd342e4cd 100644 --- a/quantum/extensions/securitygroup.py +++ b/quantum/extensions/securitygroup.py @@ -15,6 +15,7 @@ # License for the specific language governing permissions and limitations # under the License. +from abc import ABCMeta from abc import abstractmethod from quantum.api import extensions @@ -315,16 +316,14 @@ class Securitygroup(extensions.ExtensionDescriptor): class SecurityGroupPluginBase(object): + __metaclass__ = ABCMeta + @abstractmethod def create_security_group(self, context, security_group): pass @abstractmethod - def delete_security_group(self, context, security_group): - pass - - @abstractmethod - def update_security_group(self, context, security_group): + def delete_security_group(self, context, id): pass @abstractmethod @@ -340,7 +339,7 @@ class SecurityGroupPluginBase(object): pass @abstractmethod - def delete_security_group_rule(self, context, sgrid): + def delete_security_group_rule(self, context, id): pass @abstractmethod