Re: Logging into the API on Juju 2.0

2016-03-01 Thread Rick Harding
Awesome, appreciate it. On Tue, Mar 1, 2016, 8:48 AM Adam Stokes wrote: > Went ahead and filed a bug here: > https://bugs.launchpad.net/juju-core/+bug/1551743 > > On Tue, Mar 1, 2016 at 8:40 AM, Rick Harding > wrote: > >> Thank Adam. That's good feedback. With tabular output the default now we

Re: Logging into the API on Juju 2.0

2016-03-01 Thread Adam Stokes
Went ahead and filed a bug here: https://bugs.launchpad.net/juju-core/+bug/1551743 On Tue, Mar 1, 2016 at 8:40 AM, Rick Harding wrote: > Thank Adam. That's good feedback. With tabular output the default now we > should be more verbose on the yaml output and display the uuids and other > data. >

Re: Logging into the API on Juju 2.0

2016-03-01 Thread Rick Harding
Thank Adam. That's good feedback. With tabular output the default now we should be more verbose on the yaml output and display the uuids and other data. On Tue, Mar 1, 2016, 8:37 AM Adam Stokes wrote: > One of the problems using `juju list-controllers --format yaml` versus > reading the controll

Re: Logging into the API on Juju 2.0

2016-03-01 Thread Adam Stokes
One of the problems using `juju list-controllers --format yaml` versus reading the controllers.yaml file directly is the information is different. Specifically I need the UUID in order to build the URL used when accessing Juju's API. 😀 adam@deadpool:conjure 🌴 juju list-controllers --format yaml

Re: Logging into the API on Juju 2.0

2016-02-29 Thread Ian Booth
No, you are right. $ juju list-controllers --format yaml is better. On 01/03/16 14:49, John Meinel wrote: > Is there a reason to tell people to look at "controllers.yaml" rather than > having the official mechanism be something like "juju list-controllers > --format=yaml" ? I'd really like to av

Re: Logging into the API on Juju 2.0

2016-02-29 Thread John Meinel
Is there a reason to tell people to look at "controllers.yaml" rather than having the official mechanism be something like "juju list-controllers --format=yaml" ? I'd really like to avoid tying 3rd party scripts to our on-disk configuration. We can keep CLI compatibility, but on-disk structures are

Re: Logging into the API on Juju 2.0

2016-02-29 Thread Ian Booth
Just to be clear, the remote APi for listing models for a given controller exists. But you do need to look at controllers.yaml to see what controllers you have bootstrapped or have access to in order to make the remote list models api call. On 01/03/16 13:14, Adam Stokes wrote: > Got it squared aw

Re: Logging into the API on Juju 2.0

2016-02-29 Thread Adam Stokes
Got it squared away, being able to replicate `juju list-controllers` didn't have a remote api. So I will continue to read from ~/.local/share/juju/controllers.yaml. My intention was to basically see what controllers were already bootstrapped and gather the models for those controllers using the rem

Re: Logging into the API on Juju 2.0

2016-02-29 Thread Tim Penhey
It is the controller that you have logged into for the API. What are you wanting? You need a different API connection for each controller. Tim On 01/03/16 15:05, Adam Stokes wrote: > Right, but how do you specify which controller you want to list the > models for? The only way I can see is to m

Re: Logging into the API on Juju 2.0

2016-02-29 Thread Adam Stokes
Right, but how do you specify which controller you want to list the models for? The only way I can see is to manually `juju switch ` then re-login to the API and run the AllModels method. Is there a way (as an administrator) to specify which controller you want to list the models for? On Mon, Feb

Re: Logging into the API on Juju 2.0

2016-02-29 Thread Ian Booth
On 01/03/16 11:25, Adam Stokes wrote: > On Mon, Feb 29, 2016 at 7:24 PM, Tim Penhey > wrote: > >> On 01/03/16 03:48, Adam Stokes wrote: >>> Is there a way to list all models for a specific controller? >> >> Yes. > > > Mind pointing me to the api docs that has that capability? > https://godo

Re: Logging into the API on Juju 2.0

2016-02-29 Thread Adam Stokes
On Mon, Feb 29, 2016 at 7:24 PM, Tim Penhey wrote: > On 01/03/16 03:48, Adam Stokes wrote: > > Is there a way to list all models for a specific controller? > > Yes. Mind pointing me to the api docs that has that capability? -- Juju mailing list Juju@lists.ubuntu.com Modify settings or unsubscr

Re: Logging into the API on Juju 2.0

2016-02-29 Thread Tim Penhey
On 01/03/16 03:48, Adam Stokes wrote: > Is there a way to list all models for a specific controller? Yes. > https://godoc.org/github.com/juju/juju/api/controller > and https://godoc.org/github.com/juju/juju/api/modelmanager seem to do > the same thing wrt listing models. This also only does it fo

Re: Logging into the API on Juju 2.0

2016-02-29 Thread Adam Stokes
Is there a way to list all models for a specific controller? https://godoc.org/github.com/juju/juju/api/controller and https://godoc.org/github.com/juju/juju/api/modelmanager seem to do the same thing wrt listing models. This also only does it for whatever the current controller is set to before m

Re: Logging into the API on Juju 2.0

2016-02-26 Thread Adam Stokes
Ok perfect, i'll try these tags out with the api. Thanks again On Fri, Feb 26, 2016 at 9:01 PM, Ian Booth wrote: > The admin user tag for aws is the same as described below. The @local > suffix > pertains to the controller not the cloud - think of it as users for a > controller > you bootstrap y

Re: Logging into the API on Juju 2.0

2016-02-26 Thread Ian Booth
The admin user tag for aws is the same as described below. The @local suffix pertains to the controller not the cloud - think of it as users for a controller you bootstrap yourself are local to that controller. On 27/02/16 11:29, Adam Stokes wrote: > Thanks that makes sense now. I don't have aws o

Re: Logging into the API on Juju 2.0

2016-02-26 Thread Adam Stokes
Thanks that makes sense now. I don't have aws or anything but what would the admin user tag for those clouds look like? On Fri, Feb 26, 2016 at 7:07 PM, Andrew Wilkins < andrew.wilk...@canonical.com> wrote: > On Sat, Feb 27, 2016 at 1:10 AM Adam Stokes > wrote: > >> Also, will the API support no

Re: Logging into the API on Juju 2.0

2016-02-26 Thread Andrew Wilkins
On Sat, Feb 27, 2016 at 1:10 AM Adam Stokes wrote: > Also, will the API support non admin users to login and query the various > modelmanager methods they have access to? If so, will this be available by > GA release? > > On Fri, Feb 26, 2016 at 11:45 AM, Adam Stokes > wrote: > >> Currently, the

Re: Logging into the API on Juju 2.0

2016-02-26 Thread Adam Stokes
Also, will the API support non admin users to login and query the various modelmanager methods they have access to? If so, will this be available by GA release? On Fri, Feb 26, 2016 at 11:45 AM, Adam Stokes wrote: > Currently, the only way to login to the Juju 2.0 api is to use the Tag of > 'use

Logging into the API on Juju 2.0

2016-02-26 Thread Adam Stokes
Currently, the only way to login to the Juju 2.0 api is to use the Tag of 'user-admin'. However, all the files created by juju during bootstrap (accounts.yaml, models.yaml, controllers.yaml) only mention the admin user as 'admin@local' for the controller. When will the API login support logging in