Skip to content
Open
Changes from all 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
10 changes: 5 additions & 5 deletions sdwan.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,8 @@
import os
import tabulate
import yaml
from requests.packages.urllib3.exceptions import InsecureRequestWarning
requests.packages.urllib3.disable_warnings(InsecureRequestWarning)
import warnings
warnings.filterwarnings('ignore', message='Unverified HTTPS request')

vmanage_host = os.environ.get("vManage_IP")
vmanage_port = os.environ.get("vManage_PORT")
Expand Down Expand Up @@ -50,8 +50,8 @@ def get_jsessionid(vmanage_host, vmanage_port, username, password):
jsessionid = cookies.split(";")
return(jsessionid[0])
except:
if logger is not None:
logger.error("No valid JSESSION ID returned\n")
if response.status_code != 200:
print("No valid JSESSION ID returned\n")
exit()

@staticmethod
Expand Down Expand Up @@ -315,4 +315,4 @@ def detach(target, sysip):

if __name__ == "__main__":
cli()