NSXP LB: Change HM name attribute for consistency
Change-Id: Ia0cb8018bf5b6767f93977e861c2b0f718382fa3
This commit is contained in:
parent
5e1d29093e
commit
06cbb8a83f
|
@ -1124,11 +1124,11 @@ class TestPolicyLBMonitorProfileHttpApi(test_resources.NsxPolicyLibTestCase):
|
||||||
"create_or_update") as api_call:
|
"create_or_update") as api_call:
|
||||||
result = self.resourceApi.create_or_overwrite(
|
result = self.resourceApi.create_or_overwrite(
|
||||||
lb_monitor_profile_id=obj_id,
|
lb_monitor_profile_id=obj_id,
|
||||||
display_name=name,
|
name=name,
|
||||||
tenant=TEST_TENANT)
|
tenant=TEST_TENANT)
|
||||||
expected_def = self.obj_def(
|
expected_def = self.obj_def(
|
||||||
lb_monitor_profile_id=obj_id,
|
lb_monitor_profile_id=obj_id,
|
||||||
display_name=name,
|
name=name,
|
||||||
tenant=TEST_TENANT)
|
tenant=TEST_TENANT)
|
||||||
self.assert_called_with_def(api_call, expected_def)
|
self.assert_called_with_def(api_call, expected_def)
|
||||||
self.assertEqual(obj_id, result)
|
self.assertEqual(obj_id, result)
|
||||||
|
@ -1138,11 +1138,11 @@ class TestPolicyLBMonitorProfileHttpApi(test_resources.NsxPolicyLibTestCase):
|
||||||
with mock.patch.object(self.policy_api,
|
with mock.patch.object(self.policy_api,
|
||||||
"create_or_update") as api_call:
|
"create_or_update") as api_call:
|
||||||
result = self.resourceApi.create_or_overwrite(
|
result = self.resourceApi.create_or_overwrite(
|
||||||
display_name=name,
|
name=name,
|
||||||
tenant=TEST_TENANT)
|
tenant=TEST_TENANT)
|
||||||
expected_def = self.obj_def(
|
expected_def = self.obj_def(
|
||||||
lb_monitor_profile_id=mock.ANY,
|
lb_monitor_profile_id=mock.ANY,
|
||||||
display_name=name,
|
name=name,
|
||||||
tenant=TEST_TENANT)
|
tenant=TEST_TENANT)
|
||||||
self.assert_called_with_def(api_call, expected_def)
|
self.assert_called_with_def(api_call, expected_def)
|
||||||
self.assertIsNotNone(result)
|
self.assertIsNotNone(result)
|
||||||
|
@ -1193,11 +1193,11 @@ class TestPolicyLBMonitorProfileHttpApi(test_resources.NsxPolicyLibTestCase):
|
||||||
with mock.patch.object(self.policy_api,
|
with mock.patch.object(self.policy_api,
|
||||||
"create_or_update") as update_call:
|
"create_or_update") as update_call:
|
||||||
self.resourceApi.update(obj_id,
|
self.resourceApi.update(obj_id,
|
||||||
display_name=name,
|
name=name,
|
||||||
tenant=TEST_TENANT)
|
tenant=TEST_TENANT)
|
||||||
expected_def = self.obj_def(
|
expected_def = self.obj_def(
|
||||||
lb_monitor_profile_id=obj_id,
|
lb_monitor_profile_id=obj_id,
|
||||||
display_name=name,
|
name=name,
|
||||||
tenant=TEST_TENANT)
|
tenant=TEST_TENANT)
|
||||||
self.assert_called_with_def(update_call, expected_def)
|
self.assert_called_with_def(update_call, expected_def)
|
||||||
|
|
||||||
|
|
|
@ -873,13 +873,13 @@ class NsxPolicyLBMonitorProfileBase(NsxPolicyResourceBase):
|
||||||
|
|
||||||
def update(self,
|
def update(self,
|
||||||
lb_monitor_profile_id,
|
lb_monitor_profile_id,
|
||||||
display_name=IGNORE,
|
name=IGNORE,
|
||||||
tags=IGNORE,
|
tags=IGNORE,
|
||||||
tenant=constants.POLICY_INFRA_TENANT,
|
tenant=constants.POLICY_INFRA_TENANT,
|
||||||
**kwargs):
|
**kwargs):
|
||||||
self._update(
|
self._update(
|
||||||
lb_monitor_profile_id=lb_monitor_profile_id,
|
lb_monitor_profile_id=lb_monitor_profile_id,
|
||||||
display_name=display_name,
|
name=name,
|
||||||
tags=tags,
|
tags=tags,
|
||||||
tenant=tenant,
|
tenant=tenant,
|
||||||
**kwargs)
|
**kwargs)
|
||||||
|
@ -897,7 +897,7 @@ class NsxPolicyLBMonitorProfileHttpApi(NsxPolicyLBMonitorProfileBase):
|
||||||
def create_or_overwrite(self,
|
def create_or_overwrite(self,
|
||||||
lb_monitor_profile_id=None,
|
lb_monitor_profile_id=None,
|
||||||
tags=IGNORE,
|
tags=IGNORE,
|
||||||
display_name=IGNORE,
|
name=IGNORE,
|
||||||
interval=IGNORE,
|
interval=IGNORE,
|
||||||
timeout=IGNORE,
|
timeout=IGNORE,
|
||||||
fall_count=IGNORE,
|
fall_count=IGNORE,
|
||||||
|
@ -914,7 +914,7 @@ class NsxPolicyLBMonitorProfileHttpApi(NsxPolicyLBMonitorProfileBase):
|
||||||
self).create_or_overwrite(
|
self).create_or_overwrite(
|
||||||
lb_monitor_profile_id=lb_monitor_profile_id,
|
lb_monitor_profile_id=lb_monitor_profile_id,
|
||||||
tags=tags,
|
tags=tags,
|
||||||
display_name=display_name,
|
name=name,
|
||||||
interval=interval,
|
interval=interval,
|
||||||
timeout=timeout,
|
timeout=timeout,
|
||||||
fall_count=fall_count,
|
fall_count=fall_count,
|
||||||
|
@ -931,7 +931,7 @@ class NsxPolicyLBMonitorProfileHttpApi(NsxPolicyLBMonitorProfileBase):
|
||||||
def update(self,
|
def update(self,
|
||||||
lb_monitor_profile_id,
|
lb_monitor_profile_id,
|
||||||
tags=IGNORE,
|
tags=IGNORE,
|
||||||
display_name=IGNORE,
|
name=IGNORE,
|
||||||
interval=IGNORE,
|
interval=IGNORE,
|
||||||
timeout=IGNORE,
|
timeout=IGNORE,
|
||||||
fall_count=IGNORE,
|
fall_count=IGNORE,
|
||||||
|
@ -947,7 +947,7 @@ class NsxPolicyLBMonitorProfileHttpApi(NsxPolicyLBMonitorProfileBase):
|
||||||
return super(NsxPolicyLBMonitorProfileHttpApi, self).update(
|
return super(NsxPolicyLBMonitorProfileHttpApi, self).update(
|
||||||
lb_monitor_profile_id=lb_monitor_profile_id,
|
lb_monitor_profile_id=lb_monitor_profile_id,
|
||||||
tags=tags,
|
tags=tags,
|
||||||
display_name=display_name,
|
name=name,
|
||||||
interval=interval,
|
interval=interval,
|
||||||
timeout=timeout,
|
timeout=timeout,
|
||||||
fall_count=fall_count,
|
fall_count=fall_count,
|
||||||
|
@ -980,7 +980,7 @@ class NsxPolicyLBMonitorProfileUdpApi(NsxPolicyLBMonitorProfileBase):
|
||||||
def create_or_overwrite(self,
|
def create_or_overwrite(self,
|
||||||
lb_monitor_profile_id=None,
|
lb_monitor_profile_id=None,
|
||||||
tags=IGNORE,
|
tags=IGNORE,
|
||||||
display_name=IGNORE,
|
name=IGNORE,
|
||||||
interval=IGNORE,
|
interval=IGNORE,
|
||||||
timeout=IGNORE,
|
timeout=IGNORE,
|
||||||
fall_count=IGNORE,
|
fall_count=IGNORE,
|
||||||
|
@ -993,7 +993,7 @@ class NsxPolicyLBMonitorProfileUdpApi(NsxPolicyLBMonitorProfileBase):
|
||||||
self).create_or_overwrite(
|
self).create_or_overwrite(
|
||||||
lb_monitor_profile_id=lb_monitor_profile_id,
|
lb_monitor_profile_id=lb_monitor_profile_id,
|
||||||
tags=tags,
|
tags=tags,
|
||||||
display_name=display_name,
|
name=name,
|
||||||
interval=interval,
|
interval=interval,
|
||||||
timeout=timeout,
|
timeout=timeout,
|
||||||
fall_count=fall_count,
|
fall_count=fall_count,
|
||||||
|
@ -1006,7 +1006,7 @@ class NsxPolicyLBMonitorProfileUdpApi(NsxPolicyLBMonitorProfileBase):
|
||||||
def update(self,
|
def update(self,
|
||||||
lb_monitor_profile_id,
|
lb_monitor_profile_id,
|
||||||
tags=IGNORE,
|
tags=IGNORE,
|
||||||
display_name=IGNORE,
|
name=IGNORE,
|
||||||
interval=IGNORE,
|
interval=IGNORE,
|
||||||
timeout=IGNORE,
|
timeout=IGNORE,
|
||||||
fall_count=IGNORE,
|
fall_count=IGNORE,
|
||||||
|
@ -1018,7 +1018,7 @@ class NsxPolicyLBMonitorProfileUdpApi(NsxPolicyLBMonitorProfileBase):
|
||||||
return super(NsxPolicyLBMonitorProfileUdpApi, self).update(
|
return super(NsxPolicyLBMonitorProfileUdpApi, self).update(
|
||||||
lb_monitor_profile_id=lb_monitor_profile_id,
|
lb_monitor_profile_id=lb_monitor_profile_id,
|
||||||
tags=tags,
|
tags=tags,
|
||||||
display_name=display_name,
|
name=name,
|
||||||
interval=interval,
|
interval=interval,
|
||||||
timeout=timeout,
|
timeout=timeout,
|
||||||
fall_count=fall_count,
|
fall_count=fall_count,
|
||||||
|
@ -1039,7 +1039,7 @@ class NsxPolicyLBMonitorProfileIcmpApi(NsxPolicyLBMonitorProfileBase):
|
||||||
def create_or_overwrite(self,
|
def create_or_overwrite(self,
|
||||||
lb_monitor_profile_id=None,
|
lb_monitor_profile_id=None,
|
||||||
tags=IGNORE,
|
tags=IGNORE,
|
||||||
display_name=IGNORE,
|
name=IGNORE,
|
||||||
interval=IGNORE,
|
interval=IGNORE,
|
||||||
timeout=IGNORE,
|
timeout=IGNORE,
|
||||||
fall_count=IGNORE,
|
fall_count=IGNORE,
|
||||||
|
@ -1049,7 +1049,7 @@ class NsxPolicyLBMonitorProfileIcmpApi(NsxPolicyLBMonitorProfileBase):
|
||||||
self).create_or_overwrite(
|
self).create_or_overwrite(
|
||||||
lb_monitor_profile_id=lb_monitor_profile_id,
|
lb_monitor_profile_id=lb_monitor_profile_id,
|
||||||
tags=tags,
|
tags=tags,
|
||||||
display_name=display_name,
|
name=name,
|
||||||
interval=interval,
|
interval=interval,
|
||||||
timeout=timeout,
|
timeout=timeout,
|
||||||
fall_count=fall_count,
|
fall_count=fall_count,
|
||||||
|
@ -1059,7 +1059,7 @@ class NsxPolicyLBMonitorProfileIcmpApi(NsxPolicyLBMonitorProfileBase):
|
||||||
def update(self,
|
def update(self,
|
||||||
lb_monitor_profile_id,
|
lb_monitor_profile_id,
|
||||||
tags=IGNORE,
|
tags=IGNORE,
|
||||||
display_name=IGNORE,
|
name=IGNORE,
|
||||||
interval=IGNORE,
|
interval=IGNORE,
|
||||||
timeout=IGNORE,
|
timeout=IGNORE,
|
||||||
fall_count=IGNORE,
|
fall_count=IGNORE,
|
||||||
|
@ -1068,7 +1068,7 @@ class NsxPolicyLBMonitorProfileIcmpApi(NsxPolicyLBMonitorProfileBase):
|
||||||
return super(NsxPolicyLBMonitorProfileIcmpApi, self).update(
|
return super(NsxPolicyLBMonitorProfileIcmpApi, self).update(
|
||||||
lb_monitor_profile_id=lb_monitor_profile_id,
|
lb_monitor_profile_id=lb_monitor_profile_id,
|
||||||
tags=tags,
|
tags=tags,
|
||||||
display_name=display_name,
|
name=name,
|
||||||
interval=interval,
|
interval=interval,
|
||||||
timeout=timeout,
|
timeout=timeout,
|
||||||
fall_count=fall_count,
|
fall_count=fall_count,
|
||||||
|
@ -1086,7 +1086,7 @@ class NsxPolicyLBMonitorProfileTcpApi(NsxPolicyLBMonitorProfileBase):
|
||||||
def create_or_overwrite(self,
|
def create_or_overwrite(self,
|
||||||
lb_monitor_profile_id=None,
|
lb_monitor_profile_id=None,
|
||||||
tags=IGNORE,
|
tags=IGNORE,
|
||||||
display_name=IGNORE,
|
name=IGNORE,
|
||||||
interval=IGNORE,
|
interval=IGNORE,
|
||||||
timeout=IGNORE,
|
timeout=IGNORE,
|
||||||
fall_count=IGNORE,
|
fall_count=IGNORE,
|
||||||
|
@ -1097,7 +1097,7 @@ class NsxPolicyLBMonitorProfileTcpApi(NsxPolicyLBMonitorProfileBase):
|
||||||
self).create_or_overwrite(
|
self).create_or_overwrite(
|
||||||
lb_monitor_profile_id=lb_monitor_profile_id,
|
lb_monitor_profile_id=lb_monitor_profile_id,
|
||||||
tags=tags,
|
tags=tags,
|
||||||
display_name=display_name,
|
name=name,
|
||||||
interval=interval,
|
interval=interval,
|
||||||
timeout=timeout,
|
timeout=timeout,
|
||||||
fall_count=fall_count,
|
fall_count=fall_count,
|
||||||
|
@ -1108,7 +1108,7 @@ class NsxPolicyLBMonitorProfileTcpApi(NsxPolicyLBMonitorProfileBase):
|
||||||
def update(self,
|
def update(self,
|
||||||
lb_monitor_profile_id,
|
lb_monitor_profile_id,
|
||||||
tags=IGNORE,
|
tags=IGNORE,
|
||||||
display_name=IGNORE,
|
name=IGNORE,
|
||||||
interval=IGNORE,
|
interval=IGNORE,
|
||||||
timeout=IGNORE,
|
timeout=IGNORE,
|
||||||
fall_count=IGNORE,
|
fall_count=IGNORE,
|
||||||
|
@ -1118,7 +1118,7 @@ class NsxPolicyLBMonitorProfileTcpApi(NsxPolicyLBMonitorProfileBase):
|
||||||
return super(NsxPolicyLBMonitorProfileTcpApi, self).update(
|
return super(NsxPolicyLBMonitorProfileTcpApi, self).update(
|
||||||
lb_monitor_profile_id=lb_monitor_profile_id,
|
lb_monitor_profile_id=lb_monitor_profile_id,
|
||||||
tags=tags,
|
tags=tags,
|
||||||
display_name=display_name,
|
name=name,
|
||||||
interval=interval,
|
interval=interval,
|
||||||
timeout=timeout,
|
timeout=timeout,
|
||||||
fall_count=fall_count,
|
fall_count=fall_count,
|
||||||
|
|
Loading…
Reference in New Issue