iosxr - Cannot parse "show route ipv6"
See original GitHub issueEnvironment: Platform: IOS-XR 6.5.3 and 6.6.3
> ansible 2.9.4
> config file = None
> configured module search path = ['/home/ubuntu/.ansible/plugins/modules', '/usr/share/ansible/plugins/modules']
> ansible python module location = /home/ubuntu/venv/issue/lib/python3.7/site-packages/ansible
> executable location = /home/ubuntu/venv/issue/bin/ansible
> python version = 3.7.6 (default, Jan 24 2020, 07:14:12) [GCC 7.4.0]
pip packages version:
---------------------------- -----------
aiohttp 3.6.2
ansible 2.9.4
async-timeout 3.0.1
attrs 19.3.0
backports.ssl 0.0.9
bcrypt 3.1.7
certifi 2019.11.28
cffi 1.13.2
chardet 3.0.4
cryptography 2.8
dill 0.3.1.1
distro 1.4.0
genie 19.12
genie.abstract 19.12
genie.conf 19.12
genie.harness 19.12
genie.libs.conf 19.12
genie.libs.filetransferutils 19.12
genie.libs.ops 19.12
genie.libs.parser 19.12
genie.libs.sdk 19.12
genie.libs.telemetry 19.12
genie.metaparser 19.12
genie.ops 19.12
genie.parsergen 19.12
genie.predcore 19.12
genie.telemetry 19.12
genie.trafficgen 19.12
genie.utils 19.12
idna 2.8
IxNetwork 9.0.1915.16
Jinja2 2.10.3
jsonpickle 1.2
junit-xml 1.8
MarkupSafe 1.1.1
multidict 4.7.4
netaddr 0.7.19
paramiko 2.7.1
pathspec 0.7.0
pip 20.0.1
prettytable 0.7.2
psutil 5.6.7
pyats 19.12
pyats.aereport 19.12
pyats.aetest 19.12
pyats.async 19.12
pyats.connections 19.12
pyats.datastructures 19.12
pyats.easypy 19.12
pyats.kleenex 19.12
pyats.log 19.12
pyats.reporter 19.12
pyats.results 19.12
pyats.tcl 19.12
pyats.topology 19.12
pyats.utils 19.12
pycparser 2.19
PyNaCl 1.3.0
pyOpenSSL 19.1.0
PyYAML 5.3
requests 2.22.0
setuptools 41.2.0
six 1.14.0
tqdm 4.41.1
unicon 19.12.1
unicon.plugins 19.12.1
urllib3 1.25.8
websocket-client 0.57.0
wheel 0.33.6
xlrd 1.2.0
XlsxWriter 1.2.7
xlwt 1.3.0
xmltodict 0.12.0
yamllint 1.20.0
yarl 1.4.2
Task example:
- name: run "show route ipv6" on remote devices
iosxr_command:
commands: show route ipv6
register: result_show_route_ipv6
- debug:
msg: "{{ result_show_route_ipv6 }}"
- name: get parsed data using pyats_parser for "show route ipv6"
set_fact:
check_sh_route_ipv6: "{{ result_show_route_ipv6.stdout[0] | pyats_parser('show route ipv6', 'iosxr') }}"
- debug:
msg: "{{ check_sh_route_ipv6 }}"
Error:
FAILED! => {"msg": "Unable to parse output for command 'show route ipv6' (local variable 'source_protocol' referenced before assignment)"}
What could be the problem? Two months ago, more or less, I was able to parse “show route ipv6” using the clay584.parse_genie like this:
tasks:
- name: run "show route ipv6" on remote devices
iosxr_command:
commands:
- show route ipv6
register: result_show_route_ipv6
- name: get parsed data using pyats_parser for "show route ipv6"
set_fact:
check_sh_route_ipv6: "{{ result_show_route_ipv6.stdout[0] | parse_genie(command='show route ipv6', os='iosxr') }}"
- debug:
msg: "{{ check_sh_route_ipv6 }}"
but now I have a similar error:
FAILED! => {"msg": "parse_genie: local variable 'source_protocol' referenced before assignment - Failed to parse command output."}
Issue Analytics
- State:
- Created 4 years ago
- Comments:6 (3 by maintainers)
Top Results From Across the Web
Routing Configuration Guide for Cisco ASR 9000 Series ...
The Cisco IOS XR software parser provides the ability to set the afi and safi so that it is not necessary to specify...
Read more >Troubleshooting BGP - Cisco Live
Ensure ipv6 unicast-routing is configured globally on IOS / IOS-XE. • Ensure IPv6 ND is completed and no stale IPv6 neighbor (Global) is...
Read more >Untitled
To view these routes, simply issue an ip route in the XR linux shell# ... with IOS-XR there isn't much that container applications...
Read more >Cisco IOS-XR (XRv9k) CML - SRv6 - YouTube
https://www.youtube.com/channel/UC9J5QyG3PDOM3ak5gEy9IGA?sub_confirmation=1What we will coverSegment Routing over an IPv6 CoreSRv6Cisco ...
Read more >Cisco IOS XR Workbook
IOS XR Configuration 4.1.1 hostname R1 end. RP/0/7/CPU0:ios(config)#. Pretty cool, the router will show you the changes you are about to make, this....
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Hello @gdluca , Thanks for reporting the issue. If you can send the device output for this failures to pyats-support-ext@cisco.com so we can verify our fix.
Thanks, –Thai.
Yes, it works now!
Thanks!