github.com/makyo/juju@v0.0.0-20160425123129-2608902037e9/provider/vsphere/credentials.go (about) 1 // Copyright 2015 Canonical Ltd. 2 // Licensed under the AGPLv3, see LICENCE file for details. 3 4 // +build !gccgo 5 6 package vsphere 7 8 import ( 9 "github.com/juju/errors" 10 11 "github.com/juju/juju/cloud" 12 ) 13 14 type environProviderCredentials struct{} 15 16 // CredentialSchemas is part of the environs.ProviderCredentials interface. 17 func (environProviderCredentials) CredentialSchemas() map[cloud.AuthType]cloud.CredentialSchema { 18 return map[cloud.AuthType]cloud.CredentialSchema{ 19 cloud.UserPassAuthType: { 20 { 21 "user", cloud.CredentialAttr{Description: "The username to authenticate with."}, 22 }, { 23 "password", cloud.CredentialAttr{ 24 Description: "The password to authenticate with.", 25 Hidden: true, 26 }, 27 }, 28 }, 29 } 30 } 31 32 // DetectCredentials is part of the environs.ProviderCredentials interface. 33 func (environProviderCredentials) DetectCredentials() (*cloud.CloudCredential, error) { 34 return nil, errors.NotFoundf("credentials") 35 }