Allow underscores in cloud names #7736

Merged
merged 1 commit into from Aug 14, 2017

Conversation

Projects
None yet
3 participants
Owner

wallyworld commented Aug 14, 2017

Description of change

Cloud names do not support having "" in them. This messes up bootstrap if the user has chosen to create a cloud with an "" in the name. The PR pulls in an updated names.v2 dep which fixes the issue.

Also add extra validation to add-cloud to reject invalid cloud names.

Also do a drive by cleanup of unused code.

QA steps

Bootstrap using a cloud with "_" in the name.

Documentation changes

From what I can see, no existing doc mentions cloud names having "_".

Bug reference

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

This is all good, but it doesn't prevent the panic on bootstrap. There could be junk in clouds.yaml; add-cloud is just one input method. Please add validation in the bootstrap command.

cmd/juju/cloud/add.go
@@ -18,6 +18,7 @@ import (
"github.com/juju/juju/cmd/juju/common"
"github.com/juju/juju/cmd/juju/interact"
"github.com/juju/juju/environs"
+ "gopkg.in/juju/names.v2"
@axw

axw Aug 14, 2017

Member

move me

Owner

wallyworld commented Aug 14, 2017

Added validation to bootstrap itself (interactive and non-interactive).

axw approved these changes Aug 14, 2017

Owner

wallyworld commented Aug 14, 2017

$$merge$$

Contributor

jujubot commented Aug 14, 2017

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

@jujubot jujubot merged commit 84762f6 into juju:2.2 Aug 14, 2017

1 check passed

continuous-integration/jenkins/pr-merge This commit looks good
Details
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment