Options
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Mute
- Printer Friendly Page
Error using Python NMSDK 5.4 to connect to OnCommand 6.3
2015-11-03
10:18 AM
3,188 Views
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I'm trying to get a connection working through the Python SDK to OnCommand 6.3 . I believe we are running on the appliance. When I run the below script (essentially the hello world script in the documentation), I get this error: "Failed [SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed (_ssl.c:581)"
Script (with host/username/password blocked out):
dfmserver = 'xxxxxx' #OnCommand 6.3
dfmuser = 'xxxxxx'
dfmpw = 'xxxxxx'
s = NaServer(dfmserver, 1, 0)
s.set_style('LOGIN')
s.set_transport_type('HTTPS')
s.set_server_type('DFM')
s.set_port(443)
s.set_admin_user(dfmuser, dfmpw)
output = s.invoke("dfm-about")
if(output.results_errno() != 0):
r = output.results_reason()
print("Failed " + str(r) + "\n")
else :
r = output.child_get_string("version")
print("Hello World ! DFM Server version is: " + r + "\n")
Given that I'm not using a certificate to connect, I wonderif this is an OnCommand setting that needs to be tweaked. Any suggestions?
1 REPLY 1
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi,
I experienced the same.
Patch NaServer.py adding following code at line 41
#Patch Verification Certificate Fail
ssl._create_default_https_context = ssl._create_unverified_context
Regards,
François
