Fix bug of interface-mode in Junos (#44380)

* Fix bug of interface-mode in Junos

* Fix typo. Thanks webknjaz.
pull/44904/head
linnil1 6 years ago committed by Ganesh Nalawade
parent d11e078366
commit d89a1be011

@ -48,6 +48,12 @@ options:
description:
- Native VLAN to be configured in trunk port. The value of C(native_vlan)
should be vlan id.
enhanced_layer:
description:
- True if your device has Enhanced Layer 2 Software (ELS).
default: True
type: bool
version_added: "2.7"
unit:
description:
- Logical interface number. Value of C(unit) should be of type
@ -172,6 +178,7 @@ def main():
trunk_vlans=dict(type='list'),
unit=dict(default=0, type='int'),
description=dict(),
enhanced_layer=dict(default=True, type='bool'),
state=dict(default='present', choices=['present', 'absent']),
active=dict(default=True, type='bool')
)
@ -235,6 +242,9 @@ def main():
validate_param_values(module, param_to_xpath_map, param=item)
param_to_xpath_map['mode']['xpath'] = \
'interface-mode' if param['enhanced_layer'] else 'port-mode'
want = map_params_to_obj(module, param_to_xpath_map, param=item)
requests.append(map_obj_to_ele(module, want, top, param=item))

Loading…
Cancel
Save