-
Notifications
You must be signed in to change notification settings - Fork 55
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
genie module or parsers unstable with cat4500 switch #143
Comments
Kindly give sometime analyze your issue and get back to you. |
Hi , You’ve written your parser, you’ve run tests on your parser, and you’re ready to contribute your parser. Great! For your convenience, the steps required to make a good pull request are outlined here, but before you start them, go read the pyATS contribution guide. Seriously. It’s good stuff. Please follow the steps closely as it saves time for you and also for our development team! The genieparser repo README also contains useful information on submitting your parser. Make sure your testing passed via GitHub Actions. Fix any errors found in GitHub Actions result. Create a new changelog file in genieparser/changelog/undistributed/. The genieparser repo README explains how in the how to write changelog section. Commit and push your changes to your forked genieparser repo. Create a pull request Fill out the Description, Motivation and Context, Impact, and Screenshots sections of the pull request form. Complete the Checklist section. Submit your pull request! |
Hi , |
Hi , |
I am sorry @sumsehga, I do not have any test/sandbox setup for these devices and will not be able to share actual device outputs
From: sumsehga ***@***.***>
Date: Wednesday, November 29, 2023 at 7:51 AM
To: CiscoTestAutomation/genielibs ***@***.***>
Cc: Gopu, Revanth ***@***.***>, Manual ***@***.***>
Subject: Re: [CiscoTestAutomation/genielibs] genie module or parsers unstable with cat4500 switch (Issue #143)
Hi ,
Please can share the devices output the above commands.
—
Reply to this email directly, view it on GitHub<#143 (comment)>, or unsubscribe<https://github.com/notifications/unsubscribe-auth/AJHQUMP2WWEMDT3CVEP2RRDYG44XDAVCNFSM6AAAAAA7OGRGW6VHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMYTQMZRHEZTKNBZGM>.
You are receiving this because you are subscribed to this thread.Message ID: ***@***.***>
|
Hi, So, kindly share the output in this group and let me know. |
Hi , |
Experiencing various errors while using pyats genie libs for cat4ks. Are cat4ks supported with this framework? Can someone review below observations and suggest?
Here is the testbed used:
TEST-DEVICE: os: iosxe platform: cat4k credentials: default: password: "%ENV{device_password}" username: "%ENV{device_user}" connections: cli: protocol: ssh ip: 10.1.1.1 custom: abstraction: # added order: # Added - os # Added - platform # Added
python script to connect to device:
from genie.testbed import load from pprint import pprint tb = load('/tmp/testbed.yaml') device = tb.devices['TEST-DEVICE'] device.connect()
Trying to use genie module
device.parse("show platform")
receiving an error:show platform show platform Incomplete command. %TEST-DEVICE Traceback (most recent call last): File "/usr/local/lib/python3.11/site-packages/unicon/plugins/generic/service_implementation.py", line 740, in call_service self.result = self.get_service_result() ^^^^^^^^^^^^^^^^^^^^^^^^^ File "src/unicon/bases/routers/services.py", line 235, in unicon.bases.routers.services.BaseService.get_service_result unicon.core.errors.SubCommandFailure: ('sub_command failure, patterns matched in the output:', ['^%\\s*[Ii]ncomplete (command|input)'], 'service result', 'show platform\r\nshow platform\r\n% Incomplete command.\r\n\r\nTEST-DEVICE#') The above exception was the direct cause of the following exception: Traceback (most recent call last): File "src/genie/metaparser/_metaparser.py", line 308, in genie.metaparser._metaparser.MetaParser.parse File "/usr/local/lib/python3.11/site-packages/genie/libs/parser/iosxe/show_platform.py", line 2886, in cli out = self.device.execute(self.cli_command) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "src/unicon/bases/routers/services.py", line 259, in unicon.bases.routers.services.BaseService.__call__ File "/usr/local/lib/python3.11/site-packages/unicon/plugins/generic/service_implementation.py", line 745, in call_service raise SubCommandFailure("Command execution failed", err) from err unicon.core.errors.SubCommandFailure: ('Command execution failed', SubCommandFailure('sub_command failure, patterns matched in the output:', ['^%\\s*[Ii]ncomplete (command|input)'], 'service result', 'show platform\r\nshow platform\r\n% Incomplete command.\r\n\r\nTEST-DEVICE#')) The above exception was the direct cause of the following exception: Traceback (most recent call last): File "/tmp/run_commands.py", line 17, in <module> parse_info = device.parse("show platform") ^^^^^^^^^^^^^^^^^^^^^^^^^^ File "src/genie/conf/base/device.py", line 531, in genie.conf.base.device.Device.parse File "src/genie/conf/base/device.py", line 570, in genie.conf.base.device.Device._get_parser_output File "src/genie/conf/base/device.py", line 568, in genie.conf.base.device.Device._get_parser_output File "src/genie/metaparser/_metaparser.py", line 311, in genie.metaparser._metaparser.MetaParser.parse genie.metaparser.util.exceptions.InvalidCommandError: Invalid command has been executed
with parser
show inventory
:TEST-DEVICE# Traceback (most recent call last): File "/tmp/run_commands.py", line 17, in <module> parse_info = device.parse("show inventory") ^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "src/genie/conf/base/device.py", line 531, in genie.conf.base.device.Device.parse File "src/genie/conf/base/device.py", line 570, in genie.conf.base.device.Device._get_parser_output File "src/genie/conf/base/device.py", line 568, in genie.conf.base.device.Device._get_parser_output File "src/genie/metaparser/_metaparser.py", line 308, in genie.metaparser._metaparser.MetaParser.parse File "/usr/local/lib/python3.11/site-packages/genie/libs/parser/ios/show_platform.py", line 327, in cli subslot = group['subslot'] ^^^^^^^ UnboundLocalError: cannot access local variable 'slot_dict' where it is not associated with a value
with parser
show platform software sdwan service-chain database
:switch_stack_info = device.parse("show platform software sdwan service-chain database") ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "src/genie/conf/base/device.py", line 529, in genie.conf.base.device.Device.parse File "/usr/local/lib/python3.11/site-packages/genie/libs/parser/utils/common.py", line 285, in get_parser raise ParserNotFound(command, lookup._tokens) genie.libs.parser.utils.common.ParserNotFound: Could not find parser for show platform software sdwan service-chain database under ('ios', 'cat4k')
The text was updated successfully, but these errors were encountered: