CiscoTestAutomation / genieparser

sub-component of Genie that parse the device output into structured datastructure
Apache License 2.0
248 stars 385 forks source link

IOSXR -- Improper parsing for "show bgp instance all all all summary" #92

Closed kokasha closed 4 years ago

kokasha commented 4 years ago

The Current Parser Only capture the following Address Families

However, the parser doesn't capture the following address families

Can these Address Families be added to the parser

xiaoxinz-cisco commented 4 years ago

Hello @kokasha ,

Thank you for reporting.

About the first three:

Current regular expression does not capture those. Current regex (where it is in code):

p3 = re.compile(r'^\s*Address *Family:'
                        ' *(?P<address_family>[a-zA-Z0-9\s]+)$')

To fix it:

p3 = re.compile(r'^\s*Address *Family:'
                        ' *(?P<address_family>[\S\s]+)$')

About these two:

They should be captured if they are also in the format: Address Family: IPv4 multicast

Generally, we release once per month, to save your waiting time, I recommend you could fix this little problem on your own and create a pull request. Our team will review and merge them.

We appreciate your understanding and contribution. 😃

Thanks, Irene

xiaoxinz-cisco commented 4 years ago

Hi @kokasha ,

Our support team will take over this issue and will add it in the next release.

Thanks, Irene

xiaoxinz-cisco commented 4 years ago

Hello @kokasha ,

We fixed the issue and genie package 20.2.1b1 has been released with the fix. Could you please run the following command and try again to see if it works?

pip install genie.libs.parser --upgrade --pre

Please try and let's know if there is an issue.

Thanks, Irene