python api client for juju-core/gojuju
Mark Ramm
mark.ramm-christensen at canonical.com
Wed Apr 24 05:10:16 UTC 2013
On 04/23/2013 06:58 PM, Kapil Thangavelu wrote:
> 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
>
>
>
>
Nice!
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.ubuntu.com/archives/juju/attachments/20130424/5ef819a0/attachment.html>
More information about the Juju
mailing list