-
Notifications
You must be signed in to change notification settings - Fork 0
Twisted Hybrid Cluster API Client
License
hybridlogic/txHybridCluster
Folders and files
Name | Name | Last commit message | Last commit date | |
---|---|---|---|---|
Repository files navigation
A simple Twisted client for interacting with the Hybrid Cluster API as documented at http://www.hybrid-cluster.com/api Requirements: Twisted 11+ http://twistedmatrix.com/ lxml (recommended) http://lxml.de/ As per the txHybridCluster.Client docstring: Simple wrapper for the Control Panel XML API, returning responses using the ElementTree API. The following examples must be executed within a defer.inlineCallbacks-decorated function. Smallest working example: >>> from txHybridCluster import Client >>> api = Client("my.cluster.com", "resellername", "somepass") >>> xml = yield api.testSuccess() >>> print "Got a successful response from the API", utils.tostring(xml) Error case: >>> try: >>> yield api.testFail() >>> except HybridClusterException, e: >>> print "Got error:", e Should print "Got Error: Failed test command." Something more interesting, creating a website and watching it get created. >>> result = yield api.addExternalDomain( >>> Domain='mydomain.com', >>> Type='wordpress') >>> stepActionID = int(result.find('StepActionID').text) >>> yield txHybridCluster.pollStepAction(api, stepActionID) Locking website.........................FINISHED Creating filesystem.....................PENDING Applying new configuration..............PENDING Installing application..................PENDING Unlocking website.......................PENDING See the full API documentation at http://www.hybrid-cluster.com/api for complete details on what you can achieve with the API. To procure a Hybrid Cluster deployment, contact: Luke Marsden, CTO Hybrid Logic Ltd. +1-415-449-1165 (US) / +44-203-384-6649 (UK) [email protected] http://www.hybrid-cluster.com/
About
Twisted Hybrid Cluster API Client
Resources
License
Stars
Watchers
Forks
Releases
No releases published
Packages 0
No packages published