-
Notifications
You must be signed in to change notification settings - Fork 11
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
Basic Example #5
Comments
Hi Kyle, I actually have a pretty complete Python client library I'm hoping to publish here by mid-January. Regarding authentication, the API just depends on the authentication configuration you have set up for your Racktables installation generally. In the case of my employer, Topsy, we use LDAP and HTTP basic auth. If a user can get to the UI, they can use the API. Here are some example URLs, which you'll need to put together in whatever way suits your particular situation. For testing I'll often use Firefox and the JSONovich extension (http://lackoftalent.org/michael/blog/json-in-firefox/) to see what comes back from a given URL. Get object id 889, including set and unset attributes: Change object id 100's allocation to: rack ID 10, position 4, front middle and rear: Assign tags with ids 40 and 50 to object id 100 (replaces the existing ones): Get the overall rackspace layout (comes back as a list of rows, within which are found the racks): Get all objects: Get all servers (servers have object type id 4): Get all VMs (type 1504), including their attributes (this significantly increases the amount of data that comes back, so be careful with large installations): Get all objects that have tag id 131 and attribute ID 2 set to 50018 (happens to be "HW type" == "HP ProLiant DL360 G5" in our case) Hope that helps! Cheers, |
And I just started writing a python library for this :-P Any chance you On Thu, Dec 20, 2012 at 1:19 PM, ibettinger [email protected]:
|
Just put it up. :) https://github.com/ibettinger/racktables-py-client/blob/master/lib/racktables/client.py I'll change but should be 99% compatible with the current API. Once I set up the upstream branching it will track the API published here much more closely. That'll be post holidays for sure though. Enjoy! --Ian |
Any chance of a basic usage example, for example, authenticating, listing some stuff, and adding something with curl or something like that?
The text was updated successfully, but these errors were encountered: