Bug Description
Hi! I'm running the latest hyperglass server and it connects to a VMX with Junos 19.4R1-S2.2. It fails to parse the XML response
Expected behavior
I expect to see route information
Steps to Reproduce
I'm not a network engineer so I cannot really tell you how to setup our MX to get the same routing information 😢
Local Configurations
my devices.yaml
---
routers:
- name: vmx-1
address: rfc1918ip
network:
name: primary
display_name: lab
credential:
username: hyperglass
password: foobar
display_name: vmx-1
port: 22
nos: juniper
proxy: null
vrfs:
- name: default
display_name: default
ipv4:
source_address: rfc1918ip
force_cidr: false
based on the docs it's not really clear what's the difference between juniper and juniper_junos for the nos attribute. I assume juniper is correct here because the created command works in the CLI. If I specify juniper_junos I get an error about missing commands.
Logs
all the logs \o/
juniper version:
> show version | match Junos:
Junos: 19.4R1-S2.2
command send from hyperglass to VMX:
Sep 18 18:18:21 hyperglass python3[20985]: [DEBUG] 20200918 18:18:21 | hyperglass.execution.drivers.ssh_scrapli:97 | collect → Raw response for command "show route protocol bgp table inet.0 *hiddenip* detail | display xml":
output if I execute this on the VMX:
<rpc-reply xmlns:junos="http://xml.juniper.net/junos/19.4R0/junos">
<route-information xmlns="http://xml.juniper.net/junos/19.4R0/junos-routing">
<route-table>
<table-name>inet.0</table-name>
<destination-count>32086</destination-count>
<total-route-count>32147</total-route-count>
<active-route-count>32086</active-route-count>
<holddown-route-count>0</holddown-route-count>
<hidden-route-count>0</hidden-route-count>
<rt junos:style="detail">
<rt-destination>*hidden*</rt-destination>
<rt-prefix-length>32</rt-prefix-length>
<rt-entry-count junos:format="1 entry">1</rt-entry-count>
<rt-announced-count>1</rt-announced-count>
<rt-entry>
<active-tag>*</active-tag>
<current-active/>
<last-active/>
<protocol-name>BGP</protocol-name>
<preference>170</preference>
<preference2>-101</preference2>
<nh-type>Indirect</nh-type>
<nh-index>0</nh-index>
<nh-address>0x104b4d88</nh-address>
<nh-reference-count>9</nh-reference-count>
<nh-kernel-id>0</nh-kernel-id>
<gateway>*hidden*</gateway>
<protocol-nh junos:indent="16">
<to>*hidden*</to>
<indirect-nh>0x2 no-forward INH Session ID: 0x0
</indirect-nh>
</protocol-nh>
<rt-entry-state>Active NotInstall Ext</rt-entry-state>
<local-as>*hidden*</local-as>
<peer-as>*hidden*</peer-as>
<age junos:seconds="980918">1w4d 8:28:38</age>
<metric2>0</metric2>
<validation-state>unverified</validation-state>
<task-name>BGP_*hidden*+49306</task-name>
<announce-bits>1</announce-bits>
<announce-tasks>4-BGP_RT_Background </announce-tasks>
<as-path>AS path: *hidden* I
</as-path>
<bgp-path-attributes>
<attr-as-path-effective>
<aspath-effective-string>AS path: </aspath-effective-string>
<attr-value>*hidden* I</attr-value>
</attr-as-path-effective>
</bgp-path-attributes>
<bgp-rt-flag>Accepted</bgp-rt-flag>
<local-preference>100</local-preference>
<peer-id>*hidden*</peer-id>
</rt-entry>
</rt>
</route-table>
</route-information>
<cli>
<banner></banner>
</cli>
</rpc-reply>
error from the hyperglass log:
Sep 18 18:18:21 hyperglass python3[20985]: [CRITICAL] 20200918 18:18:21 | hyperglass.parsing.juniper:54 | parse_juniper → ''nh'' was not found in the response
Sep 18 18:18:21 hyperglass python3[20985]: [CRITICAL] 20200918 18:18:21 | hyperglass.exceptions:30 | __init__ → [DANGER] Error parsing response data
Possible Solution
Environment
Server
| Metric |
Value |
| hyperglass Version |
1.0.0-beta.57 |
| hyperglass Path |
/opt/hyperglass/hyperglass |
| Python Version |
3.6.8 |
| Platform Info |
Linux-5.8.9-1.el7.elrepo.x86_64-x86_64-with-centos-7.8.2003-Core |
| CPU Info |
Intel Xeon Processor (Skylake, IBRS) |
| Logical Cores |
4 |
| Physical Cores |
1 |
| Processor Speed |
2.095076GHz |
| Total Memory |
4.13 GB |
| Memory Utilization |
32.9% |
| Total Disk Space |
51.65 GB |
| Disk Utilization |
13.6% |
Bug Description
Hi! I'm running the latest hyperglass server and it connects to a VMX with Junos 19.4R1-S2.2. It fails to parse the XML response
Expected behavior
I expect to see route information
Steps to Reproduce
I'm not a network engineer so I cannot really tell you how to setup our MX to get the same routing information 😢
Local Configurations
my devices.yaml
based on the docs it's not really clear what's the difference between
juniperandjuniper_junosfor the nos attribute. I assumejuniperis correct here because the created command works in the CLI. If I specifyjuniper_junosI get an error about missing commands.Logs
all the logs \o/
juniper version:
command send from hyperglass to VMX:
output if I execute this on the VMX:
error from the hyperglass log:
Possible Solution
Environment
Server
/opt/hyperglass/hyperglass3.6.8Linux-5.8.9-1.el7.elrepo.x86_64-x86_64-with-centos-7.8.2003-Core41