Closed ckishimo closed 6 years ago
@ckishimo would you be able to provide a test case for this? And does this solve https://github.com/napalm-automation/napalm-junos/issues/177?
@mirceaulinic for the test case is it enough to create a new dir in mocked_data/test_get_bgp_neighbors
with the xml file and the expected_result.json ?
I'll have a look to #177
Thanks!
Yes @ckishimo - you have to create a new dir under mocked_data/test_get_bgp_neighbors
, where you put the expected_results.json
, and a file with explicit facts.yml
(as the output may be different across versions and platforms) + a couple of XML documents, as in https://github.com/napalm-automation/napalm-junos/tree/develop/test/unit/mocked_data/test_get_bgp_neighbors/normal.
One (or maybe few more) @ckishimo - get-bgp-neighbor-informationmaster.xml
this time; but have a look at https://github.com/napalm-automation/napalm-junos/tree/develop/test/unit/mocked_data/test_get_bgp_neighbors/normal and make sure you have the same files (with the content you want to provide).
@mirceaulinic sorry I thought not all files were needed. I will push same files as in the normal
directory
Thanks @ckishimo
While running
get_bgp_neighbors()
I was getting the following error:It seems not all ribs have the node
<advertised-prefix-count>
. The only way I found to fix that was to use thesend-state
node which can have as a valuein sync
ornot advertising
. So ifsend-state == 'not advertising'
the<advertised-prefix-count>
may not exist, so we can count it as zero. Example:Please let me know if that makes sense