ciscotestautomation / genielibs Goto Github PK
View Code? Open in Web Editor NEWgenie.libs contains libraries for configuring, retrieving and testing topologies
License: Apache License 2.0
genie.libs contains libraries for configuring, retrieving and testing topologies
License: Apache License 2.0
I can't learn OSPF from XE and XR devices. 100% reproducible. Looks like an error in the model.
I run genie in bash:
genie learn "ospf" --testbed-file virl.yaml --devices xe_device --output ospf_xe_device
Learning '['ospf']' on devices '['xe_device']'
100%|████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████| 1/1 [00:03<00:00, 3.05s/it]
+==============================================================================+
| Genie Learn Summary for device xe_device |
+==============================================================================+
| Connected to xe_device |
| - Log: ospf_xe_device/connection_xe_device.txt |
|------------------------------------------------------------------------------|
| Could not learn feature 'ospf' |
| - Exception: |
| ospf_xe_device/ospf_iosxe_xe_device_exception.txt |
| - Ops structure: |
| ospf_xe_device/ospf_iosxe_xe_device_ops.txt |
| - Device Console: |
| ospf_xe_device/ospf_iosxe_xe_device_console.txt |
|==============================================================================|
For XE:
Issue while building the feature
Traceback (most recent call last):
File "src/genie/cli/commands/learn.py", line 310, in genie.cli.commands.learn.LearnCommand._retrieve_ops
File "/Users/abelozer/.local/share/virtualenvs/CL-DevNet-2595-HBhBayNK/lib/python3.7/site-packages/genie/libs/ops/ospf/iosxe/ospf.py", line 1006, in learn
self.make(final_call=True)
File "src/genie/ops/base/base.py", line 95, in genie.ops.base.base.Base.make
File "src/genie/ops/base/maker.py", line 272, in genie.ops.base.maker.Maker.make
File "src/genie/ops/base/maker.py", line 375, in genie.ops.base.maker.Maker._call_parser
File "src/genie/metaparser/_metaparser.py", line 271, in genie.metaparser._metaparser.MetaParser.parse
File "/Users/abelozer/.local/share/virtualenvs/CL-DevNet-2595-HBhBayNK/lib/python3.7/site-packages/genie/libs/parser/iosxe/show_protocols.py", line 935, in cli
ospf_dict['areas'][area]['configured_interfaces'] = routing_network_intfs
KeyError: 'areas'
For XR:
Issue while building the feature
Traceback (most recent call last):
File "src/genie/cli/commands/learn.py", line 310, in genie.cli.commands.learn.LearnCommand._retrieve_ops
File "/Users/abelozer/.local/share/virtualenvs/CL-DevNet-2595-HBhBayNK/lib/python3.7/site-packages/genie/libs/ops/ospf/iosxr/ospf.py", line 960, in learn
self.make(final_call=True)
File "src/genie/ops/base/base.py", line 95, in genie.ops.base.base.Base.make
File "src/genie/ops/base/maker.py", line 272, in genie.ops.base.maker.Maker.make
File "src/genie/ops/base/maker.py", line 375, in genie.ops.base.maker.Maker._call_parser
File "src/genie/metaparser/_metaparser.py", line 271, in genie.metaparser._metaparser.MetaParser.parse
File "/Users/abelozer/.local/share/virtualenvs/CL-DevNet-2595-HBhBayNK/lib/python3.7/site-packages/genie/libs/parser/iosxr/show_ospf.py", line 924, in cli
sub_dict['priority'] = int(m.groupdict()['priority'])
UnboundLocalError: local variable 'sub_dict' referenced before assignment
when I run genie cli , i got error as below.
(genie) [jkim3@ipam01 examples]$ pyats learn interface --testbed testbed.yml --devices ios --output learn
Enter enable password for device TJCC_S1:
Enter enable password for device TJCC_S2:
Enter enable password for device TJCC_S3:
Enter enable password for device TJCC_S4:
Learning '['interface']' on devices '['ios']'
local variable 'dev' referenced before assignment
When Using the Learn STP Feature i get a SchemaMissingKeyError. This is on a 2960X running IOS.
Please See Attached Robot log and traceback below
`
SchemaMissingKeyError: Missing keys: [['rapid_pvst', 'vlans', 1, 'interfaces'], ['rapid_pvst', 'vlans', 2, 'interfaces'], ['rapid_pvst', 'vlans', 11, 'interfaces'], ['rapid_pvst', 'vlans', 12, 'interfaces'], ['rapid_pvst', 'vlans', 20, 'interfaces'], ['rapid_pvst', 'vlans', 99, 'interfaces'], ['rapid_pvst', 'vlans', 701, 'interfaces'], ['rapid_pvst', 'vlans', 900, 'interfaces'], ['rapid_pvst', 'vlans', 990, 'interfaces']] |
---|
`
`
Traceback (most recent call last): File "/venv/lib/python3.7/site-packages/genie/libs/robot/GenieRobot.py", line 162, in genie_ops_on_device device=device) File "/venv/lib/python3.7/site-packages/genie/libs/robot/GenieRobot.py", line 243, in genie_ops_on_device_alias_context ops.learn() File "/venv/lib/python3.7/site-packages/genie/libs/ops/stp/iosxe/stp.py", line 128, in learn self.make(final_call=True) File "/venv/lib/python3.7/site-packages/genie/ops/base/base.py", line 101, in make self.maker.make(*args, **kwargs) File "src/genie/ops/base/maker.py", line 312, in genie.ops.base.maker.Maker.make File "src/genie/ops/base/maker.py", line 418, in genie.ops.base.maker.Maker._call_parser File "src/genie/metaparser/_metaparser.py", line 302, in genie.metaparser._metaparser.MetaParser.parse File "src/genie/metaparser/_metaparser.py", line 284, in genie.metaparser._metaparser.MetaParser.parse File "src/genie/metaparser/util/schemaengine.py", line 405, in genie.metaparser.util.schemaengine.Schema.validate |
---|
`
Everytime Genie connects to a IOSXR device it makes configuration changes the line console and line default. Is there a way to turn that feature off?
RP/0/RSP0/CPU0:LAB-9010#
[2019-04-19 22:07:20,843] +++ initializing handle +++
[2019-04-19 22:07:20,844] +++ LAB-9010: executing command 'terminal length 0' +++
terminal length 0
Fri Apr 19 22:07:21.002 CDT
RP/0/RSP0/CPU0:LAB-9010#
[2019-04-19 22:07:21,093] +++ LAB-9010: executing command 'terminal width 0' +++
terminal width 0
Fri Apr 19 22:07:21.236 CDT
RP/0/RSP0/CPU0:LAB-9010#
[2019-04-19 22:07:21,312] +++ LAB-9010: config +++
configure terminal
Fri Apr 19 22:07:21.458 CDT
RP/0/RSP0/CPU0:LAB-9010(config)#no logging console
RP/0/RSP0/CPU0:LAB-9010(config)#line console
RP/0/RSP0/CPU0:LAB-9010(config-line)#exec-timeout 0 0
RP/0/RSP0/CPU0:LAB-9010(config-line)#absolute-timeout 0
RP/0/RSP0/CPU0:LAB-9010(config-line)#session-timeout 0
RP/0/RSP0/CPU0:LAB-9010(config-line)#line default
RP/0/RSP0/CPU0:LAB-9010(config-line)#exec-timeout 0 0
RP/0/RSP0/CPU0:LAB-9010(config-line)#absolute-timeout 0
RP/0/RSP0/CPU0:LAB-9010(config-line)#session-timeout 0
RP/0/RSP0/CPU0:LAB-9010(config-line)#commit
Fri Apr 19 22:07:23.373 CDT
RP/0/RSP0/CPU0:LAB-9010(config-line)#end
RP/0/RSP0/CPU0:LAB-9010#
When initially connecting to a device using Unicon configuration mode is entered in order to change terminal parameters and this is reflected in the syslog
Ideally, connecting to a device and learning information should be a read-only operation (ie to avoid the issue where entering configuration mode outside of maintenance window in a production environment is not allowed)
Is there a way to disable this behavior or can the desired parameters be set from outside of configuration mode instead?
[2019-06-11 14:03:23,252] +++ lab_2960_s: config +++
config term
Enter configuration commands, one per line. End with CNTL/Z.
lab_2960_s(config)#no logging console
lab_2960_s(config)#line console 0
lab_2960_s(config-line)#exec-timeout 0
lab_2960_s(config-line)#end
lab_2960_s#
lab_2960_s#show log
Jun 11 14:14:27.577: %SYS-5-CONFIG_I: Configured from console by admin on vty0
(10.1.1.1)
connections:
defaults:
class: 'unicon.Unicon'
vty:
protocol: ssh
ip: lab_2960_s
Hello,
I’m carrying out some tests using python scripting to get a similar output to pyats parse. As you know, this provides a parsed file with a list of excludes.
However, I haven’t found a method/ attribute to retrieve those excludes and include them in the python parsed output. I can find the excludes of show commands browsing the methods - or running the equivalent pyats parse command -, yeat I’m looking for a more dynamic method.
Many thanks and regards.
I'm trying to learn ospf feature but in some routers i had this error:
Issue while parsing: <class 'genie.libs.parser.iosxe.show_protocols.ShowIpProtocols'>
Traceback (most recent call last):
File "src/genie/cli/commands/learn.py", line 365, in genie.cli.commands.learn.LearnCommand._retrieve_ops
File "/home/douglas.rodrigues/.local/lib/python3.8/site-packages/genie/libs/ops/ospf/iosxe/ospf.py", line 1017, in learn
self.make(final_call=True)
File "/home/douglas.rodrigues/.local/lib/python3.8/site-packages/genie/ops/base/base.py", line 101, in make
self.maker.make(*args, **kwargs)
File "src/genie/ops/base/maker.py", line 312, in genie.ops.base.maker.Maker.make
File "src/genie/ops/base/maker.py", line 418, in genie.ops.base.maker.Maker._call_parser
File "src/genie/metaparser/_metaparser.py", line 303, in genie.metaparser._metaparser.MetaParser.parse
File "src/genie/metaparser/_metaparser.py", line 285, in genie.metaparser._metaparser.MetaParser.parse
File "src/genie/metaparser/util/schemaengine.py", line 404, in genie.metaparser.util.schemaengine.Schema.validate
genie.metaparser.util.exceptions.SchemaMissingKeyError: Missing keys: [['protocols', 'ospf', 'vrf', 'default', 'address_family', 'ipv4', 'instance', '32', 'incoming_filter_list']]
in the line "Issue while parsing", it's referencing iosxe, but i has this same issue on ios and iosxe routers (some routers, not all)
https://pubhub.devnetcloud.com/media/genie-feature-browser/docs/#/models/vxlan
only shows the model, but not the config or oper information in the documentation.
Also, the model data gives a 404 error.
This has the wrong docstring for what the API actually does.
ipyats --testbed testbed
In [39]: core.ping(addr="10.68.128.1", vrf="DC", int="vlan946", extd_ping='yes')
[2019-06-04 05:56:15,638] +++ nrkcore01: ping +++
ping
Translating "ping"
% Invalid source. Must use same-VRF IP address or full interface name without spaces (e.g. Serial0/1)
Source address or interface:
When using the get_snmp_snmpwalk API it is only available under IOS-XE. The issue is that the python runs the snmpwalk command. I think this is a Linux command and won't run on a IOS-XE device. when trying to run on a Linux box you get an error saying can't find under com or Linux.
Is it possible to get this API added under Linux? I'm using the API within the robot framework.
Hi team,
Want to report an issue on NX9K while trying to learm mcast.
Issue while parsing: <class 'genie.libs.parser.nxos.show_mcast.ShowIpStaticRouteMulticast'>
Traceback (most recent call last):
File "src/genie/cli/commands/learn.py", line 343, in genie.cli.commands.learn.LearnCommand._retrieve_ops
File "/srv/netDevOps/py3-venv/lib/python3.6/site-packages/genie/libs/ops/mcast/nxos/mcast.py", line 117, in learn
self.make(final_call=True)
File "/srv/netDevOps/py3-venv/lib/python3.6/site-packages/genie/ops/base/base.py", line 101, in make
self.maker.make(*args, **kwargs)
File "src/genie/ops/base/maker.py", line 310, in genie.ops.base.maker.Maker.make
File "src/genie/ops/base/maker.py", line 414, in genie.ops.base.maker.Maker._call_parser
File "src/genie/metaparser/_metaparser.py", line 302, in genie.metaparser._metaparser.MetaParser.parse
File "src/genie/metaparser/_metaparser.py", line 284, in genie.metaparser._metaparser.MetaParser.parse
File "src/genie/metaparser/util/schemaengine.py", line 405, in genie.metaparser.util.schemaengine.Schema.validate
genie.metaparser.util.exceptions.SchemaMissingKeyError: Missing keys: [['vrf', 'default', 'address_family'], ['vrf', 'management', 'address_family']]
-Device output of ""show ip mroute vrf all"
IP Multicast Routing Table for VRF "default"
(*, 232.0.0.0/8), uptime: 7w0d, mrib pim ip
Incoming interface: Null, RPF nbr: 0.0.0.0
Outgoing interface list: (count: 0)
(*, 239.0.0.2/32), uptime: 7w0d, mrib nve pim ip
Incoming interface: Null, RPF nbr: 0.0.0.0
Outgoing interface list: (count: 1)
nve1, uptime: 7w0d, nve
(10.150.1.5/32, 239.0.0.2/32), uptime: 7w0d, mrib nve pim ip
Incoming interface: Null, RPF nbr: 0.0.0.0
Outgoing interface list: (count: 0)
IP Multicast Routing Table for VRF "ECOM-QUALITY"
Kind regards,
Dan
Hi Guys,
Trying to use the genie learn('ospf') function on a iosxr equipement.
The output start and close with this error :
Traceback (most recent call last):
File "", line 1, in
File "src/genie/conf/base/device.py", line 626, in genie.conf.base.device.Device.learn
File "/home/admin/pyATS/lib/python3.6/site-packages/genie/libs/ops/ospf/iosxr/ospf.py", line 1015, in learn
self.make(final_call=True)
File "/home/admin/pyATS/lib/python3.6/site-packages/genie/ops/base/base.py", line 101, in make
self.maker.make(*args, **kwargs)
File "src/genie/ops/base/maker.py", line 312, in genie.ops.base.maker.Maker.make
File "src/genie/ops/base/maker.py", line 418, in genie.ops.base.maker.Maker._call_parser
File "src/genie/metaparser/_metaparser.py", line 303, in genie.metaparser._metaparser.MetaParser.parse
File "src/genie/metaparser/_metaparser.py", line 285, in genie.metaparser._metaparser.MetaParser.parse
File "src/genie/metaparser/util/schemaengine.py", line 404, in genie.metaparser.util.schemaengine.Schema.validate
genie.metaparser.util.exceptions.SchemaMissingKeyError: Missing keys: [['protocols', 'bgp', 'nsr', 'enable']]
The router running Version 5.1.3 IOSXR.
Thanks for your help ;-)
Olivier.
Hi,
I use parse/learn function inside python script , when I run it against some heavily used devices, the parse/learn timed out at 60 seconds, How can we adjust the timeout value?
I found that how to adjust timeout it in Genie cli using --timeout argument, but I couldn't find out how to do it in python function like "output = device.parse('show interface detail')"
Your help will be appreciated
How is the trunk_add_vlans field on the Interface model used?
I tried with the below code, yet all it does is output the following:
Traceback (most recent call last):
File "ats/main.py", line 23, in <module>
raise Exception(interface.build_config(apply=False))
Exception: interface Ethernet1/48
exit
I would have expected
Traceback (most recent call last):
File "ats/main.py", line 23, in <module>
raise Exception(interface.build_config(apply=False))
Exception: interface Ethernet1/48
switchport trunk add vlan 2222
exit
from dotenv import load_dotenv
from genie.testbed import load
from genie.libs.conf.vlan import Vlan
from genie.libs.conf.interface import Interface
load_dotenv()
tb = load('testbed.yml')
# Connect to all devices
tb.connect()
VLAN_ID = '2222'
vlan = Vlan(vlan_id=VLAN_ID, name='Test')
config = {}
for name, device in tb.devices.items():
device.add_feature(vlan)
interface = Interface(device=device, name='Ethernet1/48')
interface.trunk_add_vlans = VLAN_ID
raise Exception(interface.build_config(apply=False))
config[name] = device.build_config(apply=False)
for name, lines in config.items():
print(f'*** Proposed config changes for {name} ***')
print(lines)
Thanks.
Hello -
I am having an issue with learn('vrf') on IOS-XE. So far my other learn functions are all fine and I am re-using the same section of code but learn('vrf') fails
'Vrf' object has no attribute 'info'
The same platforms I am able to parse('show vrf') without issue but I cannot learn.
class ParseLearnFunction:
@staticmethod
def parse_learn(steps, device, function_name: str):
with steps.start(f'Learning {function_name}',continue_=True) as step:
try:
return device.learn(function_name).info
except Exception as e:
step.failed('Could not learn it correctly\n{e}'.format(e=e))
return None
# ACLs
self.learned_acl = ParseLearnFunction.parse_learn(steps, device, "acl")
# ARP
self.learned_arp = ParseLearnFunction.parse_learn(steps, device, "arp")
# Dot1X
self.learned_dot1x = ParseLearnFunction.parse_learn(steps, device, "dot1x")
# Interface
self.learned_interface = ParseLearnFunction.parse_learn(steps, device, "interface")
# OSPF
self.learned_ospf = ParseLearnFunction.parse_learn(steps, device, "ospf")
# STP
self.learned_stp = ParseLearnFunction.parse_learn(steps, device, "stp")
# VLAN
self.learned_vlan = ParseLearnFunction.parse_learn(steps, device, "vlan")
# VRF
self.learned_vrf = ParseLearnFunction.parse_learn(steps, device, "vrf")
Is there something different or special with "vrf" ?
2021-04-22T14:02:04: %EASYPY-INFO: -- Collect_Information FAILED 2021-04-22T14:02:04: %EASYPY-INFO:
-- parse FAILED
2021-04-22T14:02:04: %EASYPY-INFO: |-- STEP 1: Learning acl PASSED
2021-04-22T14:02:04: %EASYPY-INFO: |-- STEP 2: Learning arp PASSED
2021-04-22T14:02:04: %EASYPY-INFO: |-- STEP 3: Learning dot1x PASSED
2021-04-22T14:02:04: %EASYPY-INFO: |-- STEP 4: Learning interface PASSED
2021-04-22T14:02:04: %EASYPY-INFO: |-- STEP 5: Learning ospf PASSED
2021-04-22T14:02:04: %EASYPY-INFO: |-- STEP 6: Learning stp PASSED
2021-04-22T14:02:04: %EASYPY-INFO: |-- STEP 7: Learning vlan PASSED
2021-04-22T14:02:04: %EASYPY-INFO: |-- STEP 8: Learning vrf FAILED
Hello,
I would like to know if there is some workaround to apply the ACL model based instructions for standard access-lists. I mean, some stepped process rather than a raw dev.configure("ip access-list standard <name>")
.
Many thanks and regards.
There are 2 sids per link in Segment routing. 'get_ospf_sr_adj_sid_and_neighbor_address' is giving only the protected sid. We need the api to get both sids with keys something like 'protect' and 'unprotect'
You can see in the below log for both neighbor addresses there is only one sid returned and it does not indicate whether its protected or unprotected. If the flags is 'DU' its unprotected sid and flags 'DP' is protected sid
get_ospf_sr_adj_sid_and_neighbor_address(rtr1,'100')
2021-09-28 11:15:35,514: %UNICON-INFO: +++ R1 with alias 'a': executing command 'show ip ospf segment-routing adjacency-sid' +++
show ip ospf segment-routing adjacency-sid
OSPF Router with ID (1.1.1.1) (Process ID 100)
Flags: S - Static, D - Dynamic, P - Protected, U - Unprotected, G - Group, L - Adjacency Lost
Adj-Sid Neighbor ID Interface Neighbor Addr Flags Backup Nexthop Backup Interface
17 1.1.1.6 BD161 1.1.1.6 D U
19 1.1.1.6 BD161 1.1.1.6 D P 1.6.1.6 BD162
24 1.1.1.6 BD162 1.6.1.6 D U
26 1.1.1.6 BD162 1.6.1.6 D P 1.1.1.6 BD161
R1#
{'1.1.1.6': '19', '1.6.1.6': '26'}
Receiving error: Exception: Parser ShowDot1xAllStatistics schema checking failed
when using learn dot1x
from genie cli.
Tested with:
IOS v15.(4)E4
IOSXE v3.6.8E
IOS Traceback:
Issue while building the feature
Traceback (most recent call last):
File "src/genie/metaparser/_metaparser.py", line 284, in genie.metaparser._metaparser.MetaParser.parse
File "src/genie/metaparser/util/schemaengine.py", line 302, in genie.metaparser.util.schemaengine.Schema.validate
File "src/genie/metaparser/util/schemaengine.py", line 277, in genie.metaparser.util.schemaengine.Schema.validate
File "src/genie/metaparser/util/schemaengine.py", line 371, in genie.metaparser.util.schemaengine.Schema.validate
File "src/genie/metaparser/util/schemaengine.py", line 346, in genie.metaparser.util.schemaengine.Schema.validate
File "src/genie/metaparser/util/schemaengine.py", line 302, in genie.metaparser.util.schemaengine.Schema.validate
File "src/genie/metaparser/util/schemaengine.py", line 277, in genie.metaparser.util.schemaengine.Schema.validate
File "src/genie/metaparser/util/schemaengine.py", line 302, in genie.metaparser.util.schemaengine.Schema.validate
File "src/genie/metaparser/util/schemaengine.py", line 277, in genie.metaparser.util.schemaengine.Schema.validate
File "src/genie/metaparser/util/schemaengine.py", line 245, in genie.metaparser.util.schemaengine.Schema.validate
genie.metaparser.util.exceptions.SchemaTypeError: interfaces.GigabitEthernet0/1.statistics.lastrxsrcmac: Expected type '<class 'str'>' but got type '0'(<class 'int'>)
The above exception was the direct cause of the following exception:
Traceback (most recent call last):
File "src/genie/cli/commands/learn.py", line 312, in genie.cli.commands.learn.LearnCommand._retrieve_ops
File "/home/taml006/environments/cisco_pyats/lib/python3.6/site-packages/genie/libs/ops/dot1x/iosxe/dot1x.py", line 71, in learn
self.make(final_call=True)
File "src/genie/ops/base/base.py", line 101, in genie.ops.base.base.Base.make
File "src/genie/ops/base/maker.py", line 307, in genie.ops.base.maker.Maker.make
File "src/genie/ops/base/maker.py", line 410, in genie.ops.base.maker.Maker._call_parser
File "src/genie/metaparser/_metaparser.py", line 305, in genie.metaparser._metaparser.MetaParser.parse
Exception: Parser ShowDot1xAllStatistics schema checking failed
IOSXE Traceback:
Issue while building the feature
Traceback (most recent call last):
File "src/genie/metaparser/_metaparser.py", line 284, in genie.metaparser._metaparser.MetaParser.parse
File "src/genie/metaparser/util/schemaengine.py", line 302, in genie.metaparser.util.schemaengine.Schema.validate
File "src/genie/metaparser/util/schemaengine.py", line 277, in genie.metaparser.util.schemaengine.Schema.validate
File "src/genie/metaparser/util/schemaengine.py", line 371, in genie.metaparser.util.schemaengine.Schema.validate
File "src/genie/metaparser/util/schemaengine.py", line 346, in genie.metaparser.util.schemaengine.Schema.validate
File "src/genie/metaparser/util/schemaengine.py", line 302, in genie.metaparser.util.schemaengine.Schema.validate
File "src/genie/metaparser/util/schemaengine.py", line 277, in genie.metaparser.util.schemaengine.Schema.validate
File "src/genie/metaparser/util/schemaengine.py", line 302, in genie.metaparser.util.schemaengine.Schema.validate
File "src/genie/metaparser/util/schemaengine.py", line 277, in genie.metaparser.util.schemaengine.Schema.validate
File "src/genie/metaparser/util/schemaengine.py", line 245, in genie.metaparser.util.schemaengine.Schema.validate
genie.metaparser.util.exceptions.SchemaTypeError: interfaces.GigabitEthernet2/1.statistics.lastrxsrcmac: Expected type '<class 'str'>' but got type '9'(<class 'int'>)
The above exception was the direct cause of the following exception:
Traceback (most recent call last):
File "src/genie/cli/commands/learn.py", line 312, in genie.cli.commands.learn.LearnCommand._retrieve_ops
File "/home/taml006/environments/cisco_pyats/lib/python3.6/site-packages/genie/libs/ops/dot1x/iosxe/dot1x.py", line 71, in learn
self.make(final_call=True)
File "src/genie/ops/base/base.py", line 101, in genie.ops.base.base.Base.make
File "src/genie/ops/base/maker.py", line 307, in genie.ops.base.maker.Maker.make
File "src/genie/ops/base/maker.py", line 410, in genie.ops.base.maker.Maker._call_parser
File "src/genie/metaparser/_metaparser.py", line 305, in genie.metaparser._metaparser.MetaParser.parse
Exception: Parser ShowDot1xAllStatistics schema checking failed
Hello,
I’m carrying out some tests using python scripting to get a similar output to pyats learn. As you know, this provides a console file with the output of several show commands.
However, I haven't found a method/ attribute that provides what show commands were run. I can get the manual list from the Genie model description or figure out from the arp files, but I'm looking for a more dynamic method.
Many thanks and regards.
I am trying to use LISP model in my testcases, but I cannot learn data properly.
Used to test
(venv) # genie learn lisp --testbed-file ../sda.yaml
Learning '['lisp']' on devices '['Fab1-BC', 'Fab1-E']'
100%|██████████████████████████████████████████████████████████████████████████| 1/1 [00:08<00:00, 8.27s/it]
+==============================================================================+
| Genie Learn Summary for device Fab1-BC |
+==============================================================================+
| Connected to Fab1-BC |
| - Log: ./connection_Fab1-BC.txt |
|------------------------------------------------------------------------------|
| Could not learn feature 'lisp' |
| - Exception: ./lisp_iosxe_Fab1-BC_exception.txt |
| - Ops structure: ./lisp_iosxe_Fab1-BC_ops.txt |
| - Device Console: ./lisp_iosxe_Fab1-BC_console.txt |
|==============================================================================|
+==============================================================================+
| Genie Learn Summary for device Fab1-E |
+==============================================================================+
| Connected to Fab1-E |
| - Log: ./connection_Fab1-E.txt |
|------------------------------------------------------------------------------|
| Could not learn feature 'lisp' |
| - Exception: ./lisp_iosxe_Fab1-E_exception.txt |
| - Ops structure: ./lisp_iosxe_Fab1-E_ops.txt |
| - Device Console: ./lisp_iosxe_Fab1-E_console.txt |
|==============================================================================|
Exception content - Border
(venv) # cat ./lisp_iosxe_Fab1-BC_exception.txt
Issue while building the feature
Traceback (most recent call last):
File "src/genie/ops/base/maker.py", line 816, in genie.ops.base.maker.Leaf.make
File "src/genie/ops/base/maker.py", line 58, in genie.ops.base.maker._merge_dict
File "src/genie/ops/base/maker.py", line 58, in genie.ops.base.maker._merge_dict
File "src/genie/ops/base/maker.py", line 58, in genie.ops.base.maker._merge_dict
[Previous line repeated 3 more times]
File "src/genie/ops/base/maker.py", line 64, in genie.ops.base.maker._merge_dict
Exception: number_registered_sites cannot be merged as it already exists with type <class 'int'>.
The above exception was the direct cause of the following exception:
Traceback (most recent call last):
File "src/genie/ops/base/maker.py", line 352, in genie.ops.base.maker.Maker.make
File "src/genie/ops/base/maker.py", line 819, in genie.ops.base.maker.Leaf.make
ValueError: Cannot set info to the object
The above exception was the direct cause of the following exception:
Traceback (most recent call last):
File "src/genie/cli/commands/learn.py", line 365, in genie.cli.commands.learn.LearnCommand._retrieve_ops
File "/root/devnet/pyATS/genielibs/pkgs/ops-pkg/src/genie/libs/ops/lisp/iosxe/lisp.py", line 69, in learn
self.make() ; self.make()
File "/root/devnet/pyATS_GENIE_NetDevOpsLive/venv/lib64/python3.6/site-packages/genie/ops/base/base.py", line 101, in make
self.maker.make(*args, **kwargs)
File "src/genie/ops/base/maker.py", line 359, in genie.ops.base.maker.Maker.make
Exception: Creation of the leaf with 'src' ['lisp_router_instances', '(?P<lisp_router_instance>.*)', 'service', 'ipv4', 'instance_id', '(?P<iid>.*)', 'map_server', 'summary', 'number_registered_sites'] failed to be created.
Exception content - Edge
(venv) # cat ./lisp_iosxe_Fab1-E_exception.txt
Issue while parsing: <class 'genie.libs.parser.iosxe.show_lisp.ShowLispService'>
Traceback (most recent call last):
File "src/genie/cli/commands/learn.py", line 365, in genie.cli.commands.learn.LearnCommand._retrieve_ops
File "/root/devnet/pyATS/genielibs/pkgs/ops-pkg/src/genie/libs/ops/lisp/iosxe/lisp.py", line 69, in learn
self.make() ; self.make()
File "/root/devnet/pyATS_GENIE_NetDevOpsLive/venv/lib64/python3.6/site-packages/genie/ops/base/base.py", line 101, in make
self.maker.make(*args, **kwargs)
File "src/genie/ops/base/maker.py", line 312, in genie.ops.base.maker.Maker.make
File "src/genie/ops/base/maker.py", line 418, in genie.ops.base.maker.Maker._call_parser
File "src/genie/metaparser/_metaparser.py", line 303, in genie.metaparser._metaparser.MetaParser.parse
File "src/genie/metaparser/_metaparser.py", line 285, in genie.metaparser._metaparser.MetaParser.parse
File "src/genie/metaparser/util/schemaengine.py", line 404, in genie.metaparser.util.schemaengine.Schema.validate
genie.metaparser.util.exceptions.SchemaMissingKeyError: Show Command: show lisp all service ipv4
Missing keys: [['lisp_router_instances', 0, 'service', 'ipv4', 'source_locator_configuration', 'vlans']]
Library versions
(venv) # pyats version check
You are currently running pyATS version: 21.5.1
Python: 3.6.8 [64bit]
Package Version
---------------------------- -------
genie 21.5.1
genie.libs.clean 21.5
genie.libs.conf 21.5
genie.libs.filetransferutils 21.5
genie.libs.health 21.5
genie.libs.ops 21.5
genie.libs.parser 21.5
genie.libs.robot 21.5
genie.libs.sdk 21.5
genie.telemetry 21.5
genie.trafficgen 21.5
pyats 21.5.1
pyats.aereport 21.5.1
pyats.aetest 21.5.1
pyats.async 21.5.1
pyats.connections 21.5.1
pyats.contrib 21.5
pyats.datastructures 21.5.1
pyats.easypy 21.5.1
pyats.kleenex 21.5.1
pyats.log 21.5.1
pyats.reporter 21.5.1
pyats.results 21.5.1
pyats.robot 21.5.1
pyats.tcl 21.5.1
pyats.topology 21.5.1
pyats.utils 21.5.2
unicon 21.5.1
unicon.plugins 21.5
When i try and do a clean on a IOS device I get the following error
LookupError: No such attribute in abstraction package 'genie.libs.clean': 'genie.libs.clean.stages.image_handler.ImageHandler'
Please see attached Kleenex log file
Kleenex.log
I have run this test several times on different IOSXR devices running 6.2.3 and receive the same error.
Genie output
Learning '['ospf']' on devices '['LAB-9010']'
100%|██████████████████████████████████████████████████████████████████████████████████████████████████| 1/1 [00:01<00:00, 1.53s/it]
+==============================================================================+
| Genie Learn Summary for device LAB-9010 |
+==============================================================================+
| Connected to LAB-9010 |
| - Log: tests/normal_ospf/connection_LAB-9010.txt |
|------------------------------------------------------------------------------|
| Could not learn feature 'ospf' |
| - Exception: tests/normal_ospf/ospf_iosxr_LAB-9010_exception.txt |
| - Ops structure: tests/normal_ospf/ospf_iosxr_LAB-9010_ops.txt |
| - Device Console: tests/normal_ospf/ospf_iosxr_LAB-9010_console.txt |
|==============================================================================|
Log text file
Traceback (most recent call last):
File "src/genie/cli/commands/learn.py", line 310, in genie.cli.commands.learn.LearnCommand._retrieve_ops
File "/home/patrick.oconnor/genie/env/lib/python3.6/site-packages/genie/libs/ops/ospf/iosxr/ospf.py", line 960, in learn
self.make(final_call=True)
File "src/genie/ops/base/base.py", line 95, in genie.ops.base.base.Base.make
File "src/genie/ops/base/maker.py", line 272, in genie.ops.base.maker.Maker.make
File "src/genie/ops/base/maker.py", line 375, in genie.ops.base.maker.Maker._call_parser
File "src/genie/metaparser/_metaparser.py", line 302, in genie.metaparser._metaparser.MetaParser.parse
File "src/genie/metaparser/_metaparser.py", line 284, in genie.metaparser._metaparser.MetaParser.parse
File "src/genie/metaparser/util/schemaengine.py", line 392, in genie.metaparser.util.schemaengine.Schema.validate
genie.metaparser.util.exceptions.SchemaMissingKeyError: Missing keys: [['vrf', 'default', 'address_family', 'ipv4', 'instance', '1', 'stub_router', 'on_startup', 'summary_lsa_metric'], ['vrf', 'default', 'address_family', 'ipv4', 'instance', '1', 'stub_router', 'on_startup', 'include_stub'], ['vrf', 'default', 'address_family', 'ipv4', 'instance', '1', 'stub_router', 'on_startup', 'external_lsa_metric'], ['vrf', 'default', 'address_family', 'ipv4', 'instance', '1', 'stub_router', 'on_startup', 'external_lsa'], ['vrf', 'default', 'address_family', 'ipv4', 'instance', '1', 'stub_router', 'on_startup', 'summary_lsa']]```
I can forward a copy of the output received from "show ospf vrf all inclusive" if needed
Specifically was trying to use the show_ospf library and keep choking on trying to load a TenGigabitEthernet interface. I changed the regex in one place but then it broke in another. Please add support for 10gig.
get_ospf_interfaces
Why is the AS number of BGP required in getting the configuration of OSPF interface?
There seemed to be no difference in the results of the acquisition whether I left it blank or put in a value.
It seems to me that the insntans key is not included in 'parse("show ip ospf interface brief")'
Is ospf_process_id correct?
def get_ospf_interfaces(device, ospf_process_id ):
""" Retrieve interface for ospf using ospf_process_id
Args:
device ('obj'): Device object
ospf_process_id ('int'): OSPF Process ID
Returns:
List of interfaces
Raises:
SchemaEmptyParserError
"""
try:
out = device.parse("show ip ospf interface brief")
except SchemaEmptyParserError:
return None
try:
areas_dict = out["instance"][ospf_process_id ]['areas']
except KeyError:
return None
As the title describes, receive unboundLocalError when running genie learn routing on IOSXR device.
Issue while building the feature
Traceback (most recent call last):
File "src/genie/cli/commands/learn.py", line 310, in genie.cli.commands.learn.LearnCommand._retrieve_ops
File "/home/patrick.oconnor/genie/env/lib/python3.6/site-packages/genie/libs/ops/routing/iosxr/routing.py", line 96, in learn
self.make(final_call=True)
File "src/genie/ops/base/base.py", line 95, in genie.ops.base.base.Base.make
File "src/genie/ops/base/maker.py", line 272, in genie.ops.base.maker.Maker.make
File "src/genie/ops/base/maker.py", line 375, in genie.ops.base.maker.Maker._call_parser
File "src/genie/metaparser/_metaparser.py", line 271, in genie.metaparser._metaparser.MetaParser.parse
File "/home/patrick.oconnor/genie/env/lib/python3.6/site-packages/genie/libs/parser/iosxr/show_routing.py", line 534, in cli
if index not in result_dict['vrf'][vrf]['address_family'][af]['routes'][route]['next_hop'] \
UnboundLocalError: local variable 'index' referenced before assignment
Files will be sent to [email protected]
The following code should apply ip route 10.2.1.0/24 192.168.0.1
config to all devices in sr.devices
sr = StaticRouting()
sr.af = 'ipv4'
sr.route = '10.2.1.0/24'
sr.nexthop = '192.168.0.1'
device1.add_feature(sr)
device2.add_feature(sr)
sr.build_config()
The above config results in an empty configuration when build_config() is called
The configuration is not generated without device_attr
.
Hello,
I am building a basic script to retrieve the inventory from a customer installed based, however there is an exception when I run the command towards a 7600 router having the following error:
Issue with the parser show inventory
Traceback (most recent call last):
File "src/genie/cli/commands/parser.py", line 339, in genie.cli.commands.parser.ParserCommand.parse
File "src/genie/conf/base/device.py", line 522, in genie.conf.base.device.Device.parse
File "src/genie/conf/base/device.py", line 549, in genie.conf.base.device.Device._get_parser_output
File "src/genie/metaparser/_metaparser.py", line 272, in genie.metaparser._metaparser.MetaParser.parse
File "/home/.local/share/virtualenvs/pyats-bfefOSfd/lib/python3.6/site-packages/genie/libs/parser/ios/show_platform.py", line 303, in cli
subslot_dict = slot_dict
UnboundLocalError: local variable 'slot_dict' referenced before assignment
I am attaching the console output for your reference.
Files already sent to [email protected]
Hello,
I'm trying to import a certificate to the WLC but it's asking for user interaction always. I'm having 2 approaches to avoid this happening but "human input" is always needed.
Option 1: using SCP
dev.configure(crypto pki import <cert-filename> pkcs12 scp://<scp_IP>/<cert-filename> password <cert-password>)
This asks for:
Address or name of remote host [scp_IP]?
Source username [user]?
Source filename [path-to-cert]?
Password:
Option 2: using local file
After downloading the file in the WLC.
dev.configure(crypto pki import <cert-filename> pkcs12 flash:<cert-filename> password <cert-password>)
This asks for:
Source filename [path-to-cert]?
I've tried different combinations to add "/r" or "/n" to the previous command and with dev.execute but I haven't been able to complete the sequence.
In turn, for the WLC with aireos, this commands works and it accepts automatically the final question of starting the download.
dev.execute(["transfer download mode sftp",
"transfer download datatype webauthcert",
"transfer download serverip <server>,
"transfer download path <path>,
"transfer download filename <filename>,
"transfer download certpassword <certpassword>,
"transfer download username <username>,
"transfer download password <password>,
"transfer download start"])
That processes automaticatlly:
This may take some time.
Are you sure you want to start? (y/N) y
SFTP Webauth cert transfer starting.
SFTP receive complete... Installing Certificate.
Therefore, I would like to know whether an API for the new WLC 9800 series is going to be released that covers these features or if there is some way to interact with this configuration steps.
Many thanks and regards.
I am trying to use VRF model in my testcases, but I cannot learn data properly on some devices.
Tested on
No exceptions during genie learn process
(venv) [root@dpecak-centos-docker pyATS]# genie learn vrf --testbed-file sda.yaml
Learning '['vrf']' on devices '['Fab1-BC', 'Fab1-E', 'Fab1-WLC']'
100%|████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████| 1/1 [00:01<00:00, 1.27s/it]
+==============================================================================+
| Genie Learn Summary for device Fab1-BC |
+==============================================================================+
| Connected to Fab1-BC |
| - Log: ./connection_Fab1-BC.txt |
|------------------------------------------------------------------------------|
| Learnt feature 'vrf' |
| - Ops structure: ./vrf_iosxe_Fab1-BC_ops.txt |
| - Device Console: ./vrf_iosxe_Fab1-BC_console.txt |
|==============================================================================|
+==============================================================================+
| Genie Learn Summary for device Fab1-E |
+==============================================================================+
| Connected to Fab1-E |
| - Log: ./connection_Fab1-E.txt |
|------------------------------------------------------------------------------|
| Learnt feature 'vrf' |
| - Ops structure: ./vrf_iosxe_Fab1-E_ops.txt |
| - Device Console: ./vrf_iosxe_Fab1-E_console.txt |
|==============================================================================|
+==============================================================================+
| Genie Learn Summary for device Fab1-WLC |
+==============================================================================+
| Connected to Fab1-WLC |
| - Log: ./connection_Fab1-WLC.txt |
|------------------------------------------------------------------------------|
| Learnt feature 'vrf' |
| - Ops structure: ./vrf_iosxe_Fab1-WLC_ops.txt |
| - Device Console: ./vrf_iosxe_Fab1-WLC_console.txt |
|==============================================================================|
Cannot get output for Fab1-E and Fab1-WLC. Console and ops outputs are attached:
vrf_iosxe_Fab1-BC_console.txt
vrf_iosxe_Fab1-BC_ops.txt
vrf_iosxe_Fab1-E_console.txt
vrf_iosxe_Fab1-E_ops.txt
vrf_iosxe_Fab1-WLC_console.txt
vrf_iosxe_Fab1-WLC_ops.txt
Running pyats parse of show vrf detail returns correct output
Fab1-WLC
(venv) [root@dpecak-centos-docker pyATS]# pyats parse "show vrf detail" --testbed-file sda.yaml --devices Fab1-WLC
{
"Mgmt-vrf": {
"address_family": {
"ipv4 unicast": {
"flags": "0x0",
"table_id": "0x1",
"vrf_label": {
"allocation_mode": "per-prefix"
}
}
},
"cli_format": "Old",
"description": "OOB Mgmt",
"flags": "0x8",
"interface": {
"GigabitEthernet1": {
"vrf": "Mgmt-vrf"
}
},
"interfaces": [
"GigabitEthernet1"
],
"support_af": "IPv4 only",
"vrf_id": 1
}
}
Fab1-BC
(venv) [root@dpecak-centos-docker pyATS]# pyats parse "show vrf detail" --testbed-file sda.yaml --devices Fab1-BC
{
"Mgmt-vrf": {
"address_family": {
"ipv4 unicast": {
"flags": "0x0",
"table_id": "0x1"
},
"ipv6 unicast": {
"flags": "0x0",
"table_id": "0x1E000001"
}
},
"cli_format": "New",
"flags": "0x1808",
"interface": {
"GigabitEthernet0/0": {
"vrf": "Mgmt-vrf"
}
},
"interfaces": [
"GigabitEthernet0/0"
],
"support_af": "multiple address-families",
"vrf_id": 1
},
"SDA_Lab_Employee": {
"address_family": {
"ipv4 unicast": {
"flags": "0x0",
"route_targets": {
"1:4099": {
"route_target": "1:4099",
"rt_type": "both"
}
},
"table_id": "0x2"
}
},
"cli_format": "New",
"flags": "0x180C",
"interface": {
"LI0.4099": {
"vrf": "SDA_Lab_Employee"
},
"Loopback1021": {
"vrf": "SDA_Lab_Employee"
},
"Loopback1023": {
"vrf": "SDA_Lab_Employee"
},
"Loopback1027": {
"vrf": "SDA_Lab_Employee"
},
"Vlan3002": {
"vrf": "SDA_Lab_Employee"
},
"Vlan920": {
"vrf": "SDA_Lab_Employee"
}
},
"interfaces": [
"Loopback1021",
"Loopback1023",
"Vlan920",
"Vlan3002",
"LI0.4099",
"Loopback1027"
],
"route_distinguisher": "1:4099",
"support_af": "multiple address-families",
"vrf_id": 2
},
"SDA_Lab_Guest": {
"address_family": {
"ipv4 unicast": {
"flags": "0x0",
"route_targets": {
"1:4100": {
"route_target": "1:4100",
"rt_type": "both"
}
},
"table_id": "0x3"
}
},
"cli_format": "New",
"flags": "0x180C",
"interface": {
"LI0.4100": {
"vrf": "SDA_Lab_Guest"
},
"Loopback1025": {
"vrf": "SDA_Lab_Guest"
},
"Vlan3003": {
"vrf": "SDA_Lab_Guest"
}
},
"interfaces": [
"Loopback1025",
"Vlan3003",
"LI0.4100"
],
"route_distinguisher": "1:4100",
"support_af": "multiple address-families",
"vrf_id": 3
}
}
Library versions
(venv) # pyats version check
You are currently running pyATS version: 21.5.1
Python: 3.6.8 [64bit]
Package Version
---------------------------- -------
genie 21.5.1
genie.libs.clean 21.5
genie.libs.conf 21.5
genie.libs.filetransferutils 21.5
genie.libs.health 21.5
genie.libs.ops 21.5
genie.libs.parser 21.5
genie.libs.robot 21.5
genie.libs.sdk 21.5
genie.telemetry 21.5
genie.trafficgen 21.5
pyats 21.5.1
pyats.aereport 21.5.1
pyats.aetest 21.5.1
pyats.async 21.5.1
pyats.connections 21.5.1
pyats.contrib 21.5
pyats.datastructures 21.5.1
pyats.easypy 21.5.1
pyats.kleenex 21.5.1
pyats.log 21.5.1
pyats.reporter 21.5.1
pyats.results 21.5.1
pyats.robot 21.5.1
pyats.tcl 21.5.1
pyats.topology 21.5.1
pyats.utils 21.5.2
unicon 21.5.1
unicon.plugins 21.5
When clicking on any of the object models in the Genie models browser, I get a 404 not found.
As an example...
404 Not Found
Code: NoSuchKey
Message: The specified key does not exist.
Key: media/genie-feature-browser/_models/hsrp.pdf
RequestId: DEF92801D6AF2108
HostId: 90QyLnucCBTFlLYqVaaDn+Rl4rqVwd9RelXGrK5knda8K5qpAFHYEpsCvxq1K3adexdSpGKduQ0=
Hi,
First i tried using pip install and later tried cloning git repo. Followed link https://developer.cisco.com/codeexchange/github/repo/CiscoTestAutomation/genielibs
Installing development dependencies
Creating /usr/lib/python2.7/site-packages/genie.libs.robot.egg-link (link to src)
genie.libs.robot 19.0.0 is already the active version in easy-install.pth
Installed /root/genielibs/pkgs/robot-pkg/src
running develop
Traceback (most recent call last):
File "setup.py", line 192, in
zip_safe = False,
File "/usr/lib64/python2.7/distutils/core.py", line 152, in setup
dist.run_commands()
File "/usr/lib64/python2.7/distutils/dist.py", line 953, in run_commands
self.run_command(cmd)
File "/usr/lib64/python2.7/distutils/dist.py", line 972, in run_command
cmd_obj.run()
File "setup.py", line 79, in run
super().run(*args, **kwargs)
TypeError: super() takes at least 1 argument (0 given)
I have connected to an NXOS device using pyATS/Genie, PIP list:
(venv) [jschulman@nms01 quickstart]$ pip list | grep genie
genie 19.9
genie.abstract 19.9
genie.conf 19.9
genie.harness 19.9
genie.libs.conf 19.9
genie.libs.filetransferutils 19.9
genie.libs.ops 19.9
genie.libs.parser 19.9.1b2 /home/jschulman/Projects/Genie/genieparser/src
genie.libs.sdk 19.9.1
genie.libs.telemetry 19.9
genie.metaparser 19.9
genie.ops 19.9
genie.parsergen 19.9
genie.predcore 19.9
genie.telemetry 19.9
genie.trafficgen 19.9
genie.utils 19.9
The device version information:
In [8]: ver_data = dev.parse('show version')
In [9]: ver_data
Out[9]:
{'platform': {'name': 'Nexus',
'os': 'NX-OS',
'software': {'bios_version': '2.1.7',
'kickstart_version': '7.1(4)N1(1)',
'system_version': '7.1(4)N1(1)',
'bios_compile_time': '06/16/2016',
'kickstart_image_file': 'bootflash:///n6000-uk9-kickstart.7.1.4.N1.1.bin',
'kickstart_compile_time': '9/2/2016 10:00:00 [09/02/2016 20:17:17]',
'system_image_file': 'bootflash:///n6000-uk9.7.1.4.N1.1.bin',
'system_compile_time': '9/2/2016 10:00:00 [09/02/2016 20:18:08]'},
'hardware': {'model': 'Nexus 5672UP',
'chassis': 'Nexus 5672UP',
'slots': 'None',
'rp': 'Nexus 5672UP Supervisor',
'cpu': 'Intel(R) Xeon(R) CPU @ 1.80',
'memory': '8243332 kB',
'processor_board_id': '****',
'device_name': '****',
'bootflash': '7692288 kB'},
'kernel_uptime': {'days': 854, 'hours': 19, 'minutes': 15, 'seconds': 43},
'reason': 'Unknown'}}
When I attempt to execute the learn('arp') operational command, I observe an Exception:
----> 1 dev.learn('arp')
~/Projects/Genie/venv/lib64/python3.6/site-packages/genie/conf/base/device.cpython-36m-x86_64-linux-gnu.so in genie.conf.base.device.Device.learn()
~/Projects/Genie/venv/lib64/python3.6/site-packages/genie/libs/ops/arp/nxos/arp.py in learn(self)
113 dest=dest_stat_out + '[out_drops]')
114
--> 115 self.make(final_call=True)
116
117 # Parser return a string and 'proxy_arp' & 'local_proxy_arp' attributes
~/Projects/Genie/venv/lib64/python3.6/site-packages/genie/ops/base/base.cpython-36m-x86_64-linux-gnu.so in genie.ops.base.base.Base.make()
~/Projects/Genie/venv/lib64/python3.6/site-packages/genie/ops/base/maker.cpython-36m-x86_64-linux-gnu.so in genie.ops.base.maker.Maker.make()
~/Projects/Genie/venv/lib64/python3.6/site-packages/genie/ops/base/maker.cpython-36m-x86_64-linux-gnu.so in genie.ops.base.maker.Maker._call_parser()
~/Projects/Genie/venv/lib64/python3.6/site-packages/genie/metaparser/_metaparser.cpython-36m-x86_64-linux-gnu.so in genie.metaparser._metaparser.MetaParser.parse()
~/Projects/Genie/venv/lib64/python3.6/site-packages/genie/metaparser/_metaparser.cpython-36m-x86_64-linux-gnu.so in genie.metaparser._metaparser.MetaParser.parse()
~/Projects/Genie/venv/lib64/python3.6/site-packages/genie/metaparser/util/schemaengine.cpython-36m-x86_64-linux-gnu.so in genie.metaparser.util.schemaengine.Schema.validate()
SchemaMissingKeyError: Missing keys: [['statistics', 'sent', 'l2_replies'], ['statistics', 'sent', 'l2_requests'], ['statistics', 'sent', 'requests'], ['statistics', 'sent', 'replies'], ['statistics', 'sent', 'total'], ['statistics', 'received', 'l2_replies'], ['statistics', 'received', 'l2_requests'], ['statistics', 'received', 'dropped'], ['statistics', 'received', 'requests'], ['statistics', 'received', 'replies'], ['statistics', 'received', 'tunneled'], ['statistics', 'received', 'total']]
Please let me know if you need further details to troubleshoot this issue.
Hello there,
I'm pretty new using pyATS / Genie so I'm not really sure that it's a bug or if I am missing something.
Trying to learn ISIS state on a ASR1K w/ IOS-XE, and here's what I've seen:
Could you please have a look at it ?
Thanks.
Tristan
Traceback (most recent call last):
File "script.py", line 14, in <module>
isis = testbed.devices[dev].learn('isis')
File "src/genie/conf/base/device.py", line 626, in genie.conf.base.device.Device.learn
File "/home/AD.TB.PAR.EQUANT.COM/ttr/PyAutomationTests/projects/pyats/pyats_venv/lib/python3.6/site-packages/genie/libs/ops/isis/iosxe/isis.py", line 446, in learn
self.make()
File "/home/AD.TB.PAR.EQUANT.COM/ttr/PyAutomationTests/projects/pyats/pyats_venv/lib/python3.6/site-packages/genie/ops/base/base.py", line 101, in make
self.maker.make(*args, **kwargs)
File "src/genie/ops/base/maker.py", line 312, in genie.ops.base.maker.Maker.make
File "src/genie/ops/base/maker.py", line 418, in genie.ops.base.maker.Maker._call_parser
File "src/genie/metaparser/_metaparser.py", line 303, in genie.metaparser._metaparser.MetaParser.parse
File "src/genie/metaparser/_metaparser.py", line 285, in genie.metaparser._metaparser.MetaParser.parse
File "src/genie/metaparser/util/schemaengine.py", line 404, in genie.metaparser.util.schemaengine.Schema.validate
genie.metaparser.util.exceptions.SchemaMissingKeyError: Missing keys: [['tag', 'null', 'IS-IS', 'dr_election', 'level-1'], ['tag', 'null', 'IS-IS', 'spf_calculation', 'level-1'], ['tag', 'null', 'IS-IS', 'partial_route_calculation', 'level-1']]
Here's the (pretty basic) code leading to this error :
from genie.testbed import load
testbed = load('testbed.yaml')
for dev in testbed.devices.keys():
testbed.devices[dev].connect(via='cli')
isis = testbed.devices[dev].learn('isis')
pprint.pprint(isis)
Python 3.6.9 with PyATS & Genie 20.10
ASR1009-X w/ IOS-XE 16.6.3
Using the API verify_lldp_in_state
for IOS devices appears to use an invalid parser. The parser used is show lldp neighbors
which is not listed as a valid parser on the genie microsite.
https://github.com/CiscoTestAutomation/genielibs/blob/master/pkgs/sdk-pkg/src/genie/libs/sdk/apis/ios/lldp/verify.py - IOS code for verify_lldp_in_state
https://pubhub.devnetcloud.com/media/genie-feature-browser/docs/#/apis/verify_lldp_in_state - API call
https://pubhub.devnetcloud.com/media/genie-feature-browser/docs/#/parsers - Parser list I am referencing.
Due to this bug, the api call will hang then eventually return false
. When running device.parse('show lldp neighbors') directly,
this error is returned : genie.libs.parser.utils.common.ParserNotFound: Could not find parser for show lldp neighbors under ('ios',)
Hi there!
I'm receiving a key error when I try to learn LLDP on a NCS5501. I'm running genie.libs.parser 20.7.1b1
RP/0/RP0/CPU0:bne-lab-ncs-1#
Error deteced <class 'genie.metaparser.util.exceptions.SchemaMissingKeyError'>:Missing keys: [['interfaces', 'GigabitEthernet0/0/0/1', 'port_id', 'Cc4e.2495.5a00', 'neighbors', 'bne-lab-mlx-1', 'system_description'], ['interfaces', 'TenGigE0/0/0/10', 'port_id', '40a6.b71d.b64b', 'neighbors'], ['interfaces', 'TenGigE0/0/0/13', 'port_id', '6cab.0573.2166', 'neighbors'], ['interfaces', 'TenGigE0/0/0/14', 'port_id', '40a6.b71d.b69a', 'neighbors'], ['interfaces', 'TenGigE0/0/0/15', 'port_id', '40a6.b71d.b69b', 'neighbors'], ['interfaces', 'TenGigE0/0/0/16', 'port_id', '40a6.b71d.b6db', 'neighbors']]
Traceback (most recent call last):
File "hello_genie.py", line 61, in main
lldp = device.learn('lldp')
File "src/genie/conf/base/device.py", line 627, in genie.conf.base.device.Device.learn
File "/Users/cristian.la.rocca/Documents/Development/NetworkOperations/genie/lib/python3.8/site-packages/genie/libs/ops/lldp/iosxr/lldp.py", line 137, in learn
self.make(final_call=True)
File "/Users/cristian.la.rocca/Documents/Development/NetworkOperations/genie/lib/python3.8/site-packages/genie/ops/base/base.py", line 101, in make
self.maker.make(*args, **kwargs)
File "src/genie/ops/base/maker.py", line 312, in genie.ops.base.maker.Maker.make
File "src/genie/ops/base/maker.py", line 418, in genie.ops.base.maker.Maker._call_parser
File "src/genie/metaparser/_metaparser.py", line 303, in genie.metaparser._metaparser.MetaParser.parse
File "src/genie/metaparser/_metaparser.py", line 285, in genie.metaparser._metaparser.MetaParser.parse
File "src/genie/metaparser/util/schemaengine.py", line 404, in genie.metaparser.util.schemaengine.Schema.validate
genie.metaparser.util.exceptions.SchemaMissingKeyError: Missing keys: [['interfaces', 'GigabitEthernet0/0/0/1', 'port_id', 'Cc4e.2495.5a00', 'neighbors', 'bne-lab-mlx-1', 'system_description'], ['interfaces', 'TenGigE0/0/0/10', 'port_id', '40a6.b71d.b64b', 'neighbors'], ['interfaces', 'TenGigE0/0/0/13', 'port_id', '6cab.0573.2166', 'neighbors'], ['interfaces', 'TenGigE0/0/0/14', 'port_id', '40a6.b71d.b69a', 'neighbors'], ['interfaces', 'TenGigE0/0/0/15', 'port_id', '40a6.b71d.b69b', 'neighbors'], ['interfaces', 'TenGigE0/0/0/16', 'port_id', '40a6.b71d.b6db', 'neighbors']]
Regards!
Error:
2021-08-08T23:22:04: %AETEST-ERROR: Caught an exception while executing section setup:
2021-08-08T23:22:04: %AETEST-ERROR: Traceback (most recent call last):
2021-08-08T23:22:04: %AETEST-ERROR: File "/root/netcheck/layer2check/layer2check.py", line 75, in setup
2021-08-08T23:22:04: %AETEST-ERROR: self.stp_info = device.learn('stp')
2021-08-08T23:22:04: %AETEST-ERROR: File "src/genie/conf/base/device.py", line 592, in genie.conf.base.device.Device.learn
2021-08-08T23:22:04: %AETEST-ERROR: File "src/genie/ops/utils.py", line 51, in genie.ops.utils.get_ops
2021-08-08T23:22:04: %AETEST-ERROR: LookupError: Could not find the OPS under nxos
Version:
(pyats) root@ubuntu-2020:~/netcheck/layer2check# pyats version check
You are currently running pyATS version: 21.7
Python: 3.8.10 [64bit]
Package Version
---------------------------- -------
genie 21.7
genie.libs.clean 21.7
genie.libs.conf 21.7
genie.libs.filetransferutils 21.7
genie.libs.health 21.7
genie.libs.ops 21.7
genie.libs.parser 21.7
genie.libs.robot 21.7
genie.libs.sdk 21.7
genie.telemetry 21.7
genie.trafficgen 21.7.1
pyats 21.7
pyats.aereport 21.7
pyats.aetest 21.7
pyats.async 21.7
pyats.connections 21.7
pyats.contrib 21.7
pyats.datastructures 21.7
pyats.easypy 21.7
pyats.kleenex 21.7
pyats.log 21.7
pyats.reporter 21.7
pyats.results 21.7
pyats.robot 21.7
pyats.tcl 21.7
pyats.topology 21.7
pyats.utils 21.7
unicon 21.7
unicon.plugins 21.7
When I try and use the following robot API keyword
Verify Boot Variable device=D1-INETIU-C9800 boot_images=packages.conf
I get the following traceback:
KeyError: 'com'
Traceback (most recent call last):
File "/home/cisco/cxta/workspace/genielibs/pkgs/robot-pkg/src/genie/libs/robot/GenieRobotApis.py", line 35, in run_keyword
return self.api.get_api(name.strip().replace(' ', '_'), device_handler)(device_handler, *args, **kwargs)
File "/home/cisco/cxta/workspace/genielibs/pkgs/sdk-pkg/src/genie/libs/sdk/apis/iosxe/platform/verify.py", line 148, in verify_boot_variable
if boot_images == device.api.get_boot_variables(device=device, boot_var='next'):
File "src/genie/conf/base/api.py", line 99, in genie.conf.base.api.API.__getattr__.wrapper_match
File "src/genie/conf/base/api.py", line 150, in genie.conf.base.api.API.get_api
I am able to use the following API without issue:
Get Boot Variables device=${DUT} boot_var=current
When using genie.conf with the Vlan object
from genie.libs.conf.vlan import Vlan
vlan = Vlan(vlan_id=10, name="test")
vlan.build_config(apply=False)
The generated config contains configuration to
logging logfile messages 5
I don't think the latter is desired. Dave Wapstra told me in the pyATS community on Webex Teams that this is due to the following line: https://github.com/CiscoTestAutomation/genielibs/blob/master/pkgs/conf-pkg/src/genie/libs/conf/device/nxos/device.py#L61
Looking at the config it appears that this happens for all NXOS Device objects. Is this intended behavior?
When using the copy_pcap_file API in robot framework I get the following error
"AttributeError: module 'genie.libs.sdk.apis' has no attribute 'utils'"
I have imported the following Library
Library genie.libs.robot.GenieRobotApis
Please see attached debug log
debug.log
CLI command - show ip bgp {address_family} all summary
is not accepted by IOSXE parser
it should read show ip bgp {address_family} summary
On a 3560-CX switch (IOSXE) when trying to use the 'get_boot_variabes' API (its used by 'change_boot_variable' clean stage), it is trying to execute 'show bootvar' as shown here: https://github.com/CiscoTestAutomation/genielibs/blob/master/pkgs/sdk-pkg/src/genie/libs/sdk/apis/iosxe/platform/get.py#L280
However this model doesn't support this command
2021-04-30 11:58:10,433: %UNICON-INFO: +++ C3650-CX-12PC with alias 'Corp_Telnet': executing command 'show bootvar' +++
show bootvar
^
% Invalid input detected at '^' marker.
C3650-CX-12PC#
[31mFailed reason: Unable to check existing boot images on C3650-CX-12PC:
instead it uses 'show boot', the genie parser for 'show boot' works and returns:
{
"boot_path_list": "flash:c3560cx-universalk9-mz.152-3.E1.bin",
"config_file": "flash:/config.text",
"private_config_file": "flash:/private-config.text",
"enable_break": true,
"manual_boot": false,
"allow_dev_key": true,
"auto_upgrade": true,
"boot_optimization": false,
"nvram_buffer_size": 524288,
"timeout_config_download": "0 seconds",
"config_download_via_dhcp": false,
"next_boot": false
}
Not sure how this should be fixed? If the ioxe API could be changed to accommodate this or if a new API is needed (like there is also cat9500/cat9k) - https://pubhub.devnetcloud.com/media/genie-feature-browser/docs/#/apis/get_boot_variables
In the case where the get_bgp_route_ext_community method is passed only positional arguments, if/efif does not handle assignment of cmd variable prior to use.
Hi there,
I use pyats/genie to connect to a bunch of devices to learn information, the take it takes increase as the number of device increase because it can only connect to one device at time. Is there a way to connect to multiple devices concurrently to learn information/send command so it can speed things up?
Thanks,
Ken
Hey,
I'm using the Verify Connectivity API in robot and get the value True returned when the Connectivity fails. I get the warning Device is not connected but no False returned.
Hi Team,
Whne I'm running genie learn route_policy for NXOS it works, but when I'm adding it to robot I'm getting the following error:
Could not find genie.libs.ops.route_policy.route_policy.Route_Policy for device test-NX1
Robot config:
Profile the Overlay
Profile the system for "route_policy" on devices "test_nx" as "./outputs/base_snapshot"
=====PyATS version
You are currently running pyATS version: 20.2.1
Python: 3.6.9 [64bit]
Any ideas what could be the issue?
Kind regards,
Dan
Hi,
Just running through a very basic test setup, and the Robot integration is failing for me.
Profile the devices | FAIL |
TypeError: pickle() got an unexpected keyword argument 'file'
I've just upgraded genielibs to 'develop' and I'm still getting the same issue.
# Importing test libraries, resource files and variable files.
Library ats.robot.pyATSRobot
Library genie.libs.robot.GenieRobot
*** Variables ***
# Define the pyATS testbed file to use for this run
${testbed} ../testbed.yaml
*** Test Cases ***
# Creating test cases from available keywords.
Connect
# Initializes the pyATS/Genie Testbed
use genie testbed "${testbed}"
# Connect to both device
connect to device "MEDC1-SWT-2"
Profile the devices
Profile the system for "interface" on devices "MEDC1-SWT-2" as "./good_snapshot"
I just upgraded to Genie 20.8 and am noticing the debugger is crashing almost always when trying to view a Device object. Seems to possibly be a max-recursion issue in the Device object. I am not sure if this is a pyATS/Genie issue or not, but here is some data around what I am seeing.
testbed = {
"devices": {
device["hostname"]: {
"ip": device["hostname"],
"port": device["port"],
"protocol": "ssh",
"username": device["username"],
"password": device["password"],
"os": os,
}
}
}
dev = tb.devices[device["hostname"]]
dev.connect(log_stdout=debug, learn_hostname=True, learn_os=True)
raw_output = device.execute(command)
parsed_output = device.parse(command)
ipdb.set_trace()
in ipdb, try to browse dev
by typing dev.
and then pressing <tab>
twice to try and list all of the properties of the object. Almost always, this triggers a max-recursion issue and crashes the debugger. It crashes ipdb and pycharm's debugger as well.
Based on the traceback, if I just try to list dev.role
that seems to be the spot where it happens.
> /home/ccurtis/code/presidio_projects/siphon/siphon.py(311)fetch()
310 ipdb.set_trace()
--> 311 dev.disconnect()
312
ipdb> dev.learn_os
False
ipdb> dev.Fatal Python error: Cannot recover from stack overflow.
Current thread 0x00007f06bbfff700 (most recent call first):
File "/home/ccurtis/envs/siphon/lib/python3.6/site-packages/genie/libs/conf/device/__init__.py", line 44 in role
File "/home/ccurtis/envs/siphon/lib/python3.6/site-packages/genie/libs/conf/device/__init__.py", line 44 in role
File "/home/ccurtis/envs/siphon/lib/python3.6/site-packages/genie/libs/conf/device/__init__.py", line 44 in role
File "/home/ccurtis/envs/siphon/lib/python3.6/site-packages/genie/libs/conf/device/__init__.py", line 44 in role
File "/home/ccurtis/envs/siphon/lib/python3.6/site-packages/genie/libs/conf/device/__init__.py", line 44 in role
File "/home/ccurtis/envs/siphon/lib/python3.6/site-packages/genie/libs/conf/device/__init__.py", line 44 in role
File "/home/ccurtis/envs/siphon/lib/python3.6/site-packages/genie/libs/conf/device/__init__.py", line 44 in role
File "/home/ccurtis/envs/siphon/lib/python3.6/site-packages/genie/libs/conf/device/__init__.py", line 44 in role
File "/home/ccurtis/envs/siphon/lib/python3.6/site-packages/genie/libs/conf/device/__init__.py", line 44 in role
File "/home/ccurtis/envs/siphon/lib/python3.6/site-packages/genie/libs/conf/device/__init__.py", line 44 in role
File "/home/ccurtis/envs/siphon/lib/python3.6/site-packages/genie/libs/conf/device/__init__.py", line 44 in role
File "/home/ccurtis/envs/siphon/lib/python3.6/site-packages/genie/libs/conf/device/__init__.py", line 44 in role
File "/home/ccurtis/envs/siphon/lib/python3.6/site-packages/genie/libs/conf/device/__init__.py", line 44 in role
File "/home/ccurtis/envs/siphon/lib/python3.6/site-packages/genie/libs/conf/device/__init__.py", line 44 in role
File "/home/ccurtis/envs/siphon/lib/python3.6/site-packages/genie/libs/conf/device/__init__.py", line 44 in role
File "/home/ccurtis/envs/siphon/lib/python3.6/site-packages/genie/libs/conf/device/__init__.py", line 44 in role
File "/home/ccurtis/envs/siphon/lib/python3.6/site-packages/genie/libs/conf/device/__init__.py", line 44 in role
File "/home/ccurtis/envs/siphon/lib/python3.6/site-packages/genie/libs/conf/device/__init__.py", line 44 in role
File "/home/ccurtis/envs/siphon/lib/python3.6/site-packages/genie/libs/conf/device/__init__.py", line 44 in role
File "/home/ccurtis/envs/siphon/lib/python3.6/site-packages/genie/libs/conf/device/__init__.py", line 44 in role
File "/home/ccurtis/envs/siphon/lib/python3.6/site-packages/genie/libs/conf/device/__init__.py", line 44 in role
File "/home/ccurtis/envs/siphon/lib/python3.6/site-packages/genie/libs/conf/device/__init__.py", line 44 in role
File "/home/ccurtis/envs/siphon/lib/python3.6/site-packages/genie/libs/conf/device/__init__.py", line 44 in role
File "/home/ccurtis/envs/siphon/lib/python3.6/site-packages/genie/libs/conf/device/__init__.py", line 44 in role
File "/home/ccurtis/envs/siphon/lib/python3.6/site-packages/genie/libs/conf/device/__init__.py", line 44 in role
File "/home/ccurtis/envs/siphon/lib/python3.6/site-packages/genie/libs/conf/device/__init__.py", line 44 in role
File "/home/ccurtis/envs/siphon/lib/python3.6/site-packages/genie/libs/conf/device/__init__.py", line 44 in role
File "/home/ccurtis/envs/siphon/lib/python3.6/site-packages/genie/libs/conf/device/__init__.py", line 44 in role
File "/home/ccurtis/envs/siphon/lib/python3.6/site-packages/genie/libs/conf/device/__init__.py", line 44 in role
File "/home/ccurtis/envs/siphon/lib/python3.6/site-packages/genie/libs/conf/device/__init__.py", line 44 in role
File "/home/ccurtis/envs/siphon/lib/python3.6/site-packages/genie/libs/conf/device/__init__.py", line 44 in role
File "/home/ccurtis/envs/siphon/lib/python3.6/site-packages/genie/libs/conf/device/__init__.py", line 44 in role
File "/home/ccurtis/envs/siphon/lib/python3.6/site-packages/genie/libs/conf/device/__init__.py", line 44 in role
File "/home/ccurtis/envs/siphon/lib/python3.6/site-packages/genie/libs/conf/device/__init__.py", line 44 in role
File "/home/ccurtis/envs/siphon/lib/python3.6/site-packages/genie/libs/conf/device/__init__.py", line 44 in role
File "/home/ccurtis/envs/siphon/lib/python3.6/site-packages/genie/libs/conf/device/__init__.py", line 44 in role
File "/home/ccurtis/envs/siphon/lib/python3.6/site-packages/genie/libs/conf/device/__init__.py", line 44 in role
File "/home/ccurtis/envs/siphon/lib/python3.6/site-packages/genie/libs/conf/device/__init__.py", line 44 in role
File "/home/ccurtis/envs/siphon/lib/python3.6/site-packages/genie/libs/conf/device/__init__.py", line 44 in role
File "/home/ccurtis/envs/siphon/lib/python3.6/site-packages/genie/libs/conf/device/__init__.py", line 44 in role
File "/home/ccurtis/envs/siphon/lib/python3.6/site-packages/genie/libs/conf/device/__init__.py", line 44 in role
File "/home/ccurtis/envs/siphon/lib/python3.6/site-packages/genie/libs/conf/device/__init__.py", line 44 in role
File "/home/ccurtis/envs/siphon/lib/python3.6/site-packages/genie/libs/conf/device/__init__.py", line 44 in role
File "/home/ccurtis/envs/siphon/lib/python3.6/site-packages/genie/libs/conf/device/__init__.py", line 44 in role
File "/home/ccurtis/envs/siphon/lib/python3.6/site-packages/genie/libs/conf/device/__init__.py", line 44 in role
File "/home/ccurtis/envs/siphon/lib/python3.6/site-packages/genie/libs/conf/device/__init__.py", line 44 in role
File "/home/ccurtis/envs/siphon/lib/python3.6/site-packages/genie/libs/conf/device/__init__.py", line 44 in role
File "/home/ccurtis/envs/siphon/lib/python3.6/site-packages/genie/libs/conf/device/__init__.py", line 44 in role
File "/home/ccurtis/envs/siphon/lib/python3.6/site-packages/genie/libs/conf/device/__init__.py", line 44 in role
File "/home/ccurtis/envs/siphon/lib/python3.6/site-packages/genie/libs/conf/device/__init__.py", line 44 in role
File "/home/ccurtis/envs/siphon/lib/python3.6/site-packages/genie/libs/conf/device/__init__.py", line 44 in role
File "/home/ccurtis/envs/siphon/lib/python3.6/site-packages/genie/libs/conf/device/__init__.py", line 44 in role
File "/home/ccurtis/envs/siphon/lib/python3.6/site-packages/genie/libs/conf/device/__init__.py", line 44 in role
File "/home/ccurtis/envs/siphon/lib/python3.6/site-packages/genie/libs/conf/device/__init__.py", line 44 in role
File "/home/ccurtis/envs/siphon/lib/python3.6/site-packages/genie/libs/conf/device/__init__.py", line 44 in role
File "/home/ccurtis/envs/siphon/lib/python3.6/site-packages/genie/libs/conf/device/__init__.py", line 44 in role
File "/home/ccurtis/envs/siphon/lib/python3.6/site-packages/genie/libs/conf/device/__init__.py", line 44 in role
File "/home/ccurtis/envs/siphon/lib/python3.6/site-packages/genie/libs/conf/device/__init__.py", line 44 in role
File "/home/ccurtis/envs/siphon/lib/python3.6/site-packages/genie/libs/conf/device/__init__.py", line 44 in role
File "/home/ccurtis/envs/siphon/lib/python3.6/site-packages/genie/libs/conf/device/__init__.py", line 44 in role
File "/home/ccurtis/envs/siphon/lib/python3.6/site-packages/genie/libs/conf/device/__init__.py", line 44 in role
File "/home/ccurtis/envs/siphon/lib/python3.6/site-packages/genie/libs/conf/device/__init__.py", line 44 in role
File "/home/ccurtis/envs/siphon/lib/python3.6/site-packages/genie/libs/conf/device/__init__.py", line 44 in role
File "/home/ccurtis/envs/siphon/lib/python3.6/site-packages/genie/libs/conf/device/__init__.py", line 44 in role
File "/home/ccurtis/envs/siphon/lib/python3.6/site-packages/genie/libs/conf/device/__init__.py", line 44 in role
File "/home/ccurtis/envs/siphon/lib/python3.6/site-packages/genie/libs/conf/device/__init__.py", line 44 in role
File "/home/ccurtis/envs/siphon/lib/python3.6/site-packages/genie/libs/conf/device/__init__.py", line 44 in role
File "/home/ccurtis/envs/siphon/lib/python3.6/site-packages/genie/libs/conf/device/__init__.py", line 44 in role
File "/home/ccurtis/envs/siphon/lib/python3.6/site-packages/genie/libs/conf/device/__init__.py", line 44 in role
File "/home/ccurtis/envs/siphon/lib/python3.6/site-packages/genie/libs/conf/device/__init__.py", line 44 in role
File "/home/ccurtis/envs/siphon/lib/python3.6/site-packages/genie/libs/conf/device/__init__.py", line 44 in role
File "/home/ccurtis/envs/siphon/lib/python3.6/site-packages/genie/libs/conf/device/__init__.py", line 44 in role
File "/home/ccurtis/envs/siphon/lib/python3.6/site-packages/genie/libs/conf/device/__init__.py", line 44 in role
File "/home/ccurtis/envs/siphon/lib/python3.6/site-packages/genie/libs/conf/device/__init__.py", line 44 in role
File "/home/ccurtis/envs/siphon/lib/python3.6/site-packages/genie/libs/conf/device/__init__.py", line 44 in role
File "/home/ccurtis/envs/siphon/lib/python3.6/site-packages/genie/libs/conf/device/__init__.py", line 44 in role
File "/home/ccurtis/envs/siphon/lib/python3.6/site-packages/genie/libs/conf/device/__init__.py", line 44 in role
File "/home/ccurtis/envs/siphon/lib/python3.6/site-packages/genie/libs/conf/device/__init__.py", line 44 in role
File "/home/ccurtis/envs/siphon/lib/python3.6/site-packages/genie/libs/conf/device/__init__.py", line 44 in role
File "/home/ccurtis/envs/siphon/lib/python3.6/site-packages/genie/libs/conf/device/__init__.py", line 44 in role
File "/home/ccurtis/envs/siphon/lib/python3.6/site-packages/genie/libs/conf/device/__init__.py", line 44 in role
File "/home/ccurtis/envs/siphon/lib/python3.6/site-packages/genie/libs/conf/device/__init__.py", line 44 in role
File "/home/ccurtis/envs/siphon/lib/python3.6/site-packages/genie/libs/conf/device/__init__.py", line 44 in role
File "/home/ccurtis/envs/siphon/lib/python3.6/site-packages/genie/libs/conf/device/__init__.py", line 44 in role
File "/home/ccurtis/envs/siphon/lib/python3.6/site-packages/genie/libs/conf/device/__init__.py", line 44 in role
File "/home/ccurtis/envs/siphon/lib/python3.6/site-packages/genie/libs/conf/device/__init__.py", line 44 in role
File "/home/ccurtis/envs/siphon/lib/python3.6/site-packages/genie/libs/conf/device/__init__.py", line 44 in role
File "/home/ccurtis/envs/siphon/lib/python3.6/site-packages/genie/libs/conf/device/__init__.py", line 44 in role
File "/home/ccurtis/envs/siphon/lib/python3.6/site-packages/genie/libs/conf/device/__init__.py", line 44 in role
File "/home/ccurtis/envs/siphon/lib/python3.6/site-packages/genie/libs/conf/device/__init__.py", line 44 in role
File "/home/ccurtis/envs/siphon/lib/python3.6/site-packages/genie/libs/conf/device/__init__.py", line 44 in role
File "/home/ccurtis/envs/siphon/lib/python3.6/site-packages/genie/libs/conf/device/__init__.py", line 44 in role
File "/home/ccurtis/envs/siphon/lib/python3.6/site-packages/genie/libs/conf/device/__init__.py", line 44 in role
File "/home/ccurtis/envs/siphon/lib/python3.6/site-packages/genie/libs/conf/device/__init__.py", line 44 in role
File "/home/ccurtis/envs/siphon/lib/python3.6/site-packages/genie/libs/conf/device/__init__.py", line 44 in role
File "/home/ccurtis/envs/siphon/lib/python3.6/site-packages/genie/libs/conf/device/__init__.py", line 44 in role
File "/home/ccurtis/envs/siphon/lib/python3.6/site-packages/genie/libs/conf/device/__init__.py", line 44 in role
File "/home/ccurtis/envs/siphon/lib/python3.6/site-packages/genie/libs/conf/device/__init__.py", line 44 in role
File "/home/ccurtis/envs/siphon/lib/python3.6/site-packages/genie/libs/conf/device/__init__.py", line 44 in role
File "/home/ccurtis/envs/siphon/lib/python3.6/site-packages/genie/libs/conf/device/__init__.py", line 44 in role
...
Thread 0x00007f06c3767700 (most recent call first):
File "/home/ccurtis/.pyenv/versions/3.6.8/lib/python3.6/threading.py", line 295 in wait
File "/home/ccurtis/.pyenv/versions/3.6.8/lib/python3.6/threading.py", line 551 in wait
File "/home/ccurtis/envs/siphon/lib/python3.6/site-packages/IPython/core/history.py", line 829 in run
File "/home/ccurtis/envs/siphon/lib/python3.6/site-packages/IPython/core/history.py", line 58 in needs_sqlite
File "<decorator-gen-24>", line 2 in run
File "/home/ccurtis/.pyenv/versions/3.6.8/lib/python3.6/threading.py", line 916 in _bootstrap_inner
File "/home/ccurtis/.pyenv/versions/3.6.8/lib/python3.6/threading.py", line 884 in _bootstrap
Thread 0x00007f06e3247080 (most recent call first):
File "/home/ccurtis/.pyenv/versions/3.6.8/lib/python3.6/threading.py", line 1072 in _wait_for_tstate_lock
File "/home/ccurtis/.pyenv/versions/3.6.8/lib/python3.6/threading.py", line 1056 in join
File "/home/ccurtis/envs/siphon/lib/python3.6/site-packages/IPython/terminal/debugger.py", line 120 in cmdloop
File "/home/ccurtis/.pyenv/versions/3.6.8/lib/python3.6/pdb.py", line 321 in _cmdloop
File "/home/ccurtis/.pyenv/versions/3.6.8/lib/python3.6/pdb.py", line 352 in interaction
File "/home/ccurtis/envs/siphon/lib/python3.6/site-packages/IPython/core/debugger.py", line 305 in interaction
File "/home/ccurtis/.pyenv/versions/3.6.8/lib/python3.6/pdb.py", line 261 in user_line
File "/home/ccurtis/.pyenv/versions/3.6.8/lib/python3.6/bdb.py", line 69 in dispatch_line
File "/home/ccurtis/.pyenv/versions/3.6.8/lib/python3.6/bdb.py", line 51 in trace_dispatch
File "./siphon.py", line 311 in fetch
File "/home/ccurtis/envs/siphon/lib/python3.6/site-packages/click/core.py", line 610 in invoke
File "/home/ccurtis/envs/siphon/lib/python3.6/site-packages/click/core.py", line 1066 in invoke
File "/home/ccurtis/envs/siphon/lib/python3.6/site-packages/click/core.py", line 1259 in invoke
File "/home/ccurtis/envs/siphon/lib/python3.6/site-packages/click/core.py", line 782 in main
File "/home/ccurtis/envs/siphon/lib/python3.6/site-packages/click/core.py", line 829 in __call__
File "./siphon.py", line 398 in <module>
[1] 11288 abort (core dumped) ./siphon.py fetch --hostname ios-xe-mgmt-latest.cisco.com --port 8181
Command:
genie learn interface --testbed-file testbed.yaml --output output/
show_run.txt
show_ver.txt
pip_freeze.txt
interface_ios_lab_2960_s_exception..txt
When l call interface.learn('interface') on both an IOS and IOS-XE device, it runs the following:
executing command 'show interfaces' +++
executing command 'show interfaces accounting' +++
executing command 'show ip interface' +++
executing command 'show ipv6 interface' +++
When I call the same function on a NXOS device, it runs the above commands, but also runs 'show interface switchport'.
This is reflected in the codebase for interface:
Is there a technical or policy reason that it isn't included for IOS/IOS-XE devices, or would it be possible to add this parser module?
Thanks,
Andy
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.