Comments (11)
Thanks, we will look into it.
from genieparser.
It has been fixed, It will be part of the next release which is planned for next week.
from genieparser.
in witch release will the fix be included?
after upgrade #pip3 install genie.libs.parser --upgrade --pre
i get version - genie.libs.parser 19.7.1b5
still the same problem
/Petter
from genieparser.
This will be part of the official release which is releasing tomorrow.
Will let you know once it is.
from genieparser.
I still have the issue in the 19.8 releas.
pip3 list | grep parser
genie.libs.parser 19.8
genie.metaparser 19.8
genie.parsergen 19.8
error output
[2019-08-28 05:30:51,299] +++ tstipswi002: executing command 'show module' +++
show module
Chassis Type : WS-C4507R+E
Power consumed by backplane : 40 Watts
Mod Ports Card Type Model Serial No.
---+-----+--------------------------------------+------------------+-----------
1 48 10/100/1000BaseT Premium POE E Series WS-X4648-RJ45V+E JAE1747099J
3 6 Sup 7L-E 10GE (SFP+), 1000BaseX (SFP) WS-X45-SUP7L-E CAT1745L39S
6 48 10/100/1000BaseT Premium POE E Series WS-X4648-RJ45V+E JAE201200M0
7 48 10/100/1000BaseT Premium POE E Series WS-X4648-RJ45V+E JAE180604R8
M MAC addresses Hw Fw Sw Status
--+--------------------------------+---+------------+----------------+---------
1 24e9.b312.de30 to 24e9.b312.de5f 3.1 Ok
3 885a.92d1.aac0 to 885a.92d1.aac5 3.0 15.0(1r)SG10 03.06.07.E Ok
6 00f2.8b92.bf4e to 00f2.8b92.bf7d 3.1 Ok
7 b838.6144.4420 to b838.6144.444f 3.1 Ok
Mod Redundancy role Operating mode Redundancy status
----+-------------------+-------------------+----------------------------------
3 Active Supervisor RPR Active
System Failures:
----------------
Power Supply: bad/off (see 'show power')
tstipswi002#
---------------------------------------------------------------------------
SchemaEmptyParserError Traceback (most recent call last)
/git/pyats_version_test/inventering.py in <module>
33 for device in device_list:
34 log.info("parse command in '{d}'".format(d=device.name))
---> 35 inv_data = device.parse('show module')
36 all_data[device.name] = inv_data
37
/usr/local/lib64/python3.7/site-packages/genie/conf/base/device.cpython-37m-x86_64-linux-gnu.so in genie.conf.base.device.Device.parse()
/usr/local/lib64/python3.7/site-packages/genie/metaparser/_metaparser.cpython-37m-x86_64-linux-gnu.so in genie.metaparser._metaparser.MetaParser.parse()
/usr/local/lib64/python3.7/site-packages/genie/metaparser/_metaparser.cpython-37m-x86_64-linux-gnu.so in genie.metaparser._metaparser.MetaParser.parse()
/usr/local/lib64/python3.7/site-packages/genie/metaparser/util/schemaengine.cpython-37m-x86_64-linux-gnu.so in genie.metaparser.util.schemaengine.Schema.validate()
SchemaEmptyParserError: Parser Output is empty
from genieparser.
Hi @urskog84
The 'show module' output is vary depending on platform. So, we updated the parser for cat4k with abstraction. So, could you update your testbed yaml like below (only for the device) and verify if it works?
devices:
R1_xe:
os: iosxe <<< specify 'iosxe'
platform: cat4k <<< specify 'cat4k'
(snip)
custom:
abstraction:
order:
- os
- platform <<< add platform in order of abstraction
from genieparser.
same issue:
In [15]: sw2.os
Out[15]: 'iosxe'
In [16]: sw2.platform
Out[16]: 'cat4k'
from genieparser.
same issue:
In [15]: sw2.os Out[15]: 'iosxe' In [16]: sw2.platform Out[16]: 'cat4k'
could you please check below if you have custom section as I suggested?
>>> sw2.custom
AttrDict({'abstraction': {'order': ['os', 'platform']}})
On my env, I tested it works with below steps
>>> output = """
(output)
... """
>>> sw2.os
'iosxe'
>>> sw2.platform
'cat4k'
>>> sw2.parse('show module', output=output)
{'chassis_type': 'WS-C4507R+E', 'power_consumed': '40 Watts', 'mod': {1: {'port': 48, 'card_type': '10/100/1000BaseT Premium POE E Series', 'model': 'WS-X4648-RJ45V+E', 'serial_number': 'JAE1747099J', 'mac_address_from': '24e9.b312.de30', 'mac_address_to': '24e9.b312.de5f', 'hw_ver': '3.1', 'status': 'Ok'}, 3: {'port': 6, 'card_type': 'Sup 7L-E 10GE (SFP+), 1000BaseX (SFP)', 'model': 'WS-X45-SUP7L-E', 'serial_number': 'CAT1745L39S', 'mac_address_from': '885a.92d1.aac0', 'mac_address_to': '885a.92d1.aac5', 'hw_ver': '3.0', 'fw_ver': '15.0(1r)SG10', 'sw_ver': '03.06.07.E', 'status': 'Ok', 'redundancy_role': 'Active Supervisor', 'operating_mode': 'RPR', 'redundancy_status': 'Active'}, 6: {'port': 48, 'card_type': '10/100/1000BaseT Premium POE E Series', 'model': 'WS-X4648-RJ45V+E', 'serial_number': 'JAE201200M0', 'mac_address_from': '00f2.8b92.bf4e', 'mac_address_to': '00f2.8b92.bf7d', 'hw_ver': '3.1', 'status': 'Ok'}, 7: {'port': 48, 'card_type': '10/100/1000BaseT Premium POE E Series', 'model': 'WS-X4648-RJ45V+E', 'serial_number': 'JAE180604R8', 'mac_address_from': 'b838.6144.4420', 'mac_address_to': 'b838.6144.444f', 'hw_ver': '3.1', 'status': 'Ok'}}, 'system_failures': {'power_supply': "bad/off (see 'show power')"}}
if you see the issue even after checking above, could you please send the testbed yaml to pyats-support-ext(at)cisco.com? We will check more based on the file.
from genieparser.
Not not so easy to send the testbed.yml to you.
I have built a custom module as converts a ansible inventory to a pyats testbed file.
https://github.com/urskog84/pyats_version_test/blob/master/testbed_from_inventory.py
for testing right now i have to add/change the attributes manual in ipyathon termianl :(
In [37]: sw2.os
Out[37]: 'iosxe'
In [38]: sw2.platform
Out[38]: 'cat4k'
In [39]: sw2.custom
Out[39]: AttrDict({'abstraction': {'order': ['os', 'platform']}})
In [40]: sw2.parse('show module', output=output)
---------------------------------------------------------------------------
SchemaEmptyParserError Traceback (most recent call last)
<ipython-input-40-3f8396a34358> in <module>
----> 1 sw2.parse('show module', output=output)
/usr/local/lib64/python3.7/site-packages/genie/conf/base/device.cpython-37m-x86_64-linux-gnu.so in genie.conf.base.device.Device.parse()
/usr/local/lib64/python3.7/site-packages/genie/metaparser/_metaparser.cpython-37m-x86_64-linux-gnu.so in genie.metaparser._metaparser.MetaParser.parse()
/usr/local/lib64/python3.7/site-packages/genie/metaparser/_metaparser.cpython-37m-x86_64-linux-gnu.so in genie.metaparser._metaparser.MetaParser.parse()
/usr/local/lib64/python3.7/site-packages/genie/metaparser/util/schemaengine.cpython-37m-x86_64-linux-gnu.so in genie.metaparser.util.schemaengine.Schema.validate()
SchemaEmptyParserError: Parser Output is empty
from genieparser.
hmmm 😅. after sw2.disconnect()
and sw2.connect().
it works!!
great work team!!!!
from genieparser.
hmmm 😅. after
sw2.disconnect()
andsw2.connect().
it works!!great work team!!!!
Glad to hear it worked! I will close this issue soon. Thank you for reporting the issue and using pyATS/Genie!
from genieparser.
Related Issues (20)
- IOSXR: ShowL2VPNBridgeDomainDetail parser enhancement request HOT 16
- voice vlan parse HOT 13
- ios-xe: show bgp all neighbors HOT 4
- Enhancement: parser to detect nextline (long names) HOT 11
- iosxe - 4510 - show cable-diagnostics tdr interface {interface} HOT 8
- NXOS - show bgp vrf all neighbors (advertised routes|routes|received routes) - dotted notation ASN not captured HOT 19
- traceroute - sdwan device HOT 6
- show sdwan control connections - Parser Output is empty HOT 3
- Duplicate and closed "show Processes cpu sorted" parse failure for IOSXE on Cisco WS-C4507R+E HOT 2
- show Processes cpu sorted" parse failure for IOSXE on Cisco WS-C4507R+E HOT 4
- parser.nxos.show_bgp.py does not support ASN dot format HOT 14
- genie.libs.cisco added as requirement for genie 23.8 on pypi HOT 5
- ''show sdwan omp routes' fails to parse HOT 5
- genie parser "show environment" missing temperature readings HOT 3
- genie parser can't parse command "show mac address-table interface{interface}" HOT 2
- "show bgp vrf <vrf> all neighbors" parse failure for NXOS using BGP Confederation. HOT 4
- NXOS- 'show feature' regex error HOT 7
- Genie IOS-XE parser "show policy-map {name}" not parsing "priority" key/value HOT 30
- Only last value is kept when parsing PAGP DAD HOT 8
- "show bgp process vrf <vrf>" parser dosen't parse the evpn import/export route target HOT 8
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from genieparser.