napalm-automation / napalm-junos

Apache License 2.0
22 stars 42 forks source link

`get_route_to` fails if protocol is not specified #91

Closed mirceaulinic closed 7 years ago

mirceaulinic commented 7 years ago

Description of Issue/Question

$ sudo salt edge01.sfo04 route.show 0.0.0.0/0
edge01.sfo04:
    ----------
    comment:
        Cannot execute "get_route_to" on edge01.sfo04: 'NoneType' object has no attribute 'lower'!
    out:
        ----------
    result:
        False
    traceback:
        Traceback (most recent call last):
          File "/state/home/mircea/salt/salt/utils/napalm.py", line 119, in call
            out = getattr(napalm_device.get('DRIVER'), method)(*args, **kwargs)
          File "/usr/local/salt/virtualenv/local/lib/python2.7/site-packages/napalm_junos/junos.py", line 975, in get_route_to
            protocol = protocol.lower()
        AttributeError: 'NoneType' object has no attribute 'lower'