Merge "NSXP: place project id in security rule tag"

This commit is contained in:
Zuul 2019-06-05 07:57:26 +00:00 committed by Gerrit Code Review
commit 74c9a66e00
3 changed files with 6 additions and 3 deletions

View File

@ -2468,7 +2468,8 @@ class NsxPolicyPlugin(nsx_plugin_common.NsxPluginV3Base):
source_groups=[source] if source else None,
dest_groups=[destination] if destination else None,
scope=scope,
direction=direction, logged=logging)
direction=direction, logged=logging,
tag=sg_rule.get('project_id'))
def create_security_group(self, context, security_group, default_sg=False):
secgroup = security_group['security_group']

View File

@ -422,4 +422,5 @@ class TestNSXpProviderSecurityGrp(test_nsxp_plugin.NsxPPluginTestCaseMixin,
source_groups=mock.ANY,
dest_groups=mock.ANY,
scope=scope,
logged=False)
logged=False,
tag=rule_data['project_id'])

View File

@ -1305,7 +1305,8 @@ class NsxPTestSecurityGroup(common_v3.FixExternalNetBaseTest,
source_groups=mock.ANY,
dest_groups=mock.ANY,
scope=scope,
logged=False)
logged=False,
tag=mock.ANY)
def test_create_security_group_rule_with_remote_group(self):
with self.security_group() as sg1, self.security_group() as sg2: