-
Notifications
You must be signed in to change notification settings - Fork 48
/
VPCHandler.go
44 lines (36 loc) · 1.07 KB
/
VPCHandler.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
// 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.08.
// by CB-Spider Team, 2020.04.
// by CB-Spider Team, 2019.06.
package resources
type VPCReqInfo struct {
IId IID // {NameId, SystemId}
IPv4_CIDR string
SubnetInfoList []SubnetInfo
}
type VPCInfo struct {
IId IID // {NameId, SystemId}
IPv4_CIDR string
SubnetInfoList []SubnetInfo
KeyValueList []KeyValue
}
type SubnetInfo struct {
IId IID // {NameId, SystemId}
IPv4_CIDR string
KeyValueList []KeyValue
}
type VPCHandler interface {
CreateVPC(vpcReqInfo VPCReqInfo) (VPCInfo, error)
ListVPC() ([]*VPCInfo, error)
GetVPC(vpcIID IID) (VPCInfo, error)
DeleteVPC(vpcIID IID) (bool, error)
AddSubnet(vpcIID IID, subnetInfo SubnetInfo) (VPCInfo, error)
RemoveSubnet(vpcIID IID, subnetIID IID) (bool, error)
}