python api client for juju-core/gojuju
Kapil Thangavelu
kapil.thangavelu at canonical.com
Tue Apr 23 23:58:52 UTC 2013
Hi Folks,
I put together a quick api client for juju-core, its pre alpha-ware, as the
underlying api will change, but its useful. Juju-core ships with its api
endpoint on, and accessible over a websocket.
src/bugs http://launchpad.net/python-jujuclient
$ pip install jujuclient
$ python
> from jujuclient import Environment
# wss and port 17070 required
> env = Environment('wss://instance-ip-address:17070')
> env.login('admin secret from config file')
> watcher = env.watch()
> env.deploy('blog', 'cs:precise/wordpress')
> env.deploy('db', 'cs:precise/mysql')
> env.add_relation('blog', 'db')
> env.expose('blog')
> for change_set in watcher:
... print change_set
cheers,
Kapil
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.ubuntu.com/archives/juju/attachments/20130423/dcaf63a4/attachment.html>
More information about the Juju
mailing list