Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

arista.eos.eos_prefix_lists fails to gather entries from prefix-lists with two operators #534

Open
SteveBarrios opened this issue Apr 24, 2024 · 0 comments
Assignees

Comments

@SteveBarrios
Copy link

SUMMARY

The gathered prefix list will be miss any entries where the prefix-list has multiple operators. If there is only one entry / sequence in the prefix-list it will report a prefix-list with no entries, otherwise it will simply skip over the entry with multiple operators.

Example:

ip prefix-list MyList
    seq 10 permit 10.0.0.0/22 ge 22 le 24
ISSUE TYPE
  • Bug Report
COMPONENT NAME

arista.eos.eos_prefix_lists

ANSIBLE VERSION
ansible 2.10.8
  config file = /home/steve/.ansible.cfg
  configured module search path = ['/home/steve/.ansible/plugins/modules', '/usr/share/ansible/plugins/modules']
  ansible python module location = /usr/lib/python3/dist-packages/ansible
  executable location = /usr/bin/ansible
  python version = 3.10.12 (main, Nov 20 2023, 15:14:05) [GCC 11.4.0]
COLLECTION VERSION
# /usr/lib/python3/dist-packages/ansible_collections
Collection Version
---------- -------
arista.eos 1.3.0

# /home/steve/.ansible/collections/ansible_collections
Collection Version
---------- -------
arista.eos 6.2.1
CONFIGURATION
DEFAULT_LOAD_CALLBACK_PLUGINS(/home/steve/.ansible.cfg) = True
DEFAULT_STDOUT_CALLBACK(/home/steve/.ansible.cfg) = yaml
DEPRECATION_WARNINGS(/home/steve/.ansible.cfg) = False
HOST_KEY_CHECKING(/home/steve/.ansible.cfg) = False
OS / ENVIRONMENT

Ubuntu 22.04.3 LTS (GNU/Linux 5.15.146.1-microsoft-standard-WSL2 x86_64)

Running against Arista switch:

Hardware version: 11.20
Software image version: 4.31.2F
Architecture: i686
Internal build version: 4.31.2F-35442146.4312F
Internal build ID: 635a071a-386e-447f-942c-bcc34d9ffd3c
Image format version: 3.0
Image optimization: Default
STEPS TO REPRODUCE
  1. On your switch, create a prefix-list with a sequence number that contains multiple operators, such as
ip prefix-list stupidtest
    seq 1 permit 10.77.164.0/24
    seq 10 permit 192.168.100.0/24 ge 24 le 26
    seq 20 permit 192.168.200.0/25 ge 27
  1. Create a task in your play which registers prefix-lists, such as:
- name: gather configs
  arista.eos.eos_prefix_lists:
    state: gathered
  register: found_terms
EXPECTED RESULTS

In our example, all three sequence numbers should be reported.

ACTUAL RESULTS

The entry will miss the middle "seq 10" entry in the prefix-list above and report as follows:

      - entries:
        - action: permit
          address: 10.77.164.0/24
          sequence: 1
        - action: permit
          address: 192.168.200.0/25
          match:
            masklen: 27
            operator: ge
          sequence: 20
        name: stupidtest
@roverflow roverflow self-assigned this May 8, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants