ansible-collections / cisco.nxos

Ansible Network Collection for Cisco NXOS
GNU General Public License v3.0
116 stars 109 forks source link

Some cisco.nxos.nxos_l2_interfaces parameters do not work on Cisco 55A1 devices #596

Closed digitalfiend64 closed 1 year ago

digitalfiend64 commented 1 year ago
SUMMARY

Some cisco.nxos.nxos_l2_interfaces parameters do not work on Cisco 55A1 devices. Other parameters work when they shouldn’t on Cisco ASR9010 devices.

Parameters that are not supported on 55A1:

Parameters that shouldn’t work on a non-sub interface but do on ASR9010:

ISSUE TYPE
COMPONENT NAME

Cisco.nxos.nxos_l2_interfaces v4.0.0

ANSIBLE VERSION

Ansible v2.9.27

COLLECTION VERSION
# /home/<username>/.ansible/collections/ansible_collections
Collection Version
---------- -------
cisco.nxos 4.0.0

# /usr/local/lib/python3.8/site-packages/ansible_collections
Collection Version
---------- -------
cisco.nxos 2.9.1
CONFIGURATION
DEFAULT_LOAD_CALLBACK_PLUGINS(/home/<username>/.ansible.cfg) = True
DEFAULT_STDOUT_CALLBACK(/home/<username>/.ansible.cfg) = yaml
DEFAULT_TIMEOUT(/home/<username>/.ansible.cfg) = 120
DEPRECATION_WARNINGS(/home/<username>/.ansible.cfg) = False
GALAXY_IGNORE_CERTS(/home/<username>/.ansible.cfg) = True
GALAXY_SERVER_LIST(/home/<username>/.ansible.cfg) = ['inbound_yeti_repo', 'published_repo', 'rh-certified_repo']
HOST_KEY_CHECKING(/home/<username>/.ansible.cfg) = False
PARAMIKO_HOST_KEY_AUTO_ADD(/home/<username>/.ansible.cfg) = True
PERSISTENT_COMMAND_TIMEOUT(/home/<username>/.ansible.cfg) = 300
PERSISTENT_CONNECT_TIMEOUT(/home/<username>/.ansible.cfg) = 120
RETRY_FILES_ENABLED(/home/<username>/.ansible.cfg) = False
OS / ENVIRONMENT

Cisco NCS-5500 Cisco IOS XR Software, Version 7.2.2 Cisco ASR-9010 IOS XR Software, Version 6.5.3[Default]

STEPS TO REPRODUCE
  1. Run the Update l2_interfaces task

Task for NCS-5500

- name: Update l2_interfaces
  cisco.nxos.nxos_l2_interfaces:
  - config:
    - l2_interfaces:
      - name: TenGigE0/0/0/29/2.1
        encapsulation:
          dot1q: 10
      - name: TenGigE0/0/0/29/2
        l2protocol:
        - cpsv: drop
        l2transport: true
        propagate: true
        native_vlan: 10
      state: merged

Task for ASR-9010

- name: Update l2 interfaces
  cisco.nxos.nxos_l2_interfaces:
  - config:
    - l2_interfaces:
      - name: TenGigE0/7/0/0/7
        encapsulation:
          dot1q: 10
        l2protocol:
          - cpsv: drop
        l2transport: true
        native_vlan: 10
      state: merged
EXPECTED RESULTS

For the NCS-5500 device I expect l2protocol to not be supported. However, documentation on https://docs.ansible.com/ansible/latest/collections/cisco/iosxr/iosxr_l2_interfaces_module.html#ansible-collections-cisco-iosxr-iosxr-l2-interfaces-module should mention that some parameters vary on the device model. The l2transport and propagate parameters should update the interface with l2transport and propagate configurations.

For the ASR-9010 device the encapsulation parameter works on non-sub interfaces.

ACTUAL RESULTS

For the NCS-5500 device, l2transport and propagate parameters create a module failure while l2protocol fails the task since it is not supported by the device.

For the ASR-9010 device, encapsulation is configured on non-sub interfaces.

NCS-5500 using l2transport and propagate
fatal: [hostname]: FAILED! => changed=false
  module_stderr: |-
    l2transport l2protocol cpsv drop
                                                    ^
    % Invalid input detected at '^' marker.
    RP/0/RP0/CPU0:NCS55A1-01(config-if)#
  module_stdout: ''
  msg: |-
    MODULE FAILURE
    See stdout/stderr for the exact error

NCS-5500 using l2protocol
fatal: [hostname]: FAILED! => changed=false
  msg: dictionary requested, could not parse JSON or key=value

ASR-9010 using encapsulation
changed: [hostname]
NilashishC commented 1 year ago

@digitalfiend64 Based on the information you've provided, it seems that you should be using (and reporting this issue) in the cisco.iosxr collection. The modules in this repository are not supported to work on the following devices that you've mentioned:

Cisco NCS-5500 Cisco IOS XR Software, Version 7.2.2
Cisco ASR-9010 IOS XR Software, Version 6.5.3[Default]

Please correct me if I've misunderstood this.

NilashishC commented 1 year ago

@digitalfiend64 I'm closing this issue as per above. Please feel free to re-open this ticket if required. Thank you.