ONTAP Discussions
ONTAP Discussions
Solved! See The Solution
Thanks for providing that. So the issue is that there is a formatting problem with your certificate which is what the server responded with. That's why after the call it's not present on the cluster.
It looks like your certificate string is missing line breaks encoded in the string. Try adding a \n to the end of each line of the string.
This example script might help you: https://github.com/NetApp/ontap-rest-python/blob/master/examples/python_client_library/cert_auth.py
It goes through a complete workflow of creating, installing, and using certificate authentication.
"not working" is not giving me enough information to give more specific help.
You might want to enable debug logging on your script so that you can verify the HTTP request and responses that are sent/received. There might be additional information there that will help you. Here are details about how to do that: https://library.netapp.com/ecmdocs/ECMLP2879970/html/index.html#log_all_api_calls-flag
I assumed it was a typo or copy/paste problem before, but do you really have a "#" character in the last line of your script? If you do, that would be the issue because that is commenting out the actual function call and so no request would be sent. I don't see that present in the documentation you linked to.
Hydrate isn't a function on its own. I want to make sure we're saying the same thing here. The final line of your script should look like this:
resource.post()
Is that what it looks like to you? You mentioned "as you can see in the picture", but I cannot see any picture attached to this thread.
OK. I'm having a bit of a difficult time understanding how your code isn't making any API calls if your script ends with resource.post(). Perhaps you could post your code and output with debugging enabled to something like a GitHub gist and provide the link? https://gist.github.com/
Thanks for providing that. So the issue is that there is a formatting problem with your certificate which is what the server responded with. That's why after the call it's not present on the cluster.
It looks like your certificate string is missing line breaks encoded in the string. Try adding a \n to the end of each line of the string.