/
cinder.go
89 lines (68 loc) · 3.01 KB
/
cinder.go
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
package cinder
import (
gofigCore "github.com/akutz/gofig"
gofig "github.com/akutz/gofig/types"
)
const (
// Name is the provider's name.
Name string = "cinder"
// ConfigAuthURL is the config key for the Identity Auth URL
ConfigAuthURL = Name + ".authURL"
// ConfigUserID is the config key for the user ID
ConfigUserID = Name + ".userID"
// ConfigUserName is the config key for the user name
ConfigUserName = Name + ".userName"
// ConfigPassword is the config key for the user password
ConfigPassword = Name + ".password"
// ConfigTokenID is the config key for the token ID
ConfigTokenID = Name + ".tokenID"
// ConfigTenantID is the config key for the tenant ID
ConfigTenantID = Name + ".tenantID"
// ConfigTenantName is the config key for the tenant name
ConfigTenantName = Name + ".tenantName"
// ConfigDomainID is the config key for the domain ID
ConfigDomainID = Name + ".domainID"
// ConfigDomainName is the config key for the domain name
ConfigDomainName = Name + ".domainName"
// ConfigRegionName is the config key for the region name
ConfigRegionName = Name + ".regionName"
// ConfigAvailabilityZoneName is the config key for the availability
// zone name
ConfigAvailabilityZoneName = Name + ".availabilityZoneName"
// ConfigTrustID is the config key for the trust ID
ConfigTrustID = Name + ".trustID"
// ConfigAttachTimeout is the config key for the attach timeout
ConfigAttachTimeout = Name + ".attachTimeout"
// ConfigDeleteTimeout is the config key for the delete timeout
ConfigDeleteTimeout = Name + ".deleteTimeout"
// ConfigCreateTimeout is the config key for the create timeout
ConfigCreateTimeout = Name + ".createTimeout"
// ConfigSnapshotTimeout is the config key for the snapshot timeout
ConfigSnapshotTimeout = Name + ".snapshotTimeout"
// ConfigCACert is the config key for custom CA certificate (usually for self signed use case)
ConfigCACert = Name + ".CACert"
// ConfigInsecure is the config ky to disable TLS verification of the server identity
ConfigInsecure = Name + ".insecure"
)
func init() {
r := gofigCore.NewRegistration("Cinder")
r.Key(gofig.String, "", "", "", ConfigAuthURL)
r.Key(gofig.String, "", "", "", ConfigUserID)
r.Key(gofig.String, "", "", "", ConfigUserName)
r.Key(gofig.String, "", "", "", ConfigPassword)
r.Key(gofig.String, "", "", "", ConfigTokenID)
r.Key(gofig.String, "", "", "", ConfigTenantID)
r.Key(gofig.String, "", "", "", ConfigTenantName)
r.Key(gofig.String, "", "", "", ConfigDomainID)
r.Key(gofig.String, "", "", "", ConfigDomainName)
r.Key(gofig.String, "", "", "", ConfigRegionName)
r.Key(gofig.String, "", "", "", ConfigAvailabilityZoneName)
r.Key(gofig.String, "", "", "", ConfigTrustID)
r.Key(gofig.String, "", "1m", "", ConfigAttachTimeout)
r.Key(gofig.String, "", "10m", "", ConfigDeleteTimeout)
r.Key(gofig.String, "", "10m", "", ConfigCreateTimeout)
r.Key(gofig.String, "", "10m", "", ConfigSnapshotTimeout)
r.Key(gofig.String, "", "", "", ConfigCACert)
r.Key(gofig.Bool, "", false, "", ConfigInsecure)
gofigCore.Register(r)
}