Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix bug of interface-mode in Junos #44380

Merged
merged 2 commits into from
Aug 30, 2018
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
10 changes: 10 additions & 0 deletions lib/ansible/modules/network/junos/junos_l2_interface.py
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,12 @@
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
Expand Down Expand Up @@ -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')
)
Expand Down Expand Up @@ -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))

Expand Down