extreme / extreme.exos / 0.1.1 / module / exos_interfaces Manage interface attributes on EXOS platforms Authors: Jayalakshmi Viswanathan (@jayalakshmiV) preview | supported by communityextreme.exos.exos_interfaces (0.1.1) — module
Install with ansible-galaxy collection install extreme.exos:==0.1.1
collections: - name: extreme.exos version: 0.1.1
This module provides declarative management of interface attributes on Extreme Networks EXOS network devices.
# Using deleted # Before state: # ------------- # path: /rest/restconf/data/openconfig-interfaces:interfaces/ # method: GET # data: # { # "openconfig-interfaces:interfaces": { # "interface": [ # { # "config": { # "description": "Port 1", # "enabled": true, # "name": "1", # }, # "openconfig-if-ethernet:ethernet": { # "config": { # "auto-negotiate": true, # "duplex-mode": "FULL", # "port-speed": "SPEED_1GB" # }, # }, # { # "config": { # "description": "Port 2", # "enabled": true, # "name": "2", # }, # "openconfig-if-ethernet:ethernet": { # "config": { # "auto-negotiate": true, # "duplex-mode": "FULL", # "port-speed": "SPEED_1GB" # }, # } # ] # } # } # # vexos# show ports 1 info detail | grep Jumbo # Jumbo: Enabled # vexos# show ports 2 info detail | grep Jumbo # Jumbo: Enabled - name: Delete interface configuration for the given arguments exos_interfaces: config: - name: '2' state: deleted
# Module Execution Results: # ------------------------- # # "before": [ # { # "enabled": true, # "description": "Port 1", # "duplex": "FULL", # "jumbo_frames": { # "enabled": true # }, # "name": "1", # "speed": "SPEED_1GB" # }, # { # "enabled": true, # "description": "Port 2", # "duplex": "FULL", # "jumbo_frames": { # "enabled": true # }, # "name": "2", # "speed": "SPEED_1GB" # } # ], # # "requests": [ # { # "data": { # "openconfig-interfaces:config": { # "description": "" # } # } # "method": "PATCH", # "path": "rest/restconf/data/openconfig-interfaces:interfaces/interface=2/config" # } # ], # # "commands": [ # { # "disable jumbo-frame ports 2", # "configure ports 2 auto on" # } # ], # # "after": [ # { # "enabled": true, # "description": "Port 1", # "duplex": "FULL", # "jumbo_frames": { # "enabled": true # }, # "name": "1", # "speed": "SPEED_1GB" # }, # { # "enabled": true, # "description": "", # "duplex": "FULL", # "jumbo_frames": { # "enabled": false # }, # "name": "2", # "speed": "SPEED_UNKNOWN" # } # ] # # After state: # ------------- # # path: /rest/restconf/data/openconfig-interfaces:interfaces/ # method: GET # data: # { # "openconfig-interfaces:interfaces": { # "interface": [ # { # "config": { # "description": "Port 1", # "enabled": true, # "name": "1", # }, # "openconfig-if-ethernet:ethernet": { # "config": { # "auto-negotiate": true, # "duplex-mode": "FULL", # "port-speed": "SPEED_1GB" # }, # }, # { # "config": { # "description": "", # "enabled": true, # "name": "2", # }, # "openconfig-if-ethernet:ethernet": { # "config": { # "auto-negotiate": true, # "duplex-mode": "FULL", # "port-speed": "SPEED_UNKNOWN" # }, # } # ] # } # } # # vexos# show ports 1 info detail | grep Jumbo # Jumbo: Enabled # vexos# show ports 2 info detail | grep Jumbo # Jumbo: Disabled # Using deleted without any config passed #"(NOTE: This will delete all of configured resource module attributes from each configured interface)" # Before state: # ------------- # path: /rest/restconf/data/openconfig-interfaces:interfaces/ # method: GET # data: # { # "openconfig-interfaces:interfaces": { # "interface": [ # { # "config": { # "description": "Port 1", # "enabled": true, # "name": "1", # }, # "openconfig-if-ethernet:ethernet": { # "config": { # "auto-negotiate": true, # "duplex-mode": "FULL", # "port-speed": "SPEED_1GB" # }, # }, # { # "config": { # "description": "Port 2", # "enabled": true, # "name": "2", # }, # "openconfig-if-ethernet:ethernet": { # "config": { # "auto-negotiate": true, # "duplex-mode": "FULL", # "port-speed": "SPEED_1GB" # }, # } # ] # } # } # # vexos# show ports 1 info detail | grep Jumbo # Jumbo: Enabled # vexos# show ports 2 info detail | grep Jumbo # Jumbo: Enabled - name: Delete interface configuration for the given arguments exos_interfaces: state: deleted
# Module Execution Results: # ------------------------- # # "before": [ # { # "enabled": true, # "description": "Port 1", # "duplex": "FULL", # "jumbo_frames": { # "enabled": true # }, # "name": "1", # "speed": "SPEED_1GB" # }, # { # "enabled": true, # "description": "Port 2", # "duplex": "FULL", # "jumbo_frames": { # "enabled": true # }, # "name": "2", # "speed": "SPEED_1GB" # } # ], # # "requests": [ # { # "data": { # "openconfig-interfaces:config": { # "description": "" # } # } # "method": "PATCH", # "path": "rest/restconf/data/openconfig-interfaces:interfaces/interface=1/config" # }, # { # "data": { # "openconfig-interfaces:config": { # "description": "" # } # } # "method": "PATCH", # "path": "rest/restconf/data/openconfig-interfaces:interfaces/interface=2/config" # } # ], # # "commands": [ # { # "disable jumbo-frame ports 1", # "configure ports 1 auto on", # "disable jumbo-frame ports 2", # "configure ports 2 auto on" # } # ], # # "after": [ # { # "enabled": true, # "description": "", # "duplex": "FULL", # "jumbo_frames": { # "enabled": false # }, # "name": "1", # "speed": "SPEED_UNKNOWN" # }, # { # "enabled": true, # "description": "", # "duplex": "FULL", # "jumbo_frames": { # "enabled": false # }, # "name": "2", # "speed": "SPEED_UNKNOWN" # } # ] # # After state: # ------------- # # path: /rest/restconf/data/openconfig-interfaces:interfaces/ # method: GET # data: # { # "openconfig-interfaces:interfaces": { # "interface": [ # { # "config": { # "description": "", # "enabled": true, # "name": "1", # }, # "openconfig-if-ethernet:ethernet": { # "config": { # "auto-negotiate": true, # "duplex-mode": "FULL", # "port-speed": "SPEED_UNKNOWN" # }, # }, # { # "config": { # "description": "", # "enabled": true, # "name": "2", # }, # "openconfig-if-ethernet:ethernet": { # "config": { # "auto-negotiate": true, # "duplex-mode": "FULL", # "port-speed": "SPEED_UNKNOWN" # }, # } # ] # } # } # # vexos# show ports 1 info detail | grep Jumbo # Jumbo: Disabled # vexos# show ports 2 info detail | grep Jumbo # Jumbo: Disabled # Using merged # Before state: # ------------- # path: /rest/restconf/data/openconfig-interfaces:interfaces/ # method: GET # data: # { # "openconfig-interfaces:interfaces": { # "interface": [ # { # "config": { # "description": "Port 1", # "enabled": true, # "name": "1", # }, # "openconfig-if-ethernet:ethernet": { # "config": { # "auto-negotiate": true, # "duplex-mode": "FULL", # "port-speed": "SPEED_1GB" # }, # }, # { # "config": { # "description": "Port 2", # "enabled": true, # "name": "2", # }, # "openconfig-if-ethernet:ethernet": { # "config": { # "auto-negotiate": true, # "duplex-mode": "FULL", # "port-speed": "SPEED_1GB" # }, # } # ] # } # } # # vexos# show ports 1 info detail | grep Jumbo # Jumbo: Enabled # vexos# show ports 2 info detail | grep Jumbo # Jumbo: Enabled - name: Merge provided interface configuration with the device configuration exos_interfaces: config: - name: "1" enabled: false jumbo_frames: enabled: false - name: "2" description: "Interface 2" speed: "SPEED_100MB" duplex: "FULL" state: merged
# Module Execution Results: # ------------------------- # # "before": [ # { # "enabled": true, # "description": "Port 1", # "duplex": "FULL", # "jumbo_frames": { # "enabled": true # }, # "name": "1", # "speed": "SPEED_1GB" # }, # { # "enabled": true, # "description": "Port 2", # "duplex": "FULL", # "jumbo_frames": { # "enabled": true # }, # "name": "2", # "speed": "SPEED_1GB" # } # ], # # "requests": [ # { # "data": { # "openconfig-interfaces:config": { # "enabled": false # } # } # "method": "PATCH", # "path": "rest/restconf/data/openconfig-interfaces:interfaces/interface=1/config" # }, # { # "data": { # "openconfig-interfaces:config": { # "description": "Interface 2" # } # } # "method": "PATCH", # "path": "rest/restconf/data/openconfig-interfaces:interfaces/interface=2/config" # }, # { # "data": { # "openconfig-if-ethernet:config": { # "auto-negotiate": true, # "port-speed": "SPEED_100MB", # "duplex-mode": "FULL" # } # "method": "PATCH", # "path": "rest/restconf/data/openconfig-interfaces:interfaces/interface=2/openconfig-if-ethernet:ethernet/config" # } # ], # # "commands": [ # { # "disable jumbo-frame ports 1" # } # ], # # "after": [ # { # "enabled": false, # "description": "Port 1", # "duplex": "FULL", # "jumbo_frames": { # "enabled": false # }, # "name": "1", # "speed": "SPEED_1GB" # }, # { # "enabled": true, # "description": "Interface 2", # "duplex": "FULL", # "jumbo_frames": { # "enabled": true # }, # "name": "2", # "speed": "SPEED_100MB" # } # ] # # After state: # ------------- # # path: /rest/restconf/data/openconfig-interfaces:interfaces/ # method: GET # data: # { # "openconfig-interfaces:interfaces": { # "interface": [ # { # "config": { # "description": "Port 1", # "enabled": false, # "name": "1", # }, # "openconfig-if-ethernet:ethernet": { # "config": { # "auto-negotiate": true, # "duplex-mode": "FULL", # "port-speed": "SPEED_1GB" # }, # }, # { # "config": { # "description": "Interface 2", # "enabled": true, # "name": "2", # }, # "openconfig-if-ethernet:ethernet": { # "config": { # "auto-negotiate": true, # "duplex-mode": "FULL", # "port-speed": "SPEED_100MB" # }, # } # ] # } # } # # vexos# show ports 1 info detail | grep Jumbo # Jumbo: Disabled # vexos# show ports 2 info detail | grep Jumbo # Jumbo: Enabled # Using overridden # Before state: # ------------- # path: /rest/restconf/data/openconfig-interfaces:interfaces/ # method: GET # data: # { # "openconfig-interfaces:interfaces": { # "interface": [ # { # "config": { # "description": "Port 1", # "enabled": true, # "name": "1", # }, # "openconfig-if-ethernet:ethernet": { # "config": { # "auto-negotiate": true, # "duplex-mode": "FULL", # "port-speed": "SPEED_1GB" # }, # }, # { # "config": { # "description": "Port 2", # "enabled": true, # "name": "2", # }, # "openconfig-if-ethernet:ethernet": { # "config": { # "auto-negotiate": true, # "duplex-mode": "FULL", # "port-speed": "SPEED_1GB" # }, # } # ] # } # } # # vexos# show ports 1 info detail | grep Jumbo # Jumbo: Enabled # vexos# show ports 2 info detail | grep Jumbo # Jumbo: Enabled - name: Override device configuration with the provided interface configuration exos_interfaces: config: - name: "1" description: "Interface 1" speed: "SPEED_100MB" duplex: "FULL" state: overridden
# Module Execution Results: # ------------------------- # # "before": [ # { # "enabled": true, # "description": "Port 1", # "duplex": "FULL", # "jumbo_frames": { # "enabled": true # }, # "name": "1", # "speed": "SPEED_1GB" # }, # { # "enabled": true, # "description": "Port 2", # "duplex": "FULL", # "jumbo_frames": { # "enabled": true # }, # "name": "2", # "speed": "SPEED_1GB" # } # ], # # "requests": [ # { # "data": { # "openconfig-interfaces:config": { # "description": "Interface 1" # } # } # "method": "PATCH", # "path": "rest/restconf/data/openconfig-interfaces:interfaces/interface=1/config" # }, # { # "data": { # "openconfig-if-ethernet:config": { # "auto-negotiate": true, # "port-speed": "SPEED_100MB", # "duplex-mode": "FULL" # } # "method": "PATCH", # "path": "rest/restconf/data/openconfig-interfaces:interfaces/interface=1/openconfig-if-ethernet:ethernet/config" # }, # { # "data": { # "openconfig-interfaces:config": { # "description": "" # } # } # "method": "PATCH", # "path": "rest/restconf/data/openconfig-interfaces:interfaces/interface=2/config" # } # ], # # "commands": [ # { # "disable jumbo-frame ports 2", # "configure ports 2 auto on" # } # ], # # "after": [ # { # "enabled": true, # "description": "Interface 1", # "duplex": "FULL", # "jumbo_frames": { # "enabled": true # }, # "name": "1", # "speed": "SPEED_100MB" # }, # { # "enabled": true, # "description": "", # "duplex": "FULL", # "jumbo_frames": { # "enabled": false # }, # "name": "2", # "speed": "SPEED_UNKNOWN" # } # ] # # After state: # ------------- # # path: /rest/restconf/data/openconfig-interfaces:interfaces/ # method: GET # data: # { # "openconfig-interfaces:interfaces": { # "interface": [ # { # "config": { # "description": "Interface 1", # "enabled": true, # "name": "1", # }, # "openconfig-if-ethernet:ethernet": { # "config": { # "auto-negotiate": true, # "duplex-mode": "FULL", # "port-speed": "SPEED_100MB" # }, # }, # { # "config": { # "description": "", # "enabled": true, # "name": "2", # }, # "openconfig-if-ethernet:ethernet": { # "config": { # "auto-negotiate": true, # "duplex-mode": "FULL", # "port-speed": "SPEED_UNKNOWN" # }, # } # ] # } # } # # vexos# show ports 1 info detail | grep Jumbo # Jumbo: Enabled # vexos# show ports 2 info detail | grep Jumbo # Jumbo: Disabled # Using replaced # Before state: # ------------- # path: /rest/restconf/data/openconfig-interfaces:interfaces/ # method: GET # data: # { # "openconfig-interfaces:interfaces": { # "interface": [ # { # "config": { # "description": "Port 1", # "enabled": true, # "name": "1", # }, # "openconfig-if-ethernet:ethernet": { # "config": { # "auto-negotiate": true, # "duplex-mode": "FULL", # "port-speed": "SPEED_1GB" # }, # }, # { # "config": { # "description": "Port 2", # "enabled": true, # "name": "2", # }, # "openconfig-if-ethernet:ethernet": { # "config": { # "auto-negotiate": true, # "duplex-mode": "FULL", # "port-speed": "SPEED_1GB" # }, # } # ] # } # } # # vexos# show ports 1 info detail | grep Jumbo # Jumbo: Enabled # vexos# show ports 2 info detail | grep Jumbo # Jumbo: Enabled - name: Replace device configuration with the provided interface configuration exos_interfaces: config: - name: "1" description: "Interface 1" - name: "2" speed: "SPEED_10GB" duplex: "FULL" jumbo_frames: enabled: false state: replaced
state: choices: - merged - replaced - overridden - deleted default: merged description: - The state the configuration should be left in type: str config: description: A dictionary of interface options elements: dict suboptions: description: description: - Interface description. type: str duplex: choices: - FULL - HALF - AUTO description: - Interface link status. Applicable for Ethernet interfaces only, either in half duplex, full duplex or in automatic state which negotiates the duplex automatically. type: str enabled: description: - Administrative state of the interface. Set the value to true to administratively enable the interface or false to disable it. type: bool jumbo_frames: description: - Jumbo frames support on the interface. suboptions: enabled: default: false description: - Enabling jumbo frame support on the interface. type: bool type: dict name: description: - Full name of the interface. required: true type: str speed: description: - Interface link speed. Applicable for Ethernet interfaces only. type: str type: list
after: description: The resulting configuration model invocation. returned: when changed sample: "The configuration returned will always be in the same format\n of the parameters\ \ above.\n" type: list before: description: The configuration prior to the model invocation. returned: always sample: "The configuration returned will always be in the same format\n of the parameters\ \ above.\n" type: list commands: description: The set of commands pushed to the remote device. returned: always sample: - command 1 - command 2 - command 3 type: list requests: description: The set of requests pushed to the remote device. returned: always sample: - data: '...' method: '...' path: '...' - data: '...' method: '...' path: '...' - data: '...' method: '...' path: '...' type: list