localhost lost as a builtin cloud from cmd. #7039

Merged
merged 2 commits into from Feb 27, 2017

Conversation

Projects
None yet
3 participants
Member

anastasiamac commented Feb 27, 2017

Description of change

Juju caters for 3 categories of clouds - public, private and built-in. Some command could not recognise built-in clouds.

QA steps

SCENARIO 1: interactively bootstrap with a built-in cloud

  1. 'juju bootstrap'
  2. Select localhost as a cloud (either by pressing ENTER or typing it in)
  3. Bootstrap proceeds as expected without throwing "unknown cloud" error

SCENARIO 2: List regions for a built-in cloud

  1. 'juju regions localhost'
  2. Presented with a list of correct regions without throwing "unknown cloud" error

Documentation changes

n/a

Bug reference

https://bugs.launchpad.net/juju/+bug/1665056

axw approved these changes Feb 27, 2017

cmd/juju/common/cloud.go
+// regardless of whether it's public, private or builtin cloud.
+// Since this method caters for builtin clouds, unlike cloud.CloudByName,
+// it should be used in cmd.
+func AnyCloudByName(cloudName string) (*jujucloud.Cloud, error) {
@axw

axw Feb 27, 2017

Member

can this just be called "CloudByName"? the "Any" prefix doesn't explain the difference between this and cloud.CloudByName, so may as well not be there

@anastasiamac

anastasiamac Feb 27, 2017

Member

It could but I did not want people to confuse it with cloud.CloudByName and wanted to make it absolutely, positively, blatantly obvious that one has a limitation over the other, especially when called from commands...
I am not too attached to the name if you insist though :D

Member

anastasiamac commented Feb 27, 2017

$$merge$$

Contributor

jujubot commented Feb 27, 2017

Status: merge request accepted. Url: http://juju-ci.vapour.ws:8080/job/github-merge-juju

@jujubot jujubot merged commit 3a372fe into juju:develop Feb 27, 2017

@anastasiamac anastasiamac deleted the anastasiamac:cmd-lost-localhost branch Feb 27, 2017

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment