06-16-2019 06:07 AM
I'm stuck on "Step 1: Login and authenticate with Python code".
There's no command example to execute the #sdwan.py login.
Are we supposed to add the arguments for the 'url', 'username', 'password' in the command line.
Or, are the environment variables supposed to be changed? :
export SDWAN_IP=10.10.30.190
export SDWAN_USERNAME=admin
export SDWAN_PASSWORD=admin
example, change; SDWAN_IP="https://sandboxsdwan.cisco.com:8443/j_security_check"
Thanks (in advance).
(Or, should i give up DevNet and play more guitar?)
06-16-2019 06:57 AM
Hi eggy!, this is eggy!
In reply to my own question:
You do in fact have to define those environment variables.
below are some 'prints' to show how they look as the login is stepped thru:
(venv) unknown28f07628886e:Getting-started-with-Cisco-SD-WAN-REST-APIs eggy$ ./sdwan.py template_list base_url_str https://sandboxsdwan.cisco.com:8443/ login_data {'j_username': 'devnetuser', 'j_password': 'Cisco123!'} login_url https://sandboxsdwan.cisco.com:8443/j_security_check url https://sandboxsdwan.cisco.com:8443/j_security_check login_response <Response [200]> Login Failed (venv) unknown28f07628886e:Getting-started-with-Cisco-SD-WAN-REST-APIs eggy$
(Note: the Cisco code has an extra '/' after the port# that you have to remove).
However, I'm still getting a 'Login Failed', even thought the 'response' is giving a <Response [200]>
Isn't [200] a successful login?
06-17-2019 06:24 AM
Hi eggy
You have to change the variables in the script to point to the sandbox or setup local variables.
export SDWAN_IP=https://sandboxsdwan.cisco.com:8443
export SDWAN_USERNAME=devnetuser
export SDWAN_PASSWORD=Cixxxxxxx
Just to let you know that for some reason the credentials are not working today they were working over the weekend as Postman worked :)
Try with https://sandboxsdwan.cisco.com:8443 in the browser.
06-17-2019 11:29 PM
Hi eggy
Credentials reset. We can log in with the devnetuser now
Regards
Discover and save your favorite ideas. Come back to expert answers, step-by-step guides, recent topics, and more.
New here? Get started with these tips. How to use Community New member guide