~nskaggs/+junk/xenial-test

« back to all changes in this revision

Viewing changes to src/github.com/juju/juju/provider/lxd/credentials.go

  • Committer: Nicholas Skaggs
  • Date: 2016-10-24 20:56:05 UTC
  • Revision ID: nicholas.skaggs@canonical.com-20161024205605-z8lta0uvuhtxwzwl
Initi with beta15

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
// Copyright 2016 Canonical Ltd.
 
2
// Licensed under the AGPLv3, see LICENCE file for details.
 
3
 
 
4
// +build go1.3
 
5
 
 
6
package lxd
 
7
 
 
8
import (
 
9
        "github.com/juju/juju/cloud"
 
10
)
 
11
 
 
12
type environProviderCredentials struct{}
 
13
 
 
14
// CredentialSchemas is part of the environs.ProviderCredentials interface.
 
15
func (environProviderCredentials) CredentialSchemas() map[cloud.AuthType]cloud.CredentialSchema {
 
16
        // TODO (anastasiamac 2016-04-14) When/If this value changes,
 
17
        // verify that juju/juju/cloud/clouds.go#BuiltInClouds
 
18
        // with lxd type are up to-date.
 
19
        // TODO(wallyworld) update BuiltInClouds to match when we actually take notice of TLSAuthType
 
20
        return map[cloud.AuthType]cloud.CredentialSchema{
 
21
                cloud.EmptyAuthType: {},
 
22
                cloud.CertificateAuthType: {
 
23
                        {
 
24
                                cfgClientCert, cloud.CredentialAttr{Description: "The client cert used for connecting to a LXD host machine."},
 
25
                        }, {
 
26
                                cfgClientKey, cloud.CredentialAttr{Description: "The client key used for connecting to a LXD host machine."},
 
27
                        }, {
 
28
                                cfgServerPEMCert, cloud.CredentialAttr{Description: "The certificate of the LXD server on the host machine."},
 
29
                        },
 
30
                },
 
31
        }
 
32
}
 
33
 
 
34
// DetectCredentials is part of the environs.ProviderCredentials interface.
 
35
func (environProviderCredentials) DetectCredentials() (*cloud.CloudCredential, error) {
 
36
        return cloud.NewEmptyCloudCredential(), nil
 
37
}