VLAN ID and trunk spec are exclusive - can only set one
We should only set one - the vlan id or the trunk spec. The trunk spec will have precedence. Change-Id: Id62cad5b2c7b5caa8c817039819114806281746d
This commit is contained in:
parent
aafdcc3929
commit
354ea46ac1
@ -137,12 +137,6 @@ class NsxLibLogicalSwitch(utils.NsxLibApiBase):
|
|||||||
else:
|
else:
|
||||||
body['admin_state'] = nsx_constants.ADMIN_STATE_DOWN
|
body['admin_state'] = nsx_constants.ADMIN_STATE_DOWN
|
||||||
|
|
||||||
if vlan_id:
|
|
||||||
body['vlan'] = vlan_id
|
|
||||||
|
|
||||||
# trunk_vlan_range is mutually exclusive with vlan_id
|
|
||||||
# For guest vlan tagging it is allowed for overlay networks
|
|
||||||
# TODO(asarfaty): check network type? different for ENS?
|
|
||||||
if trunk_vlan_range:
|
if trunk_vlan_range:
|
||||||
failed = False
|
failed = False
|
||||||
if (self.nsxlib and
|
if (self.nsxlib and
|
||||||
@ -173,6 +167,8 @@ class NsxLibLogicalSwitch(utils.NsxLibApiBase):
|
|||||||
operation=operation,
|
operation=operation,
|
||||||
arg_val=trunk_vlan_range,
|
arg_val=trunk_vlan_range,
|
||||||
arg_name='trunk_vlan_range')
|
arg_name='trunk_vlan_range')
|
||||||
|
elif vlan_id:
|
||||||
|
body['vlan'] = vlan_id
|
||||||
|
|
||||||
if ip_pool_id:
|
if ip_pool_id:
|
||||||
body['ip_pool_id'] = ip_pool_id
|
body['ip_pool_id'] = ip_pool_id
|
||||||
|
Loading…
Reference in New Issue
Block a user