I have implemented a python program to send data across to a Juniper wlc100 controller. I have to use the prewritten juniper wlc file to send data to the controller. The error was that a "host" parameter was missing. I don't think we need a host parameter to be sent along with the 3 parameters I already passed by looking at the program. The github page for viewing the jnpr.wlc code is https://github.com/Juniper/py-jnpr-wlc. Please take time and help me.Thank you.
The error I am getting is:
from jnpr.wlc import WirelessLanController as WLC
import sys
import urllib2
def WLC_login():
login = {
'user': 'xxxxx',
'hostname': '172.31.99.14',
'password': 'xxxxx',
}
wlc = WLC( login )
try_again = 3
login_ok = False
while try_again > 1:
try:
wlc.open()
login_ok = True
print("Login successful")
break;
except:
try_again-=1
print "Unexpected error:", sys.exc_info()[0]
if not login_ok:
sys.exit(1)
return wlc
WLC_login()
The tracedump is:
Traceback (most recent call last):
File "C:/Python27/py-jnpr-wlc-master/new.py", line 27, in <module>
WLC_login()
File "C:/Python27/py-jnpr-wlc-master/new.py", line 11, in WLC_login
wlc = WLC( login )
File "C:\Python27\lib\site-packages\jnpr_wlc-0.0.1-py2.7.egg\jnpr\wlc\wlc.py", line 160, in __init__
assert (_a in kvargs), ("Missing required param: %s" % _a)
AssertionError: Missing required param: host