Skip to content

Region Zone Driver API

ByoungSeob Kim edited this page Dec 13, 2023 · 3 revisions

Region/Zone Driver API


- CB-Spider Region/Zone Specification V0.5
- V0.5 : 실시간 목록 제공, 추후 필요시 캐싱 보완

1. CB-Spider Region/Zone 개요


2. Region/Zone Driver Common API

  • Source Tree

    $tree cb-spider/cloud-control-manager/cloud-driver/interfaces/
    cb-spider/cloud-control-manager/cloud-driver/interfaces/
    |-- CloudDriver.go
    |-- README.md
    |-- connect
    |   `-- CloudConnect.go
    `-- resources
        |-- AnyCallHandler.go
        |-- ClusterHandler.go
        |-- DiskHandler.go
        |-- IId.go
        |-- ImageHandler.go
        |-- KeyPairHandler.go
        |-- KeyValue.go
        |-- MyImageHandler.go
        |-- NLBHandler.go
        |-- RegionZoneHandler.go  <================= Region/Zone Driver API
        |-- SecurityHandler.go
        |-- VMHandler.go
        |-- VMSpecHandler.go
        `-- VPCHandler.go
    
    
  • Driver API Spec (latest)

      package resources
    
      // -------- Const
      type ZoneStatus string
    
      const (
              ZoneAvailable   ZoneStatus = "Available"
              ZoneUnavailable ZoneStatus = "Unavailable"
              NotSupported    ZoneStatus = "StatusNotSupported"
      )
    
      type RegionZoneInfo struct {
              Name        string
              DisplayName string
              ZoneList    []ZoneInfo
    
              KeyValueList []KeyValue
      }
    
      type ZoneInfo struct {
              Name        string
              DisplayName string
              Status      ZoneStatus // Available | Unavailable | NotSupported
    
              KeyValueList []KeyValue
      }
    
      type RegionZoneHandler interface {
              ListRegionZone() ([]*RegionZoneInfo, error)
              GetRegionZone(Name string) (RegionZoneInfo, error)
    
              ListOrgRegion() (string, error) // return string: json format
              ListOrgZone() (string, error)   // return string: json format

3. CB-Spider Region/Zone REST API 규격


Table of contents



Clone this wiki locally