ansible-collections / cisco.nxos

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

Add private vlan on fact #821

Open mlk-89 opened 6 months ago

mlk-89 commented 6 months ago
SUMMARY

This PR fix an issue when the module nxos_l2_interfaces is used. It will fail on gathering facts if there are any intefaces that is configured with the mode private-vlan.

I think it will fix this issue: #631

ISSUE TYPE
COMPONENT NAME

Modifications are only on the argspec

ADDITIONAL INFORMATION

To reproduce:

configure manually interface ethernet 1/10

  switchport mode private-vlan host
  switchport private-vlan host-association 3001 3003

configure interface ethernet 1/1 with the module nxos_l2_interfaces

- name: Merge provided configuration with device configuration
  cisco.nxos.nxos_l2_interfaces:
    config:
    - name: Ethernet1/1
      trunk:
        native_vlan: 10
        allowed_vlans: 2,4,15
FAILED! => {"changed": false, "msg": "value of mode must be one of: access, dot1q-tunnel, trunk, fex-fabric, fabricpath, private-vlan trunk promiscuous, private-vlan host, got: private-vlan trunk secondary found in config"}
codecov[bot] commented 6 months ago

Codecov Report

All modified and coverable lines are covered by tests :white_check_mark:

Project coverage is 84.27%. Comparing base (eebf8ff) to head (5630182).

Additional details and impacted files ```diff @@ Coverage Diff @@ ## main #821 +/- ## ======================================= Coverage 84.27% 84.27% ======================================= Files 215 215 Lines 18382 18382 ======================================= Hits 15491 15491 Misses 2891 2891 ```
softwarefactory-project-zuul[bot] commented 6 months ago

Build succeeded. https://ansible.softwarefactory-project.io/zuul/buildset/14b34a846b734904b1ff17b2d16cb9c6

:heavy_check_mark: ansible-galaxy-importer SUCCESS in 6m 19s :heavy_check_mark: build-ansible-collection SUCCESS in 11m 38s :heavy_check_mark: ansible-test-network-integration-nxos-cli-python39-scenario01 SUCCESS in 30m 15s (non-voting) :heavy_check_mark: ansible-test-network-integration-nxos-cli-python39-scenario02 SUCCESS in 29m 01s (non-voting) :x: ansible-test-network-integration-nxos-cli-python39-scenario03 FAILURE in 38m 33s (non-voting) :heavy_check_mark: ansible-test-network-integration-nxos-cli-python39-scenario04 SUCCESS in 27m 39s (non-voting) :heavy_check_mark: ansible-test-network-integration-nxos-cli-python39-stable215-scenario01 SUCCESS in 35m 01s (non-voting) :heavy_check_mark: ansible-test-network-integration-nxos-cli-python39-stable215-scenario02 SUCCESS in 33m 51s (non-voting) :heavy_check_mark: ansible-test-network-integration-nxos-cli-python39-stable215-scenario03 SUCCESS in 40m 52s (non-voting) :heavy_check_mark: ansible-test-network-integration-nxos-cli-python39-stable215-scenario04 SUCCESS in 32m 53s (non-voting) :heavy_check_mark: ansible-test-network-integration-nxos-cli-python39-stable214-scenario01 SUCCESS in 34m 57s (non-voting) :heavy_check_mark: ansible-test-network-integration-nxos-cli-python39-stable214-scenario02 SUCCESS in 33m 44s (non-voting) :heavy_check_mark: ansible-test-network-integration-nxos-cli-python39-stable214-scenario03 SUCCESS in 41m 35s (non-voting) :heavy_check_mark: ansible-test-network-integration-nxos-cli-python39-stable214-scenario04 SUCCESS in 31m 50s (non-voting) :heavy_check_mark: ansible-tox-linters SUCCESS in 13m 00s

softwarefactory-project-zuul[bot] commented 5 months ago

Build succeeded. https://ansible.softwarefactory-project.io/zuul/buildset/897b33aa512f41c5894e1fa502e61541

:heavy_check_mark: ansible-galaxy-importer SUCCESS in 6m 10s :heavy_check_mark: build-ansible-collection SUCCESS in 12m 00s :heavy_check_mark: ansible-test-network-integration-nxos-cli-python39-scenario01 SUCCESS in 27m 53s (non-voting) :heavy_check_mark: ansible-test-network-integration-nxos-cli-python39-scenario02 SUCCESS in 28m 31s (non-voting) :x: ansible-test-network-integration-nxos-cli-python39-scenario03 FAILURE in 35m 53s (non-voting) :heavy_check_mark: ansible-test-network-integration-nxos-cli-python39-scenario04 SUCCESS in 28m 10s (non-voting) :heavy_check_mark: ansible-test-network-integration-nxos-cli-python39-stable215-scenario01 SUCCESS in 32m 56s (non-voting) :heavy_check_mark: ansible-test-network-integration-nxos-cli-python39-stable215-scenario02 SUCCESS in 33m 15s (non-voting) :heavy_check_mark: ansible-test-network-integration-nxos-cli-python39-stable215-scenario03 SUCCESS in 40m 40s (non-voting) :heavy_check_mark: ansible-test-network-integration-nxos-cli-python39-stable215-scenario04 SUCCESS in 31m 40s (non-voting) :heavy_check_mark: ansible-test-network-integration-nxos-cli-python39-stable214-scenario01 SUCCESS in 32m 26s (non-voting) :heavy_check_mark: ansible-test-network-integration-nxos-cli-python39-stable214-scenario02 SUCCESS in 33m 47s (non-voting) :heavy_check_mark: ansible-test-network-integration-nxos-cli-python39-stable214-scenario03 SUCCESS in 40m 33s (non-voting) :heavy_check_mark: ansible-test-network-integration-nxos-cli-python39-stable214-scenario04 SUCCESS in 31m 17s (non-voting) :heavy_check_mark: ansible-tox-linters SUCCESS in 14m 58s

JHilsberg commented 4 months ago

Hi, will this fix included in the next release? I have some switches with private-vlan interfaces I can't configure with the current version. Would be nice if the fix could be pushed in the next weeks. Thanks.