Options
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page
- Bookmark
- Permalink
- Email to a Friend
- Report Inappropriate Content
Not a full time programmer, but trying my hand at NetApp APIs. I'm getting connection refused when connecting to CDOT filer using SDK 5.6.
filer = sys.argv[1]
user = sys.argv[2]
password = sys.argv[3]
s = NaServer(filer, 5, 6)
s.set_server_type("Filer")
s.set_admin_user(user, password)
s.set_transport_type("HTTP")
output = s.invoke("system-get-version")
if(output.results_errno() != 0):
r = output.results_reason()
print("Failed: " + str(r))
else :
r = output.child_get_string("version")
print(r + "\n")
User@~/PycharmProjects/Training$ python template.py my.ip admin my.password
Failed: [Errno 61] Connection refused
I am using the admin user and password and connecting to the cluster mgmt IP address. Looking for some advice. Thanks!
Solved! See The Solution
1 REPLY 1
- Bookmark
- Permalink
- Email to a Friend
- Report Inappropriate Content
Hello @AJ,
A few things to test/check.
- The ZAPI version should be 1.X, with the X being dependent on the version of ONTAP you're using. For example, ONTAP 9 = 1.100, 9.1 = 1.110. You'll want to change the NaServer object to look something like this:
s = NaServer(filer, 1, 100)
- Try and echo/print out the filer, user, and password variables. Make sure they are equal to what you expect them to be.
- Ensure that HTTP access is enabled on your cluster for the interface you're connecting to.
- Ensure the user you're using has ONTAPI access granted (though I don't think this is the issue, you would get a different error).
Hope that helps!
Andrew
If this post resolved your issue, please help others by selecting ACCEPT AS SOLUTION or adding a KUDO.