Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Dell EMC Unity V5 uses CAS for login and ssl certificate warning messages #4

Open
wants to merge 3 commits into
base: master
Choose a base branch
from
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
9 changes: 6 additions & 3 deletions dellemc-unity_storage/check_unity.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,8 @@
import json, requests
import argparse
import sys

import urllib3
urllib3.disable_warnings()

'''
## Nagios
Expand Down Expand Up @@ -488,6 +489,8 @@ def login(hostaddress, user, password):
if r.status_code == 200:
token = r.headers['emc-csrf-token']
cookie = r.cookies
for history in r.history:
requests.cookies.merge_cookies(cookie,history.cookies)
else:
token = 0
cookie = 0
Expand Down Expand Up @@ -555,7 +558,7 @@ def main():
if (module.lower() == 'uncommittedport'):
value, descid, desc = getUncommittedport(hostaddress, token, cookie)

s = logout(hostaddress, token, cookie)
s = logout(hostaddress, token, cookie)
else:
value = 0
descid = 'COULD_NOT_LOGIN'
Expand All @@ -565,7 +568,7 @@ def main():
if (value or value == 0) and descid and desc:
s_nagios, s_msg1, s_msg2, s_val, s_exit = NagiosStatus(value, descid, desc)
print ('%s: %s,%s,%s' % (s_nagios,s_msg1,s_msg2,s_val))
sys.exit(s_exit)
sys.exit(s_exit)
sys.exit(0)


Expand Down