05-22-2024 04:33 AM
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
05-22-2024 05:29 AM
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.
05-22-2024 05:33 AM - edited 05-22-2024 05:37 AM
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.
Discover and save your favorite ideas. Come back to expert answers, step-by-step guides, recent topics, and more.
New here? Get started with these tips. How to use Community New member guide