ansible-dcnm icon indicating copy to clipboard operation
ansible-dcnm copied to clipboard

Unable to change Interface speed using dcnm_interface

Open rrahimm opened this issue 1 year ago • 0 comments

Issue Description:

Unable to change Interface speed using dcnm_interface.

Unable to change Interface speed using dcnm_interface when the only parameter being changed is Speed. But if we attempt to change one more parameter along with speed, then both parameters get updated.

Community Note

  • Please vote on this issue by adding a 👍 reaction to the original issue to help the community and maintainers prioritize this request
  • Please do not leave "+1" or other comments that do not add relevant new information or questions, they generate extra noise for issue followers and do not help prioritize the request
  • If you are interested in working on this issue or have submitted a pull request, please leave a comment

Ansible Version and collection version

ansible 2.13.9 1e80e4319f

collections:

  • name: ansible.utils version: 2.11.0
  • name: ansible.netcommon version: 5.3.0
  • name: cisco.nxos version: 5.3.0
  • name: https://github.com/CiscoDevNet/ansible-dcnm.git version: main

DCNM version

  • V 12.1.3b

Affected module(s)

  • dcnm_interface

Ansible Playbook

- name: Manage Interface Routed
  cisco.dcnm.dcnm_interface:
    fabric: "{{ MD.fabric.name }}"
    state: replaced
    config:
      - name : Ethernet1/11
  		type: eth
  		switch: 
  		  - 192.168.123.59
  		deploy: false
  		profile:
  		  admin_state: True
  		  mode: 'routed'
  		  ipv4_addr: 192.168.57.1
  		  ipv4_mask_len: 24
  		  ipv6_addr: 2021:10:1:1::1
  		  ipv6_mask_len: 64
  		  description: topology_switch_routed_interface
  		  route_tag: 12345
  		  int_vrf: NetAsCodeVrf1
  		  mtu: 1500
  		  speed: 1Gb

Debug Output

TASK [cisco.nac_dc_vxlan.create : Manage Interface Routed] ***************************************************************
task path: /interfaces.yml:51
ok: [netascode_fabric2] => {
    "changed": false,
    "diff": [
        {
            "debugs": [],
            "deferred": [],
            "delete_deploy": [],
            "deleted": [],
            "deploy": [],
            "merged": [],
            "overridden": [],
            "query": [],
            "replaced": [],
            "skipped": []
        }
    ],
    "invocation": {
        "module_args": {
            "check_deploy": false,
            "config": [
                {
                    "deploy": false,
                    "name": "Ethernet1/11",
                    "profile": {
                        "admin_state": true,
                        "description": "topology_switch_routed_interface",
                        "int_vrf": "NetAsCodeVrf1",
                        "ipv4_addr": "192.168.57.1",
                        "ipv4_mask_len": 24,
                        "ipv6_addr": "2021:10:1:1::1",
                        "ipv6_mask_len": 64,
                        "mode": "routed",
                        "mtu": 1500,
                        "route_tag": 12345,
                        "speed": "1Gb"
                    },
                    "switch": [
                        "192.168.123.59"
                    ],
                    "type": "eth"
                }
            ],
            "deploy": true,
            "fabric": "netascode_fabric2",
            "state": "replaced"
        }
    },
    "response": []
} 

Expected Behavior

The Interface speed should have been updated to 1GB, but it was not.

Actual Behavior

when i also intended to update the description alongside Speed in one go, then both speed and description got updated.

TASK [cisco.nac_dc_vxlan.create : Manage Interface Routed] ***************************************************************
/interfaces.yml:51
changed: [netascode_fabric2] => {
    "changed": true,
    "diff": [
        {
            "debugs": [],
            "deferred": [],
            "delete_deploy": [],
            "deleted": [],
            "deploy": [],
            "merged": [],
            "overridden": [],
            "query": [],
            "replaced": [
                {
                    "interfaceType": "INTERFACE_ETHERNET",
                    "interfaces": [
                        {
                            "ifName": "Ethernet1/11",
                            "nvPairs": {
                                "DESC": "topology_switch_routed_interface_1",
                                "SPEED": "1Gb"
                            }
                        }
                    ]
                }
            ],
            "skipped": []
        }
    ],
    "invocation": {
        "module_args": {
            "check_deploy": false,
            "config": [
                {
                    "deploy": false,
                    "name": "Ethernet1/11",
                    "profile": {
                        "admin_state": true,
                        "description": "topology_switch_routed_interface_1",
                        "int_vrf": "NetAsCodeVrf1",
                        "ipv4_addr": "192.168.57.1",
                        "ipv4_mask_len": 24,
                        "ipv6_addr": "2021:10:1:1::1",
                        "ipv6_mask_len": 64,
                        "mode": "routed",
                        "mtu": 1500,
                        "route_tag": 12345,
                        "speed": "1Gb"
                    },
                    "switch": [
                        "192.168.123.59"
                    ],
                    "type": "eth"
                }
            ],
            "deploy": true,
            "fabric": "netascode_fabric2",
            "state": "replaced"
        }
    },
    "response": [
        {
            "DATA": {},
            "MESSAGE": "OK",
            "METHOD": "PUT",
            "REQUEST_PATH": "https://10.10.10.10:443/appcenter/cisco/ndfc/api/v1/lan-fabric/rest/interface",
            "RETURN_CODE": 200
        }
    ]
} 

Steps to Reproduce

Run the Ansible Playbook above against any interface ethernet.

References

rrahimm avatar Mar 13 '24 16:03 rrahimm