-
Notifications
You must be signed in to change notification settings - Fork 47
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add initial driver interface for regin and zone info
- Loading branch information
1 parent
f728aeb
commit 87df2f2
Showing
1 changed file
with
41 additions
and
0 deletions.
There are no files selected for viewing
41 changes: 41 additions & 0 deletions
41
cloud-control-manager/cloud-driver/interfaces/resources/RegionZoneHandler.go
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,41 @@ | ||
// 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, 2023.09. | ||
|
||
package resources | ||
|
||
// -------- Const | ||
type ZoneStatus string | ||
|
||
const ( | ||
ZoneAvailable ZoneStatus = "Available" | ||
ZoneUnavailable ZoneStatus = "Unavailable" | ||
) | ||
|
||
type RegionZoneInfo struct { | ||
Name string | ||
DisplayName string | ||
ZoneList []ZoneInfo | ||
|
||
KeyValueList []KeyValue | ||
} | ||
|
||
type ZoneInfo struct { | ||
Name string | ||
DisplayName string | ||
Status ZoneStatus // Available | Unavailable | ||
|
||
KeyValueList []KeyValue | ||
} | ||
|
||
type RegionZoneHandler interface { | ||
ListRegionZone() ([]*RegionZoneInfo, error) | ||
ListOrgRegion() (string, error) // return string: json format | ||
ListOrgZone() (string, error) // return string: json format | ||
} |