Support update tier0 in policy tier1 router
Change-Id: I6de8a97dcabacbbccca79ba03ece762f94b7a6fe
This commit is contained in:
parent
7ebdb64283
commit
7b8b4ddad6
@ -1608,13 +1608,15 @@ class TestPolicyTier1(NsxPolicyLibTestCase):
|
||||
def test_update(self):
|
||||
id = '111'
|
||||
name = 'new name'
|
||||
tier0 = 'tier0'
|
||||
with mock.patch.object(self.policy_api,
|
||||
"create_or_update") as update_call:
|
||||
self.resourceApi.update(id,
|
||||
name=name,
|
||||
name=name, tier0=tier0,
|
||||
tenant=TEST_TENANT)
|
||||
expected_def = policy_defs.Tier1Def(tier1_id=id,
|
||||
name=name,
|
||||
tier0=tier0,
|
||||
tenant=TEST_TENANT)
|
||||
self.assert_called_with_def(
|
||||
update_call, expected_def)
|
||||
|
@ -563,15 +563,16 @@ class NsxPolicyTier1Api(NsxPolicyResourceBase):
|
||||
|
||||
def update(self, tier1_id, name=None, description=None,
|
||||
force_whitelisting=None,
|
||||
failover_mode=None,
|
||||
failover_mode=None, tier0=None,
|
||||
tags=None,
|
||||
tenant=policy_constants.POLICY_INFRA_TENANT):
|
||||
|
||||
# TODO(asarfaty): Support tier0=None fore reseting the tier0 value
|
||||
self._update(tier1_id=tier1_id,
|
||||
name=name,
|
||||
description=description,
|
||||
force_whitelisting=force_whitelisting,
|
||||
failover_mode=failover_mode,
|
||||
tier0=tier0,
|
||||
tags=tags,
|
||||
tenant=tenant)
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user