]> review.fuel-infra Code Review - openstack-build/neutron-build.git/commitdiff
NSX: Remove unneed call to _ensure_default_security_group
authorAaron Rosen <aaronorosen@gmail.com>
Fri, 11 Jul 2014 06:17:23 +0000 (23:17 -0700)
committerAaron Rosen <aaronorosen@gmail.com>
Tue, 15 Jul 2014 21:21:27 +0000 (14:21 -0700)
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

index 072fd20eba27affbde5c08dda8f25925142e4a74..d437828083e849fc667178faf079794a52cd252c 100644 (file)
@@ -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