diff --git a/vmware_nsxlib/tests/unit/v3/policy/test_resources.py b/vmware_nsxlib/tests/unit/v3/policy/test_resources.py index 2d4f4a03..02b679b9 100644 --- a/vmware_nsxlib/tests/unit/v3/policy/test_resources.py +++ b/vmware_nsxlib/tests/unit/v3/policy/test_resources.py @@ -2079,7 +2079,7 @@ class TestPolicyTier1(NsxPolicyLibTestCase): # make sure tier0 is in the body with value None actual_def = update_call.call_args_list[0][0][0] self.assertIn('tier0_path', actual_def.get_obj_dict()) - self.assertEqual("", actual_def.get_obj_dict()['tier0_path']) + self.assertIsNone(actual_def.get_obj_dict()['tier0_path']) def test_update_route_adv(self): obj_id = '111' diff --git a/vmware_nsxlib/v3/policy/core_defs.py b/vmware_nsxlib/v3/policy/core_defs.py index f962e3fe..503b1dc7 100644 --- a/vmware_nsxlib/v3/policy/core_defs.py +++ b/vmware_nsxlib/v3/policy/core_defs.py @@ -354,7 +354,7 @@ class Tier1Def(RouterDef): # TODO(annak): replace with provider path when provider is exposed if self.has_attr('tier0'): tier0 = self.get_attr('tier0') - tier0_path = "" + tier0_path = None if tier0: tenant = TENANTS_PATH_PATTERN % self.get_tenant() tier0_path = "/%stier-0s/%s" % (tenant, tier0)