|
|
@ -185,6 +185,10 @@ def map_params_to_obj(module):
|
|
|
|
item[key] = module.params[key]
|
|
|
|
item[key] = module.params[key]
|
|
|
|
|
|
|
|
|
|
|
|
d = item.copy()
|
|
|
|
d = item.copy()
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
if not d['vlan_id']:
|
|
|
|
|
|
|
|
module.fail_json(msg='vlan_id is required')
|
|
|
|
|
|
|
|
|
|
|
|
d['vlan_id'] = str(d['vlan_id'])
|
|
|
|
d['vlan_id'] = str(d['vlan_id'])
|
|
|
|
module._check_required_one_of(module.required_one_of, item)
|
|
|
|
module._check_required_one_of(module.required_one_of, item)
|
|
|
|
|
|
|
|
|
|
|
@ -269,7 +273,7 @@ def main():
|
|
|
|
""" main entry point for module execution
|
|
|
|
""" main entry point for module execution
|
|
|
|
"""
|
|
|
|
"""
|
|
|
|
element_spec = dict(
|
|
|
|
element_spec = dict(
|
|
|
|
vlan_id=dict(type='int', required=True),
|
|
|
|
vlan_id=dict(type='int'),
|
|
|
|
name=dict(),
|
|
|
|
name=dict(),
|
|
|
|
address=dict(),
|
|
|
|
address=dict(),
|
|
|
|
interfaces=dict(type='list'),
|
|
|
|
interfaces=dict(type='list'),
|
|
|
@ -293,7 +297,7 @@ def main():
|
|
|
|
argument_spec.update(vyos_argument_spec)
|
|
|
|
argument_spec.update(vyos_argument_spec)
|
|
|
|
|
|
|
|
|
|
|
|
required_one_of = [['vlan_id', 'aggregate'],
|
|
|
|
required_one_of = [['vlan_id', 'aggregate'],
|
|
|
|
['interfaces', 'associated_interfaces']]
|
|
|
|
['aggregate', 'interfaces', 'associated_interfaces']]
|
|
|
|
|
|
|
|
|
|
|
|
mutually_exclusive = [['vlan_id', 'aggregate']]
|
|
|
|
mutually_exclusive = [['vlan_id', 'aggregate']]
|
|
|
|
module = AnsibleModule(argument_spec=argument_spec,
|
|
|
|
module = AnsibleModule(argument_spec=argument_spec,
|
|
|
|