-
Notifications
You must be signed in to change notification settings - Fork 2
/
VMSpecHandler.go
43 lines (35 loc) · 1008 Bytes
/
VMSpecHandler.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
// 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 Resouces interfaces of Cloud Driver.
//
// by CB-Spider Team, 2020.01.
package resources
type VMSpecInfo struct {
Region string
Name string
VCpu VCpuInfo
Mem string
Gpu []GpuInfo
KeyValueList []KeyValue
}
type VCpuInfo struct {
Count string
Clock string // GHz
}
type GpuInfo struct {
Count string
Mfr string
Model string
Mem string
}
type VMSpecHandler interface {
// Region: AWS=Region, GCP=Zone, Azure=Location
ListVMSpec(Region string) ([]*VMSpecInfo, error)
GetVMSpec(Region string, Name string) (VMSpecInfo, error)
ListOrgVMSpec(Region string) (string, error) // return string: json format
GetOrgVMSpec(Region string, Name string) (string, error) // return string: json format
}