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
This commit is contained in:
parent
28e2e43347
commit
1b01a04710
@ -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
|
||||
|
Loading…
x
Reference in New Issue
Block a user