This repository has been archived by the owner on May 15, 2019. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 46
oc-interfaces parser failing on Junos fxp interface #89
Comments
When installing napalm-yang from pip: |
Anyway, the same happens also on the develop branch, the error being in a different place: $ sudo salt vmx1 napalm_yang.parse "['models.openconfig_interfaces']" config=True
vmx1:
The minion function caused an exception: Traceback (most recent call last):
File "/usr/lib/python2.7/dist-packages/salt/minion.py", line 1468, in _thread_return
return_data = executor.execute()
File "/usr/lib/python2.7/dist-packages/salt/executors/direct_call.py", line 28, in execute
return self.func(*self.args, **self.kwargs)
File "/usr/lib/python2.7/dist-packages/salt/utils/napalm.py", line 393, in func_wrapper
return func(*args, **kwargs)
File "/usr/lib/python2.7/dist-packages/salt/modules/napalm_yang_mod.py", line 356, in parse
root.parse_config(**parser_kwargs)
File "/state/home/mircea/src/napalm-yang/napalm_yang/base.py", line 225, in parse_config
parser.parse()
File "/state/home/mircea/src/napalm-yang/napalm_yang/parser.py", line 85, in parse
self._parse(self._yang_name, self.model, self.mapping[self._yang_name])
File "/state/home/mircea/src/napalm-yang/napalm_yang/parser.py", line 91, in _parse
self._parse_container(attribute, model, mapping)
File "/state/home/mircea/src/napalm-yang/napalm_yang/parser.py", line 129, in _parse_container
self._parse(k, v, mapping[v._yang_name])
File "/state/home/mircea/src/napalm-yang/napalm_yang/parser.py", line 93, in _parse
self._parse_list(attribute, model, mapping)
File "/state/home/mircea/src/napalm-yang/napalm_yang/parser.py", line 171, in _parse_list
self._parse(key, obj, element_mapping)
File "/state/home/mircea/src/napalm-yang/napalm_yang/parser.py", line 91, in _parse
self._parse_container(attribute, model, mapping)
File "/state/home/mircea/src/napalm-yang/napalm_yang/parser.py", line 129, in _parse_container
self._parse(k, v, mapping[v._yang_name])
File "/state/home/mircea/src/napalm-yang/napalm_yang/parser.py", line 91, in _parse
self._parse_container(attribute, model, mapping)
File "/state/home/mircea/src/napalm-yang/napalm_yang/parser.py", line 129, in _parse_container
self._parse(k, v, mapping[v._yang_name])
File "/state/home/mircea/src/napalm-yang/napalm_yang/parser.py", line 95, in _parse
self._parse_leaf(attribute, model, mapping)
File "/state/home/mircea/src/napalm-yang/napalm_yang/parser.py", line 183, in _parse_leaf
value = self.parser.parse_leaf(attribute, mapping["_process"], self.bookmarks)
File "/state/home/mircea/src/napalm-yang/napalm_yang/parsers/base.py", line 101, in parse_leaf
result = self._parse_leaf_default(attribute, m, data)
File "/state/home/mircea/src/napalm-yang/napalm_yang/parsers/xml.py", line 29, in _parse_leaf_default
return super()._parse_leaf_default(attribute, mapping, data)
File "/state/home/mircea/src/napalm-yang/napalm_yang/parsers/jsonp.py", line 109, in _parse_leaf_default
d = mapping['map'][d.lower()]
KeyError: u'fxp' |
mirceaulinic
added a commit
that referenced
this issue
Aug 21, 2017
Resolves #89. The fxp interfaces are used for manamenet, so they probably fall into the same category ethernetCsmacd, as ge, xe, etc. Juniper description: "Management and internal Ethernet interfaces. For M Series routers, MX Series routers, T Series routers, and TX Series routers, you can use the show chassis hardware command to display hardware information about the router, including its Routing Engine model."
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
The XML at that level is the following:
Very strange that the exception complains about the
fxp
key, when the interface name is calledfxp0
.Logs:
The text was updated successfully, but these errors were encountered: