Merge "Add category to policy update entries"

This commit is contained in:
Zuul 2019-04-29 14:17:10 +00:00 committed by Gerrit Code Review
commit cc0ec850dc
2 changed files with 6 additions and 2 deletions

View File

@ -1890,7 +1890,9 @@ class TestPolicyCommunicationMap(NsxPolicyLibTestCase):
self.resourceApi.update_entries( self.resourceApi.update_entries(
domain_id, map_id, entries, tenant=TEST_TENANT) domain_id, map_id, entries, tenant=TEST_TENANT)
update_call.assert_called_once_with( update_call.assert_called_once_with(
domain_id, map_id, entries, tenant=TEST_TENANT) domain_id, map_id, entries,
category=constants.CATEGORY_APPLICATION,
tenant=TEST_TENANT)
def test_update_with_entries(self): def test_update_with_entries(self):
domain_id = '111' domain_id = '111'

View File

@ -2867,8 +2867,10 @@ class NsxPolicySecurityPolicyBaseApi(NsxPolicyResourceBase):
self.policy_api.create_or_update(entry_def) self.policy_api.create_or_update(entry_def)
def update_entries(self, domain_id, map_id, entries, def update_entries(self, domain_id, map_id, entries,
category=constants.CATEGORY_APPLICATION,
tenant=constants.POLICY_INFRA_TENANT): tenant=constants.POLICY_INFRA_TENANT):
self.update_with_entries(domain_id, map_id, entries, tenant=tenant) self.update_with_entries(domain_id, map_id, entries, category=category,
tenant=tenant)
def update_with_entries(self, domain_id, map_id, entries=IGNORE, def update_with_entries(self, domain_id, map_id, entries=IGNORE,
name=IGNORE, description=IGNORE, name=IGNORE, description=IGNORE,