napalm-automation / napalm

Network Automation and Programmability Abstraction Layer with Multivendor support
Apache License 2.0
2.26k stars 555 forks source link

Cisco IOS XR driver doesn't reflect the actual state of route_reflector_client for its neighbors #1167

Open hellt opened 4 years ago

hellt commented 4 years ago

Description of Issue/Question

Cisco IOS XR driver puts route_reflector_client: False for every neighbor in the get_bgp_config getter even if the router is a RR itself.

Should either of the following approaches be used instead?

  1. SSH driver to be used to get this info
  2. "" to be used instead if this info can't be retrieved by XML API?
  3. documented as a known issue in the docs for the driver
mirceaulinic commented 4 years ago

Thanks for opening this @hellt. ~~I've checked in the mock data and it turns out that there actually is a key for the route reflector in the document returned by the XML API: https://raw.githubusercontent.com/napalm-automation/napalm/develop/test/iosxr/mocked_data/test_get_bgp_neighbors_detail/normal/_Get__Operational__BGP__InstanceTable__Instance__Naming__________InstanceName_default__InstanceName___Naming__InstanceActive__VRFTable__VRF__Naming_de.txt I'll try to investigate if that's indeed accurate. Wouldn't be able to tell for what reason it isn't used right now.~~

Disregard, I was looking at the wrong data. The mock data for get_bgp_config is at: https://raw.githubusercontent.com/napalm-automation/napalm/develop/test/iosxr/mocked_data/test_get_bgp_config/normal/_Get__Configuration__BGP__Instance__Naming__________InstanceName_default__InstanceName___Naming___Instance___BGP___Configuration___Get_.txt The configuration for the route reflector is indeed not there, unfortunately.

That said, I'm a bit reticent (but not opposed) to (1), i.e., make a separate connection just for this, not convinced it's worthy. I'm more inclined towards (2) and (3), but will leave this open for a while to hear more opinions.