mirror of
https://github.com/ansible-collections/community.general.git
synced 2024-09-14 20:13:21 +02:00
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,10 +101,10 @@ class OVSBridge(object):
|
||||||
self.timeout = module.params['timeout']
|
self.timeout = module.params['timeout']
|
||||||
self.fail_mode = module.params['fail_mode']
|
self.fail_mode = module.params['fail_mode']
|
||||||
|
|
||||||
if self.parent and self.vlan is None:
|
if self.parent:
|
||||||
|
if self.vlan is None:
|
||||||
self.module.fail_json(msg='VLAN id must be set when parent is defined')
|
self.module.fail_json(msg='VLAN id must be set when parent is defined')
|
||||||
|
elif self.vlan < 0 or self.vlan > 4095:
|
||||||
if self.vlan < 0 or self.vlan > 4095:
|
|
||||||
self.module.fail_json(msg='Invalid VLAN ID (must be between 0 and 4095)')
|
self.module.fail_json(msg='Invalid VLAN ID (must be between 0 and 4095)')
|
||||||
|
|
||||||
def _vsctl(self, command):
|
def _vsctl(self, command):
|
||||||
|
|
Loading…
Reference in a new issue