github.com/makyo/juju@v0.0.0-20160425123129-2608902037e9/provider/azure/credentials.go (about)

     1  // Copyright 2016 Canonical Ltd.
     2  // Licensed under the AGPLv3, see LICENCE file for details.
     3  
     4  package azure
     5  
     6  import (
     7  	"github.com/juju/errors"
     8  
     9  	"github.com/juju/juju/cloud"
    10  )
    11  
    12  // environPoviderCredentials is an implementation of
    13  // environs.ProviderCredentials for the Azure Resource
    14  // Manager cloud provider.
    15  type environProviderCredentials struct{}
    16  
    17  // CredentialSchemas is part of the environs.ProviderCredentials interface.
    18  func (environProviderCredentials) CredentialSchemas() map[cloud.AuthType]cloud.CredentialSchema {
    19  	return map[cloud.AuthType]cloud.CredentialSchema{
    20  		cloud.UserPassAuthType: {
    21  			{
    22  				configAttrAppId, cloud.CredentialAttr{Description: "Azure Active Directory application ID"},
    23  			}, {
    24  				configAttrSubscriptionId, cloud.CredentialAttr{Description: "Azure subscription ID"},
    25  			}, {
    26  				configAttrTenantId, cloud.CredentialAttr{Description: "Azure Active Directory tenant ID"},
    27  			}, {
    28  				configAttrAppPassword, cloud.CredentialAttr{
    29  					Description: "Azure Active Directory application password",
    30  					Hidden:      true,
    31  				},
    32  			},
    33  		},
    34  	}
    35  }
    36  
    37  // DetectCredentials is part of the environs.ProviderCredentials interface.
    38  func (environProviderCredentials) DetectCredentials() (*cloud.CloudCredential, error) {
    39  	return nil, errors.NotFoundf("credentials")
    40  }