You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The naventity command (from the /bin/ directory) currently crashes with an AttributeError (and a long traceback) whenever it is run for an IP Device that supports the ENTITY-MIB. It is likely a result of the NetworkX library being upgraded to version 2.6.3 in NAV 5.3 earlier this year.
NetworkX is used by naventity to model a tree of entities before pretty-printing an ascii tree to stdout.
To Reproduce
Run naventity <snmp-enabled-device-from-your-nav-installation>
See error
Expected behavior
A tree of the ENTITY-MIB::entPhysicalTable hierarchy of the device should be displayed to the terminal.
Tracebacks
Traceback (most recent call last):
File "/usr/local/lib/python3.9/dist-packages/twisted/internet/defer.py", line 1475, in gotResult
_inlineCallbacks(r, g, status)
File "/usr/local/lib/python3.9/dist-packages/twisted/internet/defer.py", line 1461, in _inlineCallbacks
status.deferred.callback(e.value)
File "/usr/local/lib/python3.9/dist-packages/twisted/internet/defer.py", line 460, in callbackself._startRunCallbacks(result)
File "/usr/local/lib/python3.9/dist-packages/twisted/internet/defer.py", line 568, in _startRunCallbacksself._runCallbacks()
--- <exception caught here> ---
File "/usr/local/lib/python3.9/dist-packages/twisted/internet/defer.py", line 654, in _runCallbacks
current.result = callback(current.result, *args, **kw)
File "/source/bin/naventity", line 96, in print_graph
output = asciitree.LeftAligned(traverse=traversal)(root)
File "/usr/local/lib/python3.9/dist-packages/asciitree/__init__.py", line 48, in __call__return'\n'.join(self.render(self.traverse.get_root(tree)))
File "/usr/local/lib/python3.9/dist-packages/asciitree/__init__.py", line 27, in render
lines.append(self.draw.node_label(self.traverse.get_text(node)))
File "/source/bin/naventity", line 196, in get_text
ent =self.graph.node[node]
builtins.AttributeError: 'DiGraph' object has no attribute 'node'
Environment (please complete the following information):
Suggestion: Implementation of a fix should start by writing a integration/regression test to reproduce the problem. snmpsim has been successfully used by some existing tests to imitate an SNMP agent, so one way to go about this is to dump the ENTITY-MIB::entPhysicalTable response from some device, sanitize/censor the data if necessary, and use this data for a simulated SNMP device.
Describe the bug
The
naventity
command (from the/bin/
directory) currently crashes with an AttributeError (and a long traceback) whenever it is run for an IP Device that supports the ENTITY-MIB. It is likely a result of theNetworkX
library being upgraded to version 2.6.3 in NAV 5.3 earlier this year.NetworkX
is used by naventity to model a tree of entities before pretty-printing an ascii tree to stdout.To Reproduce
naventity <snmp-enabled-device-from-your-nav-installation>
Expected behavior
A tree of the
ENTITY-MIB::entPhysicalTable
hierarchy of the device should be displayed to the terminal.Tracebacks
Environment (please complete the following information):
The text was updated successfully, but these errors were encountered: