-
Notifications
You must be signed in to change notification settings - Fork 50
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
10.1 includes basic Python support #75
Comments
Honestly, I'd really like to see this used as a session constructor (and requests while we're at it!), but either path would be great. What do you think the relative complexity would be, between the two options? Also, I've heard from some sources that a full Python API is being planned for 10.5 or sooner... not sure what the actual timeframe is on that, however. |
What I don't like about this implementation is how it's supposed to be used later on... clearconfig_obj = {}
clearconfig_obj['force'] = "1"
clearconfig_obj['level'] = "full"
response = post(session, "clear", "nsconfig", clearconfig_obj) Basically it looks more like combining json objects by hand, rather than an "object-like" syntax.. |
Got access to 10.5 beta from Citrix. As soon as I get hands on official Python API, I'll report back. Good thing is that in the meantime I could just steal the base object from them, integrate here and support this one until official Python SDK will be adopted by everyone. Anyway, I'll use this issue to share some insights on how official Python SDK looks like. |
I've got a copy of the Python SDK. The base login object (base_resource.py) uses requests, json, abc, urllib2, and inspect. Also, looks like it's a near-direct port of the Java SDK, complete with the class naming scheme, i.e.: from src.com.citrix.netscaler.nitro.service.options import options Also: bulk operations look to be fully supported! Digging into it more this morning. |
Is it dict-based or getter/setter based? |
Also, whyyyy are they using both requests and urllib2? |
Hey,
We've just upgraded our netscalers to 10.1 and I found Python samples (using
requests
lib) inside netscaler itself.It's located at
/var/netscaler/nitro/ns-10.1-123.11-nitro-python-samples.tgz
(YMMV depending on the build you're using).Looking at it.. It looks somewhat raw.. Do we want to implement that into nsnitro as an alternative session constructor?
My other thought was to redo the nsnitro object in such a way that one can specify version to use and go from there. Whereas we could use the Nitro.py that Netscaler supplies.
Here's the implementation they made:
Any opinions?
The text was updated successfully, but these errors were encountered: