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

Fix of configuration options for redistribution inside address-family #554

Open
wants to merge 3 commits into
base: main
Choose a base branch
from

Conversation

wanzel
Copy link

@wanzel wanzel commented Sep 9, 2024

SUMMARY

Fix of configurations options for redistribution inside Arista eos_bgp_address_family module

ISSUE TYPE
  • Bugfix Pull Request
COMPONENT NAME
  • arista.eos.eos_bgp_address_family
ADDITIONAL INFORMATION
Playbook example
- name: Read and parse BGP configuration for Arista EOS
  hosts: all
  gather_facts: no

  tasks:

    - name: Parse BGP address-family part of configuration
      arista.eos.eos_bgp_address_family:
        running_config: "{{ lookup('file', 'eos_parsed.cfg') }}"
        state: parsed

    - name: Save output to a file
      copy:
        content: "{{ output.parsed | to_json(indent=2) }}"
        dest: "./BGP_address_family_eos_config_parsed.cfg"
configuration to parse
(venv) ➜  ansible_testing cat eos_parsed.cfg  
router bgp 100
   !
   address-family ipv4
      neighbor 33.33.33.33 activate
      network 7.0.0.0/8
      redistribute connected route-map EXPORT-LOCAL-TO-BGP
Running the playbook
(venv) ➜  ansible_testing ansible-playbook play01_eos.yaml -i inventoryeos.ini  
PLAY [Read and parse BGP configuration for Arista EOS] ******************************************************************************************************************************

TASK [Parse BGP address-family part of configuration] *******************************************************************************************************************************
fatal: [127.0.0.1]: FAILED! => {"changed": false, "msg": "value of protocol must be one of: isis, ospfv3, dhcp, got: connected found in config -> address_family -> redistribute"}

This part does not work
router bgp 100
   address-family ipv4
       redistribute connected route-map EXPORT-LOCAL-TO-BGP
Confirmation of configurations options for redistribution inside address family
ceos1(config)#router bgp 100
ceos1(config-router-bgp)#   address-family ipv4
ceos1(config-router-bgp-af)#redistribute ?
  attached-host  ARP generated host routes
  bgp            Border Gateway Protocol
  connected      Connected interface routes
  dynamic        Dynamic policy routes
  isis           IS-IS routes
  ospf           OSPF protocol
  ospfv3         Open Shortest Path First (OSPFv3)
  rip            RIP routes
  static         Static routes


In Global module, you can configure the same options for redistribution, but there are the right options. As you can see below:

@wanzel wanzel changed the title Fix of route-map options Fix of route-map options for redistribution inside address-family Sep 9, 2024
Copy link
Author

@wanzel wanzel left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fix of typo ( forgot "," )

@wanzel wanzel changed the title Fix of route-map options for redistribution inside address-family Fix of configuration options for redistribution inside address-family Sep 9, 2024
@Ruchip16 Ruchip16 self-requested a review September 11, 2024 09:47
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

Successfully merging this pull request may close these issues.

1 participant