Join GitHub today
GitHub is home to over 20 million developers working together to host and review code, manage projects, and build software together.
cmd/juju/user: implement controller login #6964
Conversation
rogpeppe
changed the base branch from
develop
to
user-domain
Feb 10, 2017
| @@ -118,6 +177,7 @@ func (c *loginCommand) Run(ctx *cmd.Context) error { | ||
| // CodeNoCreds was returned, which means that external | ||
| // users are not supported. Fall back to prompting the | ||
| // user for their username and password. | ||
| + } else { |
perrito666
approved these changes
Feb 14, 2017
Thank you for the level of comments of this code, I find it beautifully commented in a very useful way.
| +--host flag is specified the user is logged into | ||
| +the controller associated with the given domain and the controller is registered | ||
| +using the domain name (the -c flag can be used to choose a different controller | ||
| +name). It a different controller is already registered with the same name, |
| +func (c *loginCommand) controllerLogin(ctx *cmd.Context, store jujuclient.ClientStore) error { | ||
| + knownDomains, err := c.getKnownControllerDomains() | ||
| + if err != nil { | ||
| + // TODO perhaps this shouldn't be fatal. |
|
$$merge$$ |
|
Status: merge request accepted. Url: http://juju-ci.vapour.ws:8080/job/github-merge-juju |
|
Build failed: Generating tarball failed |
|
$$merge$$ |
|
Status: merge request accepted. Url: http://juju-ci.vapour.ws:8080/job/github-merge-juju |
|
Build failed: Tests failed |
|
$$merge$$ |
|
Status: merge request accepted. Url: http://juju-ci.vapour.ws:8080/job/github-merge-juju |
|
Build failed: Tests failed |
|
$$merge$$ |
|
Status: merge request accepted. Url: http://juju-ci.vapour.ws:8080/job/github-merge-juju |
rogpeppe commentedFeb 10, 2017
This is the first stage of a process that will eventually
deprecate juju register in favour of juju login.
Much of the new code in juju login is copied from
juju register.
To QA, try "juju login --host some-public-controller-address",
which should do the same thing as "juju register some-public-controller-address".
You could also try changing the table in getKnownControllerDomains
and doing "juju login some-alias".