openvswitch_bridge: Check VLAN ID only under fake bridge (#3374)
This commit is contained in:
parent
6cfb44b4bb
commit
cc95bc4935
1 changed files with 5 additions and 5 deletions
|
@ -101,11 +101,11 @@ class OVSBridge(object):
|
|||
self.timeout = module.params['timeout']
|
||||
self.fail_mode = module.params['fail_mode']
|
||||
|
||||
if self.parent and self.vlan is None:
|
||||
self.module.fail_json(msg='VLAN id must be set when parent is defined')
|
||||
|
||||
if self.vlan < 0 or self.vlan > 4095:
|
||||
self.module.fail_json(msg='Invalid VLAN ID (must be between 0 and 4095)')
|
||||
if self.parent:
|
||||
if self.vlan is None:
|
||||
self.module.fail_json(msg='VLAN id must be set when parent is defined')
|
||||
elif self.vlan < 0 or self.vlan > 4095:
|
||||
self.module.fail_json(msg='Invalid VLAN ID (must be between 0 and 4095)')
|
||||
|
||||
def _vsctl(self, command):
|
||||
'''Run ovs-vsctl command'''
|
||||
|
|
Loading…
Reference in a new issue