bgp_address_family compaire error
evertos opened this issue · 4 comments
SUMMARY
When I run the bellow Code I get the following error:
"msg": "'<' not supported between instances of 'str' and 'int'"
- name: Configure ipv4 Max paths
cisco.nxos.nxos_bgp_address_family:
config:
as_number: "{{ as_base }}0000 |str"
address_family:
- afi: ipv4
safi: unicast
maximum_paths:
parallel_paths: 16
ibgp:
parallel_paths: 16
loop: "{{ vrfs }}"
tags: address_familys
ISSUE TYPE
- Bug Report
COMPONENT NAME
cisco.nxos.nxos_bgp_address_family:
ANSIBLE VERSION
ansible [core 2.13.6]
config file = /mnt/c/Users/EvertHoegee/OneDrive/DM-P/Gitlab/switch-preconfiguration/ansible.cfg
configured module search path = ['/home/evert/.ansible/plugins/modules', '/usr/share/ansible/plugins/modules']
ansible python module location = /home/evert/.local/lib/python3.10/site-packages/ansible
ansible collection location = /home/evert/.ansible/collections:/usr/share/ansible/collections
executable location = /home/evert/.local/bin/ansible
python version = 3.10.6 (main, Nov 14 2022, 16:10:14) [GCC 11.3.0]
jinja version = 3.1.2
libyaml = True
COLLECTION VERSION
Collection Version
------------------ -------
ansible.netcommon 4.1.0
ansible.utils 2.8.0
cisco.ios 4.0.0
cisco.nxos 4.0.1
community.ciscosmb 1.0.5
fortinet.fortios 2.2.0
OS / ENVIRONMENT
Windows 10 WSL
STEPS TO REPRODUCE
- name: Configure ipv4 Max paths
cisco.nxos.nxos_bgp_address_family:
config:
as_number: "{{ as_base }}0000 |str"
address_family:
- afi: ipv4
safi: unicast
maximum_paths:
parallel_paths: 16
ibgp:
parallel_paths: 16
loop: "{{ vrfs }}"
tags: address_familys, vrf
TASK [Configure ipv4 Max paths] *******************************************************************************************************************************************************************************************************************************************************************task path: /mnt/c/Users/-/OneDrive/-/Gitlab/switch-preconfiguration/1002BGPSetup.yml:154 The full traceback is: File "/home/-/.ansible/collections/ansible_collections/ansible/netcommon/plugins/module_utils/network/common/facts/facts.py", line 135, in get_network_resources_facts inst.populate_facts( File "/home/-/.ansible/collections/ansible_collections/cisco/nxos/plugins/module_utils/network/nxos/facts/bgp_address_family/bgp_address_family.py", line 86, in populate_facts x["redistribute"] = sorted( failed: [nld5nsl01] (item={'name': 8523, 'description': 'CU_8523', 'rd': 13, 'asnum': '4218118523', 'default_originate': False}) => { "ansible_loop_var": "item", "changed": false, "invocation": { "module_args": { "config": { "address_family": [ { "additional_paths": null, "advertise_l2vpn_evpn": null, "advertise_pip": null, "advertise_system_mac": null, "afi": "ipv4", "aggregate_address": null, "allow_vni_in_ethertag": null, "client_to_client": null, "dampen_igp_metric": null, "dampening": null, "default_information": null, "default_metric": null, "distance": null, "export_gateway_ip": null, "inject_map": null, "maximum_paths": { "eibgp": null, "ibgp": { "parallel_paths": 16 }, "local": null, "mixed": null, "parallel_paths": 16 }, "networks": null, "nexthop": null, "redistribute": null, "retain": null, "safi": "unicast", "suppress_inactive": null, "table_map": null, "timers": null, "vrf": null, "wait_igp_convergence": null } ], "as_number": "4218110000 |str" }, "running_config": null, "state": "merged" } }, "item": { "asnum": "4218118523", "default_originate": false, "description": "CU_8523", "name": 8523, "rd": 13 }, "msg": "'<' not supported between instances of 'str' and 'int'" }
@evertos Looking at the traceback, it seems to be coming while gathering BGP address family facts from the device. Could you please share the output of show running-config | section '^router bgp'
from the host for which this issue is encountered?
Let me check that! As I need to filter out some data that is related to our customers.
@evertos Just a gentle reminder. We are still waiting for the required data from your end. Please let us if this issue persists or if it has been resolved. Thank you.
@evertos Since we haven't heard from you yet, I'm hoping that this issue is resolved. As such, I'm going to close this ticket for now. Please do not hesitate to re-open this or open a new one (linking this issue), if you want to pursue this further.
Thank you and happy automating!