Uninett / nav

Network Administration Visualized
GNU General Public License v3.0
180 stars 37 forks source link

PortAdmin should refuse to configure Juniper switches using SNMP #1872

Open sigmunau opened 5 years ago

sigmunau commented 5 years ago
TypeError: 'NoneType' object is not iterable
Traceback (most recent call last): 
File "/opt/venvs/nav/local/lib/python2.7/site-packages/django/core/handlers/base.py", line 132, in get_response response = wrapped_callback(request, *callback_args, **callback_kwargs) 
File "/opt/venvs/nav/local/lib/python2.7/site-packages/nav/web/portadmin/views.py", line 557, in render_trunk_edit interface) 
File "/opt/venvs/nav/local/lib/python2.7/site-packages/nav/portadmin/snmputils.py", line 425, in get_native_and_trunked_vlans bitvector = BitVector(octet_string) 
File "/opt/venvs/nav/local/lib/python2.7/site-packages/nav/bitvector.py", line 35, in __init__ self.vector = array.array("B", octetstring) 
TypeError: 'NoneType' object is not iterable 
sigmunau commented 5 years ago

It seems this may happen on juniper switches only.

lunkwill42 commented 4 years ago

Juniper does not actually support SNMP writes for switch configuration, so an implementation that prevents the user from doing this would be better - at least until we implement NETCONF support for Juniper.