2017-04-12 09:29 AM
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
user = sys.argv
password = sys.argv
s = NaServer(filer, 5, 6)
output = s.invoke("system-get-version")
if(output.results_errno() != 0):
r = output.results_reason()
print("Failed: " + str(r))
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
2017-04-12 09:39 AM
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!
If this post resolved your issue, please help others by selecting ACCEPT AS SOLUTION or adding a KUDO.