Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Parsing of "show vrf default detail" command is not working for IOS XR #142

Open
icarus78 opened this issue Dec 22, 2021 · 1 comment
Open
Assignees

Comments

@icarus78
Copy link

Hi

I´m using pyats to get the interfaces per VRF and in global (default VRF) routing table.
For VRF interfaces information the command device.parse('show vrf all detail') is working and I can get the list of interfaces for each VRF by reading the "interfaces" key for each VRF. It also works when using the command for one particular VRF, like device.parse('show vrf detail')

I will like to get the same list of interfaces as key for default VRF, but when running the device.parse command it gives the following error:

show_vrf_default_detail = device.parse('show vrf default detail')
Traceback (most recent call last):
File "<pyshell#272>", line 1, in
show_vrf_default_detail = device.parse('show vrf default detail')
File "src/genie/conf/base/device.py", line 524, in genie.conf.base.device.Device.parse
File "src/genie/conf/base/device.py", line 551, in genie.conf.base.device.Device._get_parser_output
File "src/genie/metaparser/_metaparser.py", line 312, in genie.metaparser._metaparser.MetaParser.parse
File "src/genie/metaparser/_metaparser.py", line 292, in genie.metaparser._metaparser.MetaParser.parse
File "src/genie/metaparser/util/schemaengine.py", line 415, in genie.metaparser.util.schemaengine.Schema.validate
genie.metaparser.util.exceptions.SchemaMissingKeyError: Missing keys: [['default', 'address_family']]

It seems that it is not working because no "address-family" information is provided in the output of the show command

RP/0/RSP0/CPU0:IOSXR#show vrf default detail
Wed Dec 22 16:08:48.734 ECU

VRF default; RD not set; VPN ID not set
VRF mode: Regular
Description not set
Interfaces:
BVI733
Bundle-Ether100
Bundle-Ether602
Bundle-Ether604
Bundle-Ether605
Bundle-Ether607
Bundle-Ether614
GigabitEthernet0/0/0/16
GigabitEthernet0/0/0/6
Loopback199
Loopback40733
Loopback777
TenGigE0/1/1/1.1003124

Is it possible to include the support for "default" VRF in the parser?

Regards

@lsheikal
Copy link
Contributor

Hi @icarus78,

Thanks for reporting the issue.
yes we can add support for "default", you are more than welcome to contribute .
For it, there is the reference how to develop parser. And there are very nice YouTube video in the page by pyATS users.
https://pubhub.devnetcloud.com/media/pyats-development-guide/docs/writeparser/writeparser.html

Kindly let me know if there is any other help needed.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants