python api client for juju-core/gojuju

James Page james.page at ubuntu.com
Wed Apr 24 10:35:21 UTC 2013


Sweet!

Nice one Kapil.

On 24/04/13 00:58, Kapil Thangavelu wrote:
> 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
-- 
James Page
Ubuntu Core Developer
Debian Maintainer
james.page at ubuntu.com




More information about the Juju mailing list