github.com/makyo/juju@v0.0.0-20160425123129-2608902037e9/provider/rackspace/provider.go (about) 1 // Copyright 2015 Canonical Ltd. 2 // Licensed under the AGPLv3, see LICENCE file for details. 3 4 package rackspace 5 6 import ( 7 "strings" 8 9 "github.com/juju/juju/environs" 10 "github.com/juju/juju/environs/config" 11 ) 12 13 type environProvider struct { 14 environs.EnvironProvider 15 } 16 17 var providerInstance *environProvider 18 19 // BootstrapConfig is specified in the EnvironProvider interface. 20 func (p *environProvider) BootstrapConfig(args environs.BootstrapConfigParams) (*config.Config, error) { 21 // Rackspace regions are expected to be uppercase, but Juju 22 // stores and displays them in lowercase in the CLI. Ensure 23 // they're uppercase when they get to the Rackspace API. 24 args.CloudRegion = strings.ToUpper(args.CloudRegion) 25 return p.EnvironProvider.BootstrapConfig(args) 26 }