https://codereview.appspot.com/6858052/diff/5002/environs/openstack/config.go#newcode127
environs/openstack/config.go:127: return auth, fmt.Errorf("missing
username, password, tenant-name, or auth-url")
This function can be simplified to return (auth envAuth, ok bool)
instead. This error is pretty much the same one found above, and is
being discarded, which means the call site above is inferring what error
it is.
Nice. LGTM with trivials only:
https:/ /codereview. appspot. com/6858052/ diff/5002/ environs/ openstack/ config. go openstack/ config. go (right):
File environs/
https:/ /codereview. appspot. com/6858052/ diff/5002/ environs/ openstack/ config. go#newcode54 openstack/ config. go:54: func (c *environConfig) container() "control- bucket" for this
environs/
string {
As we discussed, let's use controlBucket/
setting, for compatibility with the ec2 provider.
https:/ /codereview. appspot. com/6858052/ diff/5002/ environs/ openstack/ config. go#newcode75 openstack/ config. go:75: ecfg.authURL() == "" {
environs/
Can we please have these in the same line? We have lines around the same
width around here, and it ends up more reasonable as it doesn't align
with the internal block.
https:/ /codereview. appspot. com/6858052/ diff/5002/ environs/ openstack/ config. go#newcode79 openstack/ config. go:79: return nil, fmt.Errorf( "environment has
environs/
no username, password, tenant-name, or auth-url")
"OpenStack environment requires options username, password, tenant-name,
and auth-url"
https:/ /codereview. appspot. com/6858052/ diff/5002/ environs/ openstack/ config. go#newcode112 openstack/ config. go:112: type dummyAuth struct {
environs/
Why dummy? This looks quite real. I think it should be envAuth or
something like that.
https:/ /codereview. appspot. com/6858052/ diff/5002/ environs/ openstack/ config. go#newcode116 openstack/ config. go:116: func dummyEnvAuth() (dummyAuth, error)
environs/
{
getEnvAuth?
https:/ /codereview. appspot. com/6858052/ diff/5002/ environs/ openstack/ config. go#newcode126 openstack/ config. go:126: auth.authURL == "" {
environs/
Same line as well, please.
https:/ /codereview. appspot. com/6858052/ diff/5002/ environs/ openstack/ config. go#newcode127 openstack/ config. go:127: return auth, fmt.Errorf("missing
environs/
username, password, tenant-name, or auth-url")
This function can be simplified to return (auth envAuth, ok bool)
instead. This error is pretty much the same one found above, and is
being discarded, which means the call site above is inferring what error
it is.
https:/ /codereview. appspot. com/6858052/ diff/5002/ environs/ openstack/ config_ test.go openstack/ config_ test.go (right):
File environs/
https:/ /codereview. appspot. com/6858052/ diff/5002/ environs/ openstack/ config_ test.go# newcode133 openstack/ config_ test.go: 133: var configTests = []configTest{
environs/
Nice tests.
https:/ /codereview. appspot. com/6858052/