ansible-collections/cisco.nxos

When removing Speed and Duplex order of operations yields error: ERROR: Duplex is not Compatible with Speed

Opened this issue · 0 comments

SUMMARY

When speed and duplex settings are removed in nxos_interfaces the order of operations should be to delete duplex first and then speed. Otherwise NXOS gives an error.

router01(config)# interface ethernet 1/9
router01(config-if)# no speed
ERROR: Duplex is not Compatible with Speed

ISSUE TYPE
  • Bug Report
COMPONENT NAME

cisco.nxos.nxos_interfaces:

ANSIBLE VERSION
ansible-prod % ansible --version
ansible [core 2.15.8]
COLLECTION VERSION
8.1.0
CONFIGURATION
no diff
OS / ENVIRONMENT

Ansible EE image

STEPS TO REPRODUCE

Try to run a config with speed and duplex to auto on an interface that currently is set to 100/full (manual)

  - description: some device
    duplex: full
    enabled: true
    mode: layer2
    name: Ethernet1/5
    speed: '100'
    
 Then after that configure this with duplex and speed removed (default auto)
 
   - description: some device
    enabled: true
    mode: layer2
    name: Ethernet1/5

 
EXPECTED RESULTS

when casting "speed" and "duplex"

When configuring

  1. Speed
  2. Duplex

When removing (no speed)

  1. Duplex
  2. Speed
ACTUAL RESULTS

Module tries to delete speed first and gets error from device:

ERROR: Duplex is not Compatible with Speed

Possible solution??

in line 380 change the order of operations? I'm not super aware of how this codebase works, but looks like the right area