ansible-collections / arista.eos

Ansible Network Collection for Arista EOS
GNU General Public License v3.0
81 stars 64 forks source link

Return empty lists for static_routes or vlans when not configured #518

Closed rohitthakur2590 closed 4 months ago

rohitthakur2590 commented 4 months ago
SUMMARY
ISSUE TYPE
COMPONENT NAME
---
- name: Network Facts
  hosts: eos
  collections:
    - arista.eos
  tasks:
    - name: Gather arista eos facts
      arista.eos.eos_facts:
        gather_subset: config
        gather_network_resources: "{{ 'all' }}"

Output: 
        ospf_interfaces:
        - name: Ethernet1
        - name: Ethernet2
        - name: Management0
        - name: Management1
        - name: Vlan100
        ospfv2: {}
        ospfv3: []
        prefix_lists: []
        snmp_server: {}
        static_routes: []
        vlans: []
    changed: false
    failed: false
codecov[bot] commented 4 months ago

Codecov Report

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

Project coverage is 82.76%. Comparing base (84cd4d5) to head (61dfb4b).

Additional details and impacted files ```diff @@ Coverage Diff @@ ## main #518 +/- ## ======================================= Coverage 82.76% 82.76% ======================================= Files 153 153 Lines 11967 11967 ======================================= Hits 9904 9904 Misses 2063 2063 ```

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.

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

Build failed. https://ansible.softwarefactory-project.io/zuul/buildset/88ca75761a1d4713891b2fd6110b2328

:x: ansible-test-network-integration-eos-httpapi-python39-stable215 POST_FAILURE in 43m 10s :x: ansible-test-network-integration-eos-httpapi-python39-stable214 FAILURE in 37m 55s :x: ansible-test-network-integration-eos-httpapi-python39-stable213 FAILURE in 34m 35s :x: ansible-test-network-integration-eos-httpapi-python39-stable212 FAILURE in 34m 38s :x: ansible-test-network-integration-eos-httpapi-python39-stable211 FAILURE in 34m 41s :x: ansible-test-network-integration-eos-network_cli-python39-stable215-scenario01 FAILURE in 30m 08s (non-voting) :heavy_check_mark: ansible-test-network-integration-eos-network_cli-python39-stable215-scenario02 SUCCESS in 34m 27s (non-voting) :x: ansible-test-network-integration-eos-network_cli-libssh-python39-stable215-scenario01 FAILURE in 31m 39s (non-voting) :heavy_check_mark: ansible-test-network-integration-eos-network_cli-libssh-python39-stable215-scenario02 SUCCESS in 42m 56s (non-voting) :x: ansible-test-network-integration-eos-network_cli-python39-stable214-scenario01 FAILURE in 35m 51s (non-voting) :heavy_check_mark: ansible-test-network-integration-eos-network_cli-python39-stable214-scenario02 SUCCESS in 41m 58s (non-voting) :x: ansible-test-network-integration-eos-network_cli-libssh-python39-stable214-scenario01 FAILURE in 35m 57s (non-voting) :heavy_check_mark: ansible-test-network-integration-eos-network_cli-libssh-python39-stable214-scenario02 SUCCESS in 42m 06s (non-voting) :x: ansible-test-network-integration-eos-network_cli-python39-stable213-scenario01 FAILURE in 35m 40s (non-voting) :heavy_check_mark: ansible-test-network-integration-eos-network_cli-python39-stable213-scenario02 SUCCESS in 33m 41s (non-voting) :x: ansible-test-network-integration-eos-network_cli-libssh-python39-stable213-scenario01 FAILURE in 35m 57s (non-voting) :heavy_check_mark: ansible-test-network-integration-eos-network_cli-libssh-python39-stable213-scenario02 SUCCESS in 39m 49s (non-voting) :x: ansible-test-network-integration-eos-network_cli-python39-stable212-scenario01 FAILURE in 29m 53s (non-voting) :heavy_check_mark: ansible-test-network-integration-eos-network_cli-python39-stable212-scenario02 SUCCESS in 33m 53s (non-voting) :x: ansible-test-network-integration-eos-network_cli-libssh-python39-stable212-scenario01 FAILURE in 29m 46s (non-voting) :heavy_check_mark: ansible-test-network-integration-eos-network_cli-libssh-python39-stable212-scenario02 SUCCESS in 37m 53s (non-voting) :x: ansible-test-network-integration-eos-network_cli-python39-stable211-scenario01 FAILURE in 29m 50s (non-voting) :heavy_check_mark: ansible-test-network-integration-eos-network_cli-python39-stable211-scenario02 SUCCESS in 37m 38s (non-voting) :x: ansible-test-network-integration-eos-network_cli-libssh-python39-stable211-scenario01 FAILURE in 29m 51s (non-voting) :heavy_check_mark: ansible-test-network-integration-eos-network_cli-libssh-python39-stable211-scenario02 SUCCESS in 33m 44s (non-voting) :heavy_check_mark: build-ansible-collection SUCCESS in 10m 37s :heavy_check_mark: ansible-tox-linters SUCCESS in 13m 38s :heavy_check_mark: ansible-galaxy-importer SUCCESS in 5m 01s

ashwini-mhatre commented 4 months ago

@rohitthakur2590 could you please add ut if possible?

rohitthakur2590 commented 4 months ago

@rohitthakur2590 could you please add ut if possible?

Technically this affects the *_facts module, and at present, we don't run UT for that. So for now I am testing this part of resource module.

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

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

:heavy_check_mark: ansible-test-network-integration-eos-httpapi-python39-stable215 SUCCESS in 39m 48s :heavy_check_mark: ansible-test-network-integration-eos-httpapi-python39-stable214 SUCCESS in 39m 16s :heavy_check_mark: ansible-test-network-integration-eos-httpapi-python39-stable213 SUCCESS in 35m 18s :heavy_check_mark: ansible-test-network-integration-eos-httpapi-python39-stable212 SUCCESS in 35m 22s :heavy_check_mark: ansible-test-network-integration-eos-httpapi-python39-stable211 SUCCESS in 36m 15s :heavy_check_mark: ansible-test-network-integration-eos-network_cli-python39-stable215-scenario01 SUCCESS in 31m 40s (non-voting) :heavy_check_mark: ansible-test-network-integration-eos-network_cli-python39-stable215-scenario02 SUCCESS in 34m 38s (non-voting) :heavy_check_mark: ansible-test-network-integration-eos-network_cli-libssh-python39-stable215-scenario01 SUCCESS in 32m 08s (non-voting) :heavy_check_mark: ansible-test-network-integration-eos-network_cli-libssh-python39-stable215-scenario02 SUCCESS in 36m 02s (non-voting) :heavy_check_mark: ansible-test-network-integration-eos-network_cli-python39-stable214-scenario01 SUCCESS in 32m 25s (non-voting) :heavy_check_mark: ansible-test-network-integration-eos-network_cli-python39-stable214-scenario02 SUCCESS in 35m 18s (non-voting) :heavy_check_mark: ansible-test-network-integration-eos-network_cli-libssh-python39-stable214-scenario01 SUCCESS in 33m 15s (non-voting) :heavy_check_mark: ansible-test-network-integration-eos-network_cli-libssh-python39-stable214-scenario02 SUCCESS in 35m 36s (non-voting) :heavy_check_mark: ansible-test-network-integration-eos-network_cli-python39-stable213-scenario01 SUCCESS in 32m 51s (non-voting) :heavy_check_mark: ansible-test-network-integration-eos-network_cli-python39-stable213-scenario02 SUCCESS in 34m 44s (non-voting) :heavy_check_mark: ansible-test-network-integration-eos-network_cli-libssh-python39-stable213-scenario01 SUCCESS in 33m 25s (non-voting) :heavy_check_mark: ansible-test-network-integration-eos-network_cli-libssh-python39-stable213-scenario02 SUCCESS in 33m 25s (non-voting) :heavy_check_mark: ansible-test-network-integration-eos-network_cli-python39-stable212-scenario01 SUCCESS in 35m 38s (non-voting) :heavy_check_mark: ansible-test-network-integration-eos-network_cli-python39-stable212-scenario02 SUCCESS in 36m 19s (non-voting) :heavy_check_mark: ansible-test-network-integration-eos-network_cli-libssh-python39-stable212-scenario01 SUCCESS in 34m 18s (non-voting) :heavy_check_mark: ansible-test-network-integration-eos-network_cli-libssh-python39-stable212-scenario02 SUCCESS in 33m 31s (non-voting) :heavy_check_mark: ansible-test-network-integration-eos-network_cli-python39-stable211-scenario01 SUCCESS in 35m 02s (non-voting) :heavy_check_mark: ansible-test-network-integration-eos-network_cli-python39-stable211-scenario02 SUCCESS in 36m 57s (non-voting) :heavy_check_mark: ansible-test-network-integration-eos-network_cli-libssh-python39-stable211-scenario01 SUCCESS in 34m 47s (non-voting) :heavy_check_mark: ansible-test-network-integration-eos-network_cli-libssh-python39-stable211-scenario02 SUCCESS in 36m 57s (non-voting) :heavy_check_mark: build-ansible-collection SUCCESS in 9m 46s :heavy_check_mark: ansible-tox-linters SUCCESS in 14m 04s :heavy_check_mark: ansible-galaxy-importer SUCCESS in 4m 47s