-
Notifications
You must be signed in to change notification settings - Fork 2
/
CloudDriver.go
69 lines (61 loc) · 2.34 KB
/
CloudDriver.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
// Cloud Driver Interface of CB-Spider.
// The CB-Spider is a sub-Framework of the Cloud-Barista Multi-Cloud Project.
// The CB-Spider Mission is to connect all the clouds with a single interface.
//
// * Cloud-Barista: https://github.com/cloud-barista
//
// This is interfaces of Cloud Driver.
//
// by CB-Spider Team, 2019.06.
package interfaces
import (
icon "github.com/cloud-barista/poc-cicd-spider/cloud-control-manager/cloud-driver/interfaces/connect"
)
type DriverCapabilityInfo struct {
FIXED_SUBNET_CIDR bool // support: true, do not support: false
VPC_CIDR bool // support: true, do not support: false
ImageHandler bool // support: true, do not support: false
VPCHandler bool // support: true, do not support: false
//VNetworkHandler bool // support: true, do not support: false
SecurityHandler bool // support: true, do not support: false
KeyPairHandler bool // support: true, do not support: false
VNicHandler bool // support: true, do not support: false
PublicIPHandler bool // support: true, do not support: false
VMHandler bool // support: true, do not support: false
VMSpecHandler bool // support: true, do not support: false
}
type CredentialInfo struct {
// @todo TBD
// key-value pairs
ClientId string // Azure Credential
ClientSecret string // Azure Credential
TenantId string // Azure Credential
SubscriptionId string // Azure Credential
IdentityEndpoint string // OpenStack Credential
Username string // OpenStack Credential, Ibm
Password string // OpenStack Credential
DomainName string // OpenStack Credential
ProjectID string // OpenStack Credential
AuthToken string // Cloudit Credential
ClientEmail string // GCP
PrivateKey string // GCP
Host string // Docker
APIVersion string // Docker
MockName string // Mock
ApiKey string // Ibm
}
type RegionInfo struct {
Region string
Zone string
ResourceGroup string // Azure RegionInfo
}
type ConnectionInfo struct {
CredentialInfo CredentialInfo
RegionInfo RegionInfo
}
type CloudDriver interface {
GetDriverVersion() string
GetDriverCapability() DriverCapabilityInfo
ConnectCloud(connectionInfo ConnectionInfo) (icon.CloudConnection, error)
//ConnectNetworkCloud(connectionInfo ConnectionInfo) (icon.CloudConnection, error)
}