From e2dac9daf39d9b519df14441bbeb99c3c4a7bfaa Mon Sep 17 00:00:00 2001 From: Aaron Rosen Date: Thu, 10 Jul 2014 23:17:23 -0700 Subject: [PATCH] NSX: Remove unneed call to _ensure_default_security_group This patch removes an unneeded call to _ensure_default_security_group which does not need to be called in create_security_group_rule_bulk() as one would need to call get_security_groups() to look up the uuid of the default security group which be would created it for us, BOOM! Change-Id: I628a94c7ea9553dcefa68fa956f25244f0abbb18 Closes-bug: 1340536 --- neutron/plugins/vmware/plugins/base.py | 2 -- 1 file changed, 2 deletions(-) diff --git a/neutron/plugins/vmware/plugins/base.py b/neutron/plugins/vmware/plugins/base.py index 072fd20eb..d43782808 100644 --- a/neutron/plugins/vmware/plugins/base.py +++ b/neutron/plugins/vmware/plugins/base.py @@ -2467,12 +2467,10 @@ class NsxPluginV2(addr_pair_db.AllowedAddressPairsMixin, :param security_group_rule: list of rules to create """ s = security_group_rule.get('security_group_rules') - tenant_id = self._get_tenant_id_for_create(context, s) # TODO(arosen) is there anyway we could avoid having the update of # the security group rules in nsx outside of this transaction? with context.session.begin(subtransactions=True): - self._ensure_default_security_group(context, tenant_id) security_group_id = self._validate_security_group_rules( context, security_group_rule) # Check to make sure security group exists -- 2.45.2