Add category to policy update entries

Or else it will fail when the category is different than the current one.

Change-Id: Id3e36b7bac37bfdc519eb9eab0d6e9cd0fb0e245
(cherry picked from commit 0710496090)
This commit is contained in:
Adit Sarfaty
2019-04-28 09:46:27 +03:00
parent bf98e56172
commit d07272ffe7
2 changed files with 6 additions and 2 deletions

View File

@@ -1890,7 +1890,9 @@ class TestPolicyCommunicationMap(NsxPolicyLibTestCase):
self.resourceApi.update_entries(
domain_id, map_id, entries, tenant=TEST_TENANT)
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):
domain_id = '111'

View File

@@ -2867,8 +2867,10 @@ class NsxPolicySecurityPolicyBaseApi(NsxPolicyResourceBase):
self.policy_api.create_or_update(entry_def)
def update_entries(self, domain_id, map_id, entries,
category=constants.CATEGORY_APPLICATION,
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,
name=IGNORE, description=IGNORE,