cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
237
Views
0
Helpful
3
Replies

pyats learning bgp

josecarvalho
Level 1
Level 1

  I wanted to know if there was a way for pyats to only look at specific vrf rather than all BGP tables in on a router.  current; pyats learn bgp --testbed-file wan_router.yaml --output current  wanted; pyats learn bgp --vrf xxx --testbed-file wan_router.yaml --output current

3 Replies 3

Guess you would use  --vrf <VRF_NAME>: This is the new argument you're adding. Replace <VRF_NAME> with the actual name of the VRF you want to target.

pyats learn bgp --vrf <VRF_NAME> --testbed-file wan_router.yaml --output current

Hope this helps.

Please mark this as helpful or solution accepted to help others
Connect with me https://bigevilbeard.github.io

atiqbay023
Level 1
Level 1

I think you need to use the `--config` option to specify the VRF in your command. You can use a workaround by creating a custom configuration file that includes the desired VRF. Here’s a basic example:

1. Create a custom YAML configuration file specifying the VRF:

bgp:
properties:
vrfs:
- name: xxx

2. Use this configuration file in your `pyats learn` command:

pyats learn bgp --testbed-file wan_router.yaml --config vrf_config.yaml --output current

Replace `vrf_config.yaml` with the path to your custom configuration file. This setup ensures `pyats` focuses on the specified VRF.

Ruben Cocheno
Spotlight
Spotlight

@josecarvalho 

yes, you must specify than on the yaml

Tag me to follow up.
Please mark it as Helpful and/or Solution Accepted if that is the case. Thanks for making Engineering easy again.
Connect with me for more on Linkedin https://www.linkedin.com/in/rubencocheno/