arista.eos icon indicating copy to clipboard operation
arista.eos copied to clipboard

eos_bgp_global bestpath syntax

Open rlangus opened this issue 2 years ago • 0 comments

SUMMARY

code snippet below bgp_params: bestpath: as_path: "multipath_relax"

results in: ansible.module_utils.connection.ConnectionError: bgp bestpath as-path multipath_relax % Invalid input

because the Arista command is actually "bgp bestpath as-path multipath-relax"

Note the underscore in the module (multipath_relax) versus the dash in the actual command (multipath-relax). One cannot enter the correct syntax with the dash into the module.

ISSUE TYPE
  • Bug Report
COMPONENT NAME

eos_bgp_global

ANSIBLE VERSION
ansible [core 2.12.2]
  config file = /root/ansible/ansible-mc-iosv/ansible.cfg
  configured module search path = ['/root/.ansible/plugins/modules', '/usr/share/ansible/plugins/modules']
  ansible python module location = /usr/lib/python3.9/site-packages/ansible
  ansible collection location = /root/.ansible/collections:/usr/share/ansible/collections
  executable location = /usr/bin/ansible
  python version = 3.9.10 (main, Feb  9 2022, 00:00:00) [GCC 11.2.1 20220127 (Red Hat 11.2.1-9)]
  jinja version = 2.11.3
  libyaml = True

COLLECTION VERSION
# /usr/lib/python3.9/site-packages/ansible_collections
Collection Version
---------- -------
arista.eos 3.1.0  

CONFIGURATION
ACTION_WARNINGS(/root/ansible/ansible-mc-iosv/ansible.cfg) = False
COLOR_DEBUG(/root/ansible/ansible-mc-iosv/ansible.cfg) = white
COLOR_VERBOSE(/root/ansible/ansible-mc-iosv/ansible.cfg) = bright blue
DEFAULT_GATHERING(/root/ansible/ansible-mc-iosv/ansible.cfg) = explicit
DEFAULT_GATHER_TIMEOUT(/root/ansible/ansible-mc-iosv/ansible.cfg) = 30
DEFAULT_HOST_LIST(/root/ansible/ansible-mc-iosv/ansible.cfg) = ['/root/ansible/ansible-mc-iosv/hosts']
DEFAULT_STDOUT_CALLBACK(/root/ansible/ansible-mc-iosv/ansible.cfg) = debug
DEPRECATION_WARNINGS(/root/ansible/ansible-mc-iosv/ansible.cfg) = False
HOST_KEY_CHECKING(/root/ansible/ansible-mc-iosv/ansible.cfg) = True
RETRY_FILES_ENABLED(/root/ansible/ansible-mc-iosv/ansible.cfg) = False
VARIABLE_PLUGINS_ENABLED(/root/ansible/ansible-mc-iosv/ansible.cfg) = ['host_group_vars']

OS / ENVIRONMENT

Arista vEOS-lab Hardware version: Serial number: E96936678F5EE3A02099BC1A7D7BE92C Hardware MAC address: 000c.29a2.5ce0 System MAC address: 000c.29a2.5ce0

Software image version: 4.28.1F Architecture: x86_64 Internal build version: 4.28.1F-27567367.4281F Internal build ID: 6f301867-3225-4d36-bc3f-7cd04e39fb76 Image format version: 1.0 Image optimization: None

Uptime: 2 weeks, 0 days, 4 hours and 52 minutes Total memory: 4000460 kB Free memory: 2642872 kB

STEPS TO REPRODUCE

Attempt to update BGP configuration with "bgp bestpath as-path multipath_relax" fails when entered manually or via module.

---
  - name: "Configure BGP"
    hosts: routers
    ignore_errors: no

    tasks:
      - name: Create basic BGP global configuration
        arista.eos.eos_bgp_global:
          config:
            bgp_params:
              bestpath:
                as_path: "multipath_relax"
          state: replaced

EXPECTED RESULTS

Expect module to send "bgp bestpath as-path multipath-relax" when configured as in the yml snippet above.

ACTUAL RESULTS
ansible.module_utils.connection.ConnectionError: bgp bestpath as-path multipath_relax
% Invalid input

If I changed the code snippet to 'as-path: "multipath-relax"', encounter error: value of as_path must be one of: ignore, multipath_relax, got: multipath-relax found in config -> bgp_params -> bestpath

rlangus avatar Jul 25 '22 20:07 rlangus