-
Notifications
You must be signed in to change notification settings - Fork 47
REST API Region Zone Information Guide
ByoungSeob Kim edited this page Mar 13, 2024
·
10 revisions
- 연결 설정 전에 Driver Name과 Credential Name으로 Region/Zone 정보를 얻는 API
- ※ 연결 설정(Connection Config): DriverName + CredentialName + RegionName으로 구성된 연결 이름(Connection ID)
-
curl -sX GET http://localhost:1024/spider/driver |json_pp;
curl -sX GET http://localhost:1024/spider/credential |json_pp;
-
curl -sX GET "http://localhost:1024/spider/preconfig/regionzone?DriverName=aws-driver01&CredentialName=aws-credential01" | json_pp
-
output:
{ "regionzone" : [ { "DisplayName" : "ap-northeast-2", "KeyValueList" : [], "Name" : "ap-northeast-2", "ZoneList" : [ { "DisplayName" : "ap-northeast-2a", "KeyValueList" : null, "Name" : "ap-northeast-2a", "Status" : "Available" }, { "DisplayName" : "ap-northeast-2b", "KeyValueList" : null, "Name" : "ap-northeast-2b", "Status" : "Available" }, { "DisplayName" : "ap-northeast-2c", "KeyValueList" : null, "Name" : "ap-northeast-2c", "Status" : "Available" }, --More--
-
curl -sX GET "http://localhost:1024/spider/preconfig/regionzone/ap-northeast-2?DriverName=aws-driver01&CredentialName=aws-credential01" | json_pp
-
output:
{ "DisplayName" : "ap-northeast-2", "KeyValueList" : [], "Name" : "ap-northeast-2", "ZoneList" : [ { "DisplayName" : "ap-northeast-2a", "KeyValueList" : null, "Name" : "ap-northeast-2a", "Status" : "Available" }, { "DisplayName" : "ap-northeast-2b", "KeyValueList" : null, "Name" : "ap-northeast-2b", "Status" : "Available" }, { "DisplayName" : "ap-northeast-2c", "KeyValueList" : null, "Name" : "ap-northeast-2c", "Status" : "Available" }, { "DisplayName" : "ap-northeast-2d", "KeyValueList" : null, --More--
-
curl -sX GET "http://localhost:1024/spider/preconfig/orgregion?DriverName=aws-driver01&CredentialName=aws-credential01" | json_pp
-
output:
{ "Regions" : [ { "Endpoint" : "ec2.ap-south-2.amazonaws.com", "OptInStatus" : "not-opted-in", "RegionName" : "ap-south-2" }, { "Endpoint" : "ec2.ap-south-1.amazonaws.com", "OptInStatus" : "opt-in-not-required", "RegionName" : "ap-south-1" }, { "Endpoint" : "ec2.eu-south-1.amazonaws.com", "OptInStatus" : "opted-in", "RegionName" : "eu-south-1" }, { "Endpoint" : "ec2.eu-south-2.amazonaws.com", "OptInStatus" : "not-opted-in", "RegionName" : "eu-south-2" }, { "Endpoint" : "ec2.me-central-1.amazonaws.com", "OptInStatus" : "opted-in", "RegionName" : "me-central-1" --More--
- 연결 설정 이름(ConnectionName)으로 Region/Zeon 정보를 얻는 API
curl -sX GET http://localhost:1024/spider/connectionconfig |json_pp;
-
curl -sX GET "http://localhost:1024/spider/regionzone?ConnectionName=aws-config01" | json_pp
-
output:
{ "regionzone" : [ { "DisplayName" : "ap-northeast-2", "KeyValueList" : [], "Name" : "ap-northeast-2", "ZoneList" : [ { "DisplayName" : "ap-northeast-2a", "KeyValueList" : null, "Name" : "ap-northeast-2a", "Status" : "Available" }, { "DisplayName" : "ap-northeast-2b", "KeyValueList" : null, "Name" : "ap-northeast-2b", "Status" : "Available" }, { "DisplayName" : "ap-northeast-2c", "KeyValueList" : null, "Name" : "ap-northeast-2c", "Status" : "Available" }, { --More--
-
curl -sX GET "http://localhost:1024/spider/regionzone/ap-northeast-2?ConnectionName=aws-config01" | json_pp
-
output:
{ "DisplayName" : "ap-northeast-2", "KeyValueList" : [], "Name" : "ap-northeast-2", "ZoneList" : [ { "DisplayName" : "ap-northeast-2a", "KeyValueList" : null, "Name" : "ap-northeast-2a", "Status" : "Available" }, { "DisplayName" : "ap-northeast-2b", "KeyValueList" : null, "Name" : "ap-northeast-2b", "Status" : "Available" }, { "DisplayName" : "ap-northeast-2c", "KeyValueList" : null, "Name" : "ap-northeast-2c", "Status" : "Available" }, { "DisplayName" : "ap-northeast-2d", "KeyValueList" : null, --More--
-
curl -sX GET "http://localhost:1024/spider/orgregion?ConnectionName=aws-config01" | json_pp
-
output:
{ "Regions" : [ { "Endpoint" : "ec2.ap-south-2.amazonaws.com", "OptInStatus" : "not-opted-in", "RegionName" : "ap-south-2" }, { "Endpoint" : "ec2.ap-south-1.amazonaws.com", "OptInStatus" : "opt-in-not-required", "RegionName" : "ap-south-1" }, { "Endpoint" : "ec2.eu-south-1.amazonaws.com", "OptInStatus" : "opted-in", "RegionName" : "eu-south-1" }, { "Endpoint" : "ec2.eu-south-2.amazonaws.com", "OptInStatus" : "not-opted-in", "RegionName" : "eu-south-2" }, { "Endpoint" : "ec2.me-central-1.amazonaws.com", "OptInStatus" : "opted-in", "RegionName" : "me-central-1" --More--
-
curl -sX GET "http://localhost:1024/spider/orgzone?ConnectionName=aws-config01" | json_pp
-
output:
[ { "AvailabilityZones" : [ { "GroupName" : "ap-south-1", "Messages" : null, "NetworkBorderGroup" : "ap-south-1", "OptInStatus" : "opt-in-not-required", "ParentZoneId" : null, "ParentZoneName" : null, "RegionName" : "ap-south-1", "State" : "available", "ZoneId" : "aps1-az1", "ZoneName" : "ap-south-1a", "ZoneType" : "availability-zone" }, { "GroupName" : "ap-south-1", "Messages" : null, "NetworkBorderGroup" : "ap-south-1", "OptInStatus" : "opt-in-not-required", "ParentZoneId" : null, "ParentZoneName" : null, "RegionName" : "ap-south-1", "State" : "available", "ZoneId" : "aps1-az3", --More--
- 연결 설정 이전에 DriverName과 CredentialName만을 활용한 RegionZopnePreConfig API의 경우
- CSP 특성상 Region 정보가 반드시 필요한 CSP들이 존재
- AWS, Alibaba: CSP의 API 실행 요청 대상 Region 설정이 필수
- Tencent: Driver에서 Connection 설정 전에 Zone 설정 여부를 검증(Tencent API에서는 없어도 무관, Driver 안정성 위해 존중)
-
- 현재, AWS, Alibaba, Tencent의 경우 default Region/Zone을 각 CSP의 Seoul Region과 첫번째 Zone으로 설정함
- 필요시 원하는 Region/Zone으로 변경 가능
- 참고,
-
- KTVPC:시험전
- 그외 CSP 성공
[Mock]
- 연결 설정 이전
curl -sX GET "http://localhost:1024/spider/preconfig/regionzone?DriverName=mock-driver-01&CredentialName=mock-credential-01" | json_pp
curl -sX GET "http://localhost:1024/spider/preconfig/regionzone/neptune?DriverName=mock-driver-01&CredentialName=mock-credential-01" | json_pp
curl -sX GET "http://localhost:1024/spider/preconfig/orgregion?DriverName=mock-driver-01&CredentialName=mock-credential-01" | json_pp
- 연결 설정 이후
curl -sX GET "http://localhost:1024/spider/regionzone?ConnectionName=mock-config-01" | json_pp
curl -sX GET "http://localhost:1024/spider/regionzone/neptune?ConnectionName=mock-config-01" | json_pp
curl -sX GET "http://localhost:1024/spider/orgregion?ConnectionName=mock-config-01" | json_pp
curl -sX GET "http://localhost:1024/spider/orgzone?ConnectionName=mock-config-01" | json_pp
[AWS] (cloudos_meta.yaml: default Region/Zone 사용)
- 연결 설정 이전
curl -sX GET "http://localhost:1024/spider/preconfig/regionzone?DriverName=aws-driver01&CredentialName=aws-credential01" | json_pp
curl -sX GET "http://localhost:1024/spider/preconfig/regionzone/ap-northeast-2?DriverName=aws-driver01&CredentialName=aws-credential01" | json_pp
curl -sX GET "http://localhost:1024/spider/preconfig/orgregion?DriverName=aws-driver01&CredentialName=aws-credential01" | json_pp
- 연결 설정 이후
curl -sX GET "http://localhost:1024/spider/regionzone?ConnectionName=aws-config01" | json_pp
curl -sX GET "http://localhost:1024/spider/regionzone/ap-northeast-2?ConnectionName=aws-config01" | json_pp
curl -sX GET "http://localhost:1024/spider/orgregion?ConnectionName=aws-config01" | json_pp
curl -sX GET "http://localhost:1024/spider/orgzone?ConnectionName=aws-config01" | json_pp
[Azure]
curl -sX GET "http://localhost:1024/spider/preconfig/regionzone?DriverName=azure-driver01&CredentialName=azure-credential01" | json_pp
curl -sX GET "http://localhost:1024/spider/preconfig/regionzone/australiacentral?DriverName=azure-driver01&CredentialName=azure-credential01" | json_pp
curl -sX GET "http://localhost:1024/spider/preconfig/orgregion?DriverName=azure-driver01&CredentialName=azure-credential01" | json_pp
curl -sX GET "http://localhost:1024/spider/regionzone?ConnectionName=azure-northeu-config" | json_pp
curl -sX GET "http://localhost:1024/spider/regionzone/australiacentral?ConnectionName=azure-northeu-config" | json_pp
curl -sX GET "http://localhost:1024/spider/orgregion?ConnectionName=azure-northeu-config" | json_pp
curl -sX GET "http://localhost:1024/spider/orgzone?ConnectionName=azure-northeu-config" | json_pp
[GCP]
curl -sX GET "http://localhost:1024/spider/preconfig/regionzone?DriverName=gcp-driver01&CredentialName=gcp-credential01" | json_pp
curl -sX GET "http://localhost:1024/spider/preconfig/regionzone/me-central1?DriverName=gcp-driver01&CredentialName=gcp-credential01" | json_pp
curl -sX GET "http://localhost:1024/spider/preconfig/orgregion?DriverName=gcp-driver01&CredentialName=gcp-credential01" | json_pp
curl -sX GET "http://localhost:1024/spider/regionzone?ConnectionName=gcp-iowa-config" | json_pp
curl -sX GET "http://localhost:1024/spider/regionzone/me-central1?ConnectionName=gcp-iowa-config" | json_pp
curl -sX GET "http://localhost:1024/spider/orgregion?ConnectionName=gcp-iowa-config" | json_pp
curl -sX GET "http://localhost:1024/spider/orgzone?ConnectionName=gcp-iowa-config" | json_pp
[Alibaba] (cloudos_meta.yaml: default Region/Zone 사용)
curl -sX GET "http://localhost:1024/spider/preconfig/regionzone?DriverName=alibaba-driver01&CredentialName=alibaba-credential01" | json_pp
curl -sX GET "http://localhost:1024/spider/preconfig/regionzone/cn-hangzhou?DriverName=alibaba-driver01&CredentialName=alibaba-credential01" | json_pp
curl -sX GET "http://localhost:1024/spider/preconfig/orgregion?DriverName=alibaba-driver01&CredentialName=alibaba-credential01" | json_pp
curl -sX GET "http://localhost:1024/spider/regionzone?ConnectionName=alibaba-beijing-config" | json_pp
curl -sX GET "http://localhost:1024/spider/regionzone/cn-hangzhou?ConnectionName=alibaba-beijing-config" | json_pp
curl -sX GET "http://localhost:1024/spider/orgregion?ConnectionName=alibaba-beijing-config" | json_pp
curl -sX GET "http://localhost:1024/spider/orgzone?ConnectionName=alibaba-beijing-config" | json_pp
[Tencent] (cloudos_meta.yaml: default Region/Zone 사용)
curl -sX GET "http://localhost:1024/spider/preconfig/regionzone?DriverName=tencent-driver01&CredentialName=tencent-credential01" | json_pp
curl -sX GET "http://localhost:1024/spider/preconfig/regionzone/sa-saopaulo?DriverName=tencent-driver01&CredentialName=tencent-credential01" | json_pp
curl -sX GET "http://localhost:1024/spider/preconfig/orgregion?DriverName=tencent-driver01&CredentialName=tencent-credential01" | json_pp
curl -sX GET "http://localhost:1024/spider/regionzone?ConnectionName=tencent-seoul1-config" | json_pp
curl -sX GET "http://localhost:1024/spider/regionzone/sa-saopaulo?ConnectionName=tencent-seoul1-config" | json_pp
curl -sX GET "http://localhost:1024/spider/orgregion?ConnectionName=tencent-seoul1-config" | json_pp
curl -sX GET "http://localhost:1024/spider/orgzone?ConnectionName=tencent-seoul1-config" | json_pp
[OpenStack]
curl -sX GET "http://localhost:1024/spider/preconfig/regionzone?DriverName=openstack-driver01&CredentialName=openstack-credential01" | json_pp
curl -sX GET "http://localhost:1024/spider/preconfig/regionzone/RegionOne?DriverName=openstack-driver01&CredentialName=openstack-credential01" | json_pp
curl -sX GET "http://localhost:1024/spider/preconfig/orgregion?DriverName=openstack-driver01&CredentialName=openstack-credential01" | json_pp
curl -sX GET "http://localhost:1024/spider/regionzone?ConnectionName=openstack-config01" | json_pp
curl -sX GET "http://localhost:1024/spider/regionzone/RegionOne?ConnectionName=openstack-config01" | json_pp
curl -sX GET "http://localhost:1024/spider/orgregion?ConnectionName=openstack-config01" | json_pp
curl -sX GET "http://localhost:1024/spider/orgzone?ConnectionName=openstack-config01" | json_pp
[NCP]
curl -sX GET "http://localhost:1024/spider/preconfig/regionzone?DriverName=ncp-driver01&CredentialName=ncp-credential01" | json_pp
curl -sX GET "http://localhost:1024/spider/preconfig/regionzone/USWN?DriverName=ncp-driver01&CredentialName=ncp-credential01" | json_pp
curl -sX GET "http://localhost:1024/spider/preconfig/orgregion?DriverName=ncp-driver01&CredentialName=ncp-credential01" | json_pp
curl -sX GET "http://localhost:1024/spider/regionzone?ConnectionName=ncp-korea1-config" | json_pp
curl -sX GET "http://localhost:1024/spider/regionzone/USWN?ConnectionName=ncp-korea1-config" | json_pp
curl -sX GET "http://localhost:1024/spider/orgregion?ConnectionName=ncp-korea1-config" | json_pp
curl -sX GET "http://localhost:1024/spider/orgzone?ConnectionName=ncp-korea1-config" | json_pp
[NCPVPC]
curl -sX GET "http://localhost:1024/spider/preconfig/regionzone?DriverName=ncpvpc-driver01&CredentialName=ncpvpc-credential01" | json_pp
curl -sX GET "http://localhost:1024/spider/preconfig/regionzone/SGN?DriverName=ncpvpc-driver01&CredentialName=ncpvpc-credential01" | json_pp
curl -sX GET "http://localhost:1024/spider/preconfig/orgregion?DriverName=ncpvpc-driver01&CredentialName=ncpvpc-credential01" | json_pp
curl -sX GET "http://localhost:1024/spider/regionzone?ConnectionName=ncpvpc-korea1-config" | json_pp
curl -sX GET "http://localhost:1024/spider/regionzone/SGN?ConnectionName=ncpvpc-korea1-config" | json_pp
curl -sX GET "http://localhost:1024/spider/orgregion?ConnectionName=ncpvpc-korea1-config" | json_pp
curl -sX GET "http://localhost:1024/spider/orgzone?ConnectionName=ncpvpc-korea1-config" | json_pp
[HNH]
curl -sX GET "http://localhost:1024/spider/preconfig/regionzone?DriverName=nhncloud-driver01&CredentialName=nhncloud-credential01" | json_pp
curl -sX GET "http://localhost:1024/spider/preconfig/regionzone/JP1?DriverName=nhncloud-driver01&CredentialName=nhncloud-credential01" | json_pp
curl -sX GET "http://localhost:1024/spider/preconfig/orgregion?DriverName=nhncloud-driver01&CredentialName=nhncloud-credential01" | json_pp
curl -sX GET "http://localhost:1024/spider/regionzone?ConnectionName=nhncloud-korea-pangyo-config" | json_pp
curl -sX GET "http://localhost:1024/spider/regionzone/JP1?ConnectionName=nhncloud-korea-pangyo-config" | json_pp
curl -sX GET "http://localhost:1024/spider/orgregion?ConnectionName=nhncloud-korea-pangyo-config" | json_pp
curl -sX GET "http://localhost:1024/spider/orgzone?ConnectionName=nhncloud-korea-pangyo-config" | json_pp
[KT]
curl -sX GET "http://localhost:1024/spider/preconfig/regionzone?DriverName=ktcloud-driver01&CredentialName=ktcloud-credential01" | json_pp
curl -sX GET "http://localhost:1024/spider/preconfig/regionzone/KOR-Seoul?DriverName=ktcloud-driver01&CredentialName=ktcloud-credential01" | json_pp
curl -sX GET "http://localhost:1024/spider/preconfig/orgregion?DriverName=ktcloud-driver01&CredentialName=ktcloud-credential01" | json_pp
curl -sX GET "http://localhost:1024/spider/regionzone?ConnectionName=ktcloud-korea-seoul1-config" | json_pp
curl -sX GET "http://localhost:1024/spider/regionzone/KOR-Seoul?ConnectionName=ktcloud-korea-seoul1-config" | json_pp
curl -sX GET "http://localhost:1024/spider/orgregion?ConnectionName=ktcloud-korea-seoul1-config" | json_pp
curl -sX GET "http://localhost:1024/spider/orgzone?ConnectionName=ktcloud-korea-seoul1-config" | json_pp
[KTVPC]
- 시험 제외: KTVPC Driver Repos의 Spider Repos 통합 진행중
-
Install & Start Guide
-
Features & Usage
-
- AdminWeb Tool Guide
- CLI Tool Guide
- REST API Guide
-
Design
-
Developer Guide
-
Cloud Driver Developer Guide
- Cloud Driver Developer Guide-WIP
- VM SSH Key Development Guide-WIP
- VM User Development Guide
- What is the CSP SDK API Version of drivers
- Region Zone Info and Driver API
- Price Info and Driver API
- (StartVM TerminateVM) API Call Counts and Waiting
- StartVM and TerminateVM Main Flow of drivers
- VM Root Disk Configuration Guide
- Security Group Rules and Driver API
- Network Load Balancer and Driver API
- VM Snapshot, MyImage and Disk Overview
- Kubernetes and Driver API(PMKS, K8S)
- Tag and Cloud Driver API
- AnyCall API Extension Guide
-
Test Reports
- v0.2.8-for-espresso-release
- v0.3.0-espresso-release
- Azure:Terminating VM
- cb-user@VM: ssh login, sudo run
- v0.3.14 test for SG Source
- v0.4.0-cafemocha-release
- Test via REST API Gateway
- Test Reports of v0.4.11 (IID2 initial Version)
- Test Reports of v0.4.12 (Register & Unregister existing Resources)
- Test Reports for v0.6.0 Release
- How to ...
- How to provision GPU VMs
- How to Resolve the 'Failed to Connect to Database' Error
- How to test CB Spider with Mock Driver
- How to install CB Spider on WSL2 under 공유기/사설망
- How to install CB Spider on macOS
- How to run CB Spider Container on macOS
- How to install OpenStack on a VM for CB Spider Testing
- How to get Azure available Regions
- How to profile memory usage in Golang
- Deprecated:How to install protoc and plugins
- [For Cloud-Migrator]