Skip to content
Open
Show file tree
Hide file tree
Changes from 4 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 6 additions & 6 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ devnet01.cisco.com --sysip 1.1.1.1 --loopip 2.2.2.2/24 --geip

To use this application you will need:

* Python 3.6+
* Python 3.7+
* Cisco SD-WAN 18+
* A Cisco SD-WAN account with permissions to attach and detach templates

Expand All @@ -46,19 +46,19 @@ cd Getting-started-with-Cisco-SD-WAN-REST-APIs
Setup Python Virtual Environment (requires Python 3.6+)

```
python3.6 -m venv venv
python3.7 -m venv venv
source venv/bin/activate
pip install -r requirements.txt
```

Setup local environment variables for your Cisco SD-WAN fabric. Provide the info for your Cisco SD-WAN environment.

Examples:

"https://sandboxsdwan.cisco.com:8443/j_security_check"
```
export SDWAN_IP=10.10.30.190
export SDWAN_USERNAME=admin
export SDWAN_PASSWORD=admin
export SDWAN_IP=sandboxsdwan.cisco.com
export SDWAN_USERNAME=devnetuser
export SDWAN_PASSWORD=Cisco123!
```

### Using the application
Expand Down
4 changes: 3 additions & 1 deletion sdwan.py
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ def login(self, vmanage_ip, username, password):
"""Login to vmanage"""
base_url_str = 'https://%s:8443/'%vmanage_ip

login_action = '/j_security_check'
login_action = 'j_security_check'

#Format data for loginForm
login_data = {'j_username' : username, 'j_password' : password}
Expand All @@ -54,6 +54,8 @@ def login(self, vmanage_ip, username, password):
sess = requests.session()
#If the vmanage has a certificate signed by a trusted authority change verify to True
login_response = sess.post(url=login_url, data=login_data, verify=False)
print('login_response')
print(login_response)


if b'<html>' in login_response.content:
Expand Down