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

interface: add ip_mtu parameter with example #108

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 16 additions & 0 deletions plugins/modules/aoscx_interface.py
Original file line number Diff line number Diff line change
Expand Up @@ -186,6 +186,10 @@
- none
- global
required: false
ip_mtu:
description: Configure IP MTU value of the interface
type: int
required: false
state:
description: Create, Update or Delete the Interface.
type: str
Expand Down Expand Up @@ -300,6 +304,11 @@
aoscx_interface:
name: 1/1/17
mtu: 1300

- name: Set the IP MTU 9000 to the vlan23 Interface
aoscx_interface:
name: vlan23
mtu: 9000
"""

RETURN = r""" # """
Expand Down Expand Up @@ -449,6 +458,10 @@ def get_argument_spec():
},
},
},
"ip_mtu": {
"type": "int",
"required": False,
},
"state": {
"type": "str",
"required": False,
Expand Down Expand Up @@ -539,6 +552,7 @@ def main():
duplex = ansible_module.params["duplex"]
speeds = ansible_module.params["speeds"]

ip_mtu = ansible_module.params["ip_mtu"]
session = get_pyaoscx_session(ansible_module)
device = Device(session)

Expand Down Expand Up @@ -598,6 +612,8 @@ def main():
vsx_sync_features_mapping(feature) for feature in vsx_sync
]
interface.vsx_sync = clean_vsx_features
if ip_mtu:
interface.ip_mtu_value = ip_mtu

modified |= interface.apply()
if acl_type:
Expand Down