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

pyats learn bgp - Exception: KeyError: 'advertised' #185

Open
Kani999 opened this issue Oct 17, 2022 · 4 comments
Open

pyats learn bgp - Exception: KeyError: 'advertised' #185

Kani999 opened this issue Oct 17, 2022 · 4 comments
Assignees

Comments

@Kani999
Copy link

Kani999 commented Oct 17, 2022

Hello,

i've run into a following problem.

  • command pyats learn bgp --testbed-file tb.yaml --output today
Issue while building the feature

Traceback (most recent call last):
  File "src/genie/cli/commands/learn.py", line 365, in genie.cli.commands.learn.LearnCommand._retrieve_ops
  File "/home/jankrupa/pyats_one_more_time/venv/lib/python3.10/site-packages/genie/libs/ops/bgp/iosxr/bgp.py", line 546, in learn
    self.make()
  File "/home/jankrupa/pyats_one_more_time/venv/lib/python3.10/site-packages/genie/ops/base/base.py", line 103, in make
    self.maker.make(*args, **kwargs)
  File "src/genie/ops/base/maker.py", line 315, in genie.ops.base.maker.Maker.make
  File "src/genie/ops/base/maker.py", line 427, in genie.ops.base.maker.Maker._call_parser
  File "src/genie/metaparser/_metaparser.py", line 308, in genie.metaparser._metaparser.MetaParser.parse
  File "/home/jankrupa/pyats_one_more_time/venv/lib/python3.10/site-packages/genie/libs/parser/iosxr/show_bgp.py", line 4322, in cli
    sub_dict['advertised'][prefix]['index'][index]['path'] = path
KeyError: 'advertised'
  • pyats version
pyats version check
You are currently running pyATS version: 22.9
Python: 3.10.6 [64bit]

  Package                      Version
  ---------------------------- -------
  genie                        22.9   
  genie.libs.clean             22.9.1 
  genie.libs.conf              22.9   
  genie.libs.filetransferutils 22.9   
  genie.libs.health            22.9   
  genie.libs.ops               22.9   
  genie.libs.parser            22.9   
  genie.libs.robot             22.9   
  genie.libs.sdk               22.9.1 
  genie.telemetry              22.9   
  genie.trafficgen             22.9   
  pyats                        22.9   
  pyats.aereport               22.9   
  pyats.aetest                 22.9   
  pyats.async                  22.9   
  pyats.connections            22.9   
  pyats.contrib                22.9   
  pyats.datastructures         22.9   
  pyats.easypy                 22.9   
  pyats.kleenex                22.9   
  pyats.log                    22.9   
  pyats.reporter               22.9   
  pyats.results                22.9   
  pyats.robot                  22.9   
  pyats.tcl                    22.9   
  pyats.topology               22.9   
  pyats.utils                  22.9   
  unicon                       22.9   
  unicon.plugins               22.9   
  yang.connector               22.9   
  • Device version:

    • iosxr
    • Cisco IOS XR Software, Version 6.6.3[Default]
  • Testbed file:

devices:
    LAB:
        type: 'router'
        os: 'iosxr'
        alias: 'lab'
        credentials:
            default:
                username: USER
                password: PASS
        connections:
            cli:
                protocol: ssh
                ip: "IP"
@Taarini Taarini self-assigned this Oct 17, 2022
@Taarini
Copy link
Contributor

Taarini commented Oct 17, 2022

Hi

Can you please share the device output for the above mentioned error and also the testbed file used

@Kani999
Copy link
Author

Kani999 commented Oct 18, 2022

@Taarini i've added the Testbed file to the original post.
The files:

  • bgp_iosxr_R199-lab_console.txt - Is about 50MB large, contains the output of commands like show bgp instances ....
  • bgp_iosxr_R199-lab_exception.txt - Posted above
  • bgp_iosxr_R199-lab_ops.txt - https://pastebin.com/FCtWZC8d

@Taarini
Copy link
Contributor

Taarini commented Oct 18, 2022

What was the show command issued which caused you keyerror.
If the file size is large you can try sending in zip file. I need to identify why it is erroring out. Without device output it is difficult to debug

@Kani999
Copy link
Author

Kani999 commented Oct 24, 2022

@Taarini is it okay to share the last command from the bgp_iosxr_R199-lab_console.txt?

LAB#show bgp instance all all all neighbors 1.2.3.4 advertised-routes
Mon Oct 17 13:20:55.676 METDST

BGP instance 0: 'default'
=========================

Address Family: VPNv4 Unicast
-----------------------------


Address Family: VPNv6 Unicast
-----------------------------


Address Family: IPv6 Labeled-unicast
------------------------------------


Address Family: IPv4 Unicast
----------------------------


Address Family: IPv4 Multicast
------------------------------


Address Family: IPv6 Unicast
----------------------------


Address Family: IPv6 Multicast
------------------------------


Address Family: L2VPN VPLS
--------------------------


Address Family: L2VPN VPWS
--------------------------


Address Family: IPv4 MVPN
-------------------------


Address Family: IPv6 MVPN
-------------------------


Address Family: IPv4 Flowspec
-----------------------------


Address Family: IPv6 Flowspec
-----------------------------


Address Family: VPNv4 Flowspec
------------------------------


Address Family: VPNv6 Flowspec
------------------------------

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