Correct SegmentPort init_state enum
VIF_RESTORE to RESTORE_VIF Change-Id: I12470d6ad96a263a6e7adb98aa397f3f9c652ebc
This commit is contained in:
parent
cc782b4d10
commit
175f5faca4
|
@ -4650,7 +4650,7 @@ class TestPolicySegmentPort(NsxPolicyLibTestCase):
|
||||||
tags = [{'scope': 'a', 'tag': 'b'}]
|
tags = [{'scope': 'a', 'tag': 'b'}]
|
||||||
hyperbus_mode = 'DISABLE'
|
hyperbus_mode = 'DISABLE'
|
||||||
admin_state = True
|
admin_state = True
|
||||||
init_state = 'VIF_RESTORE'
|
init_state = 'RESTORE_VIF'
|
||||||
|
|
||||||
with mock.patch.object(
|
with mock.patch.object(
|
||||||
self.policy_api, "create_or_update") as api_call, \
|
self.policy_api, "create_or_update") as api_call, \
|
||||||
|
@ -4702,7 +4702,7 @@ class TestPolicySegmentPort(NsxPolicyLibTestCase):
|
||||||
allocate_addresses = "BOTH"
|
allocate_addresses = "BOTH"
|
||||||
tags = [{'scope': 'a', 'tag': 'b'}]
|
tags = [{'scope': 'a', 'tag': 'b'}]
|
||||||
hyperbus_mode = 'DISABLE'
|
hyperbus_mode = 'DISABLE'
|
||||||
init_state = 'VIF_RESTORE'
|
init_state = 'RESTORE_VIF'
|
||||||
|
|
||||||
with mock.patch.object(
|
with mock.patch.object(
|
||||||
self.policy_api, "create_or_update") as api_call, \
|
self.policy_api, "create_or_update") as api_call, \
|
||||||
|
|
|
@ -35,7 +35,7 @@ ALLOCATE_ADDRESS_NONE = "None"
|
||||||
|
|
||||||
# SegmentPort init_state types
|
# SegmentPort init_state types
|
||||||
INIT_STATE_UNBLOCKED_VLAN = 'UNBLOCKED_VLAN'
|
INIT_STATE_UNBLOCKED_VLAN = 'UNBLOCKED_VLAN'
|
||||||
INIT_STATE_VIF_RESTORE = 'VIF_RESTORE'
|
INIT_STATE_RESTORE_VIF = 'RESTORE_VIF'
|
||||||
|
|
||||||
# NSXv3 L2 Gateway constants
|
# NSXv3 L2 Gateway constants
|
||||||
BRIDGE_ENDPOINT = "BRIDGEENDPOINT"
|
BRIDGE_ENDPOINT = "BRIDGEENDPOINT"
|
||||||
|
|
|
@ -1156,7 +1156,7 @@ class SegmentPortDef(ResourceDef):
|
||||||
if (self.has_attr('init_state') and
|
if (self.has_attr('init_state') and
|
||||||
self._version_dependant_attr_supported('init_state')):
|
self._version_dependant_attr_supported('init_state')):
|
||||||
valid_list = [nsx_constants.INIT_STATE_UNBLOCKED_VLAN,
|
valid_list = [nsx_constants.INIT_STATE_UNBLOCKED_VLAN,
|
||||||
nsx_constants.INIT_STATE_VIF_RESTORE]
|
nsx_constants.INIT_STATE_RESTORE_VIF]
|
||||||
init_state = self.get_attr('init_state')
|
init_state = self.get_attr('init_state')
|
||||||
if init_state not in valid_list:
|
if init_state not in valid_list:
|
||||||
raise exceptions.InvalidInput(
|
raise exceptions.InvalidInput(
|
||||||
|
|
Loading…
Reference in New Issue