~juju-qa/ubuntu/xenial/juju/xenial-2.0-beta3

« back to all changes in this revision

Viewing changes to src/github.com/juju/juju/provider/vsphere/provider.go

  • Committer: Martin Packman
  • Date: 2016-03-30 19:31:08 UTC
  • mfrom: (1.1.41)
  • Revision ID: martin.packman@canonical.com-20160330193108-h9iz3ak334uk0z5r
Merge new upstream source 2.0~beta3

Show diffs side-by-side

added added

removed removed

Lines of Context:
29
29
        return env, errors.Trace(err)
30
30
}
31
31
 
32
 
// PrepareForBootstrap implements environs.EnvironProvider.
33
 
func (p environProvider) PrepareForBootstrap(ctx environs.BootstrapContext, args environs.PrepareForBootstrapParams) (environs.Environ, error) {
34
 
 
 
32
// BootstrapConfig implements environs.EnvironProvider.
 
33
func (p environProvider) BootstrapConfig(args environs.BootstrapConfigParams) (*config.Config, error) {
35
34
        cfg := args.Config
36
35
        switch authType := args.Credentials.AuthType(); authType {
37
36
        case cloud.UserPassAuthType:
47
46
        default:
48
47
                return nil, errors.NotSupportedf("%q auth-type", authType)
49
48
        }
 
49
        return p.PrepareForCreateEnvironment(cfg)
 
50
}
50
51
 
51
 
        cfg, err := p.PrepareForCreateEnvironment(cfg)
52
 
        if err != nil {
53
 
                return nil, errors.Trace(err)
54
 
        }
 
52
// PrepareForBootstrap implements environs.EnvironProvider.
 
53
func (p environProvider) PrepareForBootstrap(ctx environs.BootstrapContext, cfg *config.Config) (environs.Environ, error) {
55
54
        env, err := newEnviron(cfg)
56
55
        if err != nil {
57
56
                return nil, errors.Trace(err)