Logging into the API on Juju 2.0
Adam Stokes
adam.stokes at canonical.com
Tue Mar 1 03:14:43 UTC 2016
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 remote juju api. But that doesn't exist so I will
mimic what `juju list-controllers` does and read from the yaml file for
controllers that are local to my admin and users.
On Mon, Feb 29, 2016 at 9:40 PM, Tim Penhey <tim.penhey at canonical.com>
wrote:
> 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 manually `juju switch
> > <controller>` 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 29, 2016 at 8:46 PM, Ian Booth <ian.booth at canonical.com
> > <mailto:ian.booth at canonical.com>> wrote:
> >
> >
> >
> > On 01/03/16 11:25, Adam Stokes wrote:
> > > On Mon, Feb 29, 2016 at 7:24 PM, Tim Penhey
> > <tim.penhey at canonical.com <mailto:tim.penhey at canonical.com>>
> > > 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://godoc.org/github.com/juju/juju/api/controller#Client.AllModels
> >
> >
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.ubuntu.com/archives/juju/attachments/20160229/00fb8e63/attachment.html>
More information about the Juju
mailing list