cloud-barista / cb-spider

CB-Spider offers a unified view and interface for multi-cloud management.
https://github.com/cloud-barista/cb-spider/wiki
Apache License 2.0
32 stars 48 forks source link

[+Region/Zone] Server-Driver Integration Test #930

Closed powerkimhub closed 10 months ago

innodreamer commented 1 year ago

@powerkimhub NCP Classic의 RegionZoneHandler의 모든 기능에 대해, CB-Spider API 기준으로 테스트한 결과입니다. 혹시 보완해야할 사항이 있으면 댓글로 남겨주세요.

#### ncp-region-zone test process - start ###

## Region/Zone: List
{
   "regionzone" : [
      {
         "KeyValueList" : [
            {
               "Value" : "1",
               "Key" : "RegionNo"
            },
            {
               "Value" : "KR",
               "Key" : "RegionCode"
            }
         ],
         "DisplayName" : "Korea",
         "Name" : "KR",
         "ZoneList" : [
            {
               "Status" : "NotSupported",
               "DisplayName" : "평촌 zone",
               "KeyValueList" : [
                  {
                     "Value" : "3",
                     "Key" : "ZoneNo"
                  },
                  {
                     "Value" : "KR-2",
                     "Key" : "ZoneCode"
                  }
               ],
               "Name" : "KR-2"
            },
            {
               "Name" : "KR-1",
               "DisplayName" : "가산 zone",
               "KeyValueList" : [
                  {
                     "Value" : "2",
                     "Key" : "ZoneNo"
                  },
                  {
                     "Key" : "ZoneCode",
                     "Value" : "KR-1"
                  }
               ],
               "Status" : "NotSupported"
            }
         ]
      },
      {
         "ZoneList" : [
            {
               "Name" : "HK-1",
               "KeyValueList" : [
                  {
                     "Key" : "ZoneNo",
                     "Value" : "20"
                  },
                  {
                     "Key" : "ZoneCode",
                     "Value" : "HK-1"
                  }
               ],
               "DisplayName" : "홍콩 ZONE",
               "Status" : "NotSupported"
            }
         ],
         "DisplayName" : "HongKong",
         "KeyValueList" : [
            {
               "Key" : "RegionNo",
               "Value" : "3"
            },
            {
               "Key" : "RegionCode",
               "Value" : "HK"
            }
         ],
         "Name" : "HK"
      },
      {
         "DisplayName" : "Singapore(New)",
         "KeyValueList" : [
            {
               "Value" : "7",
               "Key" : "RegionNo"
            },
            {
               "Value" : "SGN",
               "Key" : "RegionCode"
            }
         ],
         "Name" : "SGN",
         "ZoneList" : [
            {
               "DisplayName" : "싱가포르(New) ZONE-1",
               "KeyValueList" : [
                  {
                     "Value" : "70",
                     "Key" : "ZoneNo"
                  },
                  {
                     "Key" : "ZoneCode",
                     "Value" : "SGN-1"
                  }
               ],
               "Name" : "SGN-1",
               "Status" : "NotSupported"
            }
         ]
      },
      {
         "KeyValueList" : [
            {
               "Key" : "RegionNo",
               "Value" : "8"
            },
            {
               "Value" : "JPN",
               "Key" : "RegionCode"
            }
         ],
         "DisplayName" : "Japan(New)",
         "Name" : "JPN",
         "ZoneList" : [
            {
               "Name" : "JPN-1",
               "KeyValueList" : [
                  {
                     "Value" : "80",
                     "Key" : "ZoneNo"
                  },
                  {
                     "Key" : "ZoneCode",
                     "Value" : "JPN-1"
                  }
               ],
               "DisplayName" : "일본(New) ZONE",
               "Status" : "NotSupported"
            }
         ]
      },
      {
         "ZoneList" : [
            {
               "KeyValueList" : [
                  {
                     "Key" : "ZoneNo",
                     "Value" : "90"
                  },
                  {
                     "Key" : "ZoneCode",
                     "Value" : "USWN-1"
                  }
               ],
               "DisplayName" : "미국 서부(New) ZONE",
               "Name" : "USWN-1",
               "Status" : "NotSupported"
            }
         ],
         "KeyValueList" : [
            {
               "Key" : "RegionNo",
               "Value" : "9"
            },
            {
               "Value" : "USWN",
               "Key" : "RegionCode"
            }
         ],
         "DisplayName" : "US-West(New)",
         "Name" : "USWN"
      },
      {
         "ZoneList" : [
            {
               "DisplayName" : "독일(New) ZONE",
               "KeyValueList" : [
                  {
                     "Value" : "100",
                     "Key" : "ZoneNo"
                  },
                  {
                     "Key" : "ZoneCode",
                     "Value" : "DEN-1"
                  }
               ],
               "Name" : "DEN-1",
               "Status" : "NotSupported"
            }
         ],
         "Name" : "DEN",
         "DisplayName" : "Germany(New)",
         "KeyValueList" : [
            {
               "Key" : "RegionNo",
               "Value" : "10"
            },
            {
               "Value" : "DEN",
               "Key" : "RegionCode"
            }
         ]
      }
   ]
}

## Region: Get
{"Name":"KR","DisplayName":"Korea","ZoneList":[{"Name":"KR-2","DisplayName":"평촌 zone","Status":"NotSupported","KeyValueList":[{"Key":"ZoneNo","Value":"3"},{"Key":"ZoneCode","Value":"KR-2"}]},{"Name":"KR-1","DisplayName":"가산 zone","Status":"NotSupported","KeyValueList":[{"Key":"ZoneNo","Value":"2"},{"Key":"ZoneCode","Value":"KR-1"}]}],"KeyValueList":[{"Key":"RegionNo","Value":"1"},{"Key":"RegionCode","Value":"KR"}]}

## ORG Region: List
{
   "regionList" : [
      {
         "regionName" : "Korea",
         "regionCode" : "KR",
         "regionNo" : "1"
      },
      {
         "regionNo" : "3",
         "regionCode" : "HK",
         "regionName" : "HongKong"
      },
      {
         "regionName" : "Singapore(New)",
         "regionCode" : "SGN",
         "regionNo" : "7"
      },
      {
         "regionCode" : "JPN",
         "regionNo" : "8",
         "regionName" : "Japan(New)"
      },
      {
         "regionName" : "US-West(New)",
         "regionNo" : "9",
         "regionCode" : "USWN"
      },
      {
         "regionNo" : "10",
         "regionCode" : "DEN",
         "regionName" : "Germany(New)"
      }
   ],
   "returnMessage" : "success",
   "totalRows" : 6,
   "returnCode" : "0",
   "requestId" : "7826cee0-7308-4331-a34d-a5a97eb343f7"
}

## ORG Zone: List
{
   "zoneList" : [
      {
         "zoneDescription" : "평촌 zone",
         "regionNo" : "1",
         "zoneCode" : "KR-2",
         "zoneName" : "KR-2",
         "zoneNo" : "3"
      },
      {
         "regionNo" : "1",
         "zoneName" : "KR-1",
         "zoneCode" : "KR-1",
         "zoneDescription" : "가산 zone",
         "zoneNo" : "2"
      }
   ],
   "requestId" : "37a4223a-175a-40c4-91b5-06072ff98fd6",
   "returnCode" : "0",
   "returnMessage" : "success"
}
powerkimhub commented 1 year ago

@MZC-CSC, @dev4unet, @raccoon-pi, @inno-cloudbarista, @innodreamer

현재 서버 통합 후, CB-Spider REST API를 통한 1차 통합 시험 결과가 다음과 같습니다.

[시험 개요]

[시험 결과 요약] 2023.10.24. 현재 Cloud Provider Status
Mock, AWS, GCP, Azure, Alibaba, Tencent, IBM-VPC, NCP, NCP-VPC, NHN, KT, KT-VPC Pass
OpenStack 통합 시험 보류(접근 인증 이슈)

============= 이하 시험 스크립트 및 오류 메시지 참고 =============

[Mock]

 curl -sX GET http://localhost:1024/spider/regionzone -H 'Content-Type: application/json' -d '{"ConnectionName": "mock-config01"}' | json_pp
 curl -sX GET http://localhost:1024/spider/regionzone/neptune -H 'Content-Type: application/json' -d '{"ConnectionName": "mock-config01"}' | json_pp

 curl -sX GET http://localhost:1024/spider/orgregion -H 'Content-Type: application/json' -d '{"ConnectionName": "mock-config01"}' | json_pp 
 curl -sX GET http://localhost:1024/spider/orgzone -H 'Content-Type: application/json' -d '{"ConnectionName": "mock-config01"}' | json_pp 

[AWS]

 curl -sX GET http://localhost:1024/spider/regionzone -H 'Content-Type: application/json' -d '{"ConnectionName": "aws-config01"}' | json_pp
 curl -sX GET http://localhost:1024/spider/regionzone/us-east-2 -H 'Content-Type: application/json' -d '{"ConnectionName": "aws-config01"}' | json_pp

 curl -sX GET http://localhost:1024/spider/orgregion -H 'Content-Type: application/json' -d '{"ConnectionName": "aws-config01"}' | json_pp 
 curl -sX GET http://localhost:1024/spider/orgzone -H 'Content-Type: application/json' -d '{"ConnectionName": "aws-config01"}' | json_pp 

[GCP]

 curl -sX GET http://localhost:1024/spider/regionzone -H 'Content-Type: application/json' -d '{"ConnectionName": "gcp-iowa-config"}' | json_pp
 curl -sX GET http://localhost:1024/spider/regionzone/asia-east1 -H 'Content-Type: application/json' -d '{"ConnectionName": "gcp-iowa-config"}' | json_pp

 curl -sX GET http://localhost:1024/spider/orgregion -H 'Content-Type: application/json' -d '{"ConnectionName": "gcp-iowa-config"}' | json_pp 
 curl -sX GET http://localhost:1024/spider/orgzone -H 'Content-Type: application/json' -d '{"ConnectionName": "gcp-iowa-config"}' | json_pp 

[Azure]

 curl -sX GET http://localhost:1024/spider/regionzone -H 'Content-Type: application/json' -d '{"ConnectionName": "azure-northeu-config"}' | json_pp
 curl -sX GET http://localhost:1024/spider/regionzone/eastus -H 'Content-Type: application/json' -d '{"ConnectionName": "azure-northeu-config"}'

 curl -sX GET http://localhost:1024/spider/orgregion -H 'Content-Type: application/json' -d '{"ConnectionName": "azure-northeu-config"}' | json_pp 
 curl -sX GET http://localhost:1024/spider/orgzone -H 'Content-Type: application/json' -d '{"ConnectionName": "azure-northeu-config"}' | json_pp 

[Alibaba]

 curl -sX GET http://localhost:1024/spider/regionzone -H 'Content-Type: application/json' -d '{"ConnectionName": "alibaba-beijing-config"}' | json_pp
 curl -sX GET http://localhost:1024/spider/regionzone/cn-wulanchabu -H 'Content-Type: application/json' -d '{"ConnectionName": "alibaba-beijing-config"}' | json_pp

 curl -sX GET http://localhost:1024/spider/orgregion -H 'Content-Type: application/json' -d '{"ConnectionName": "alibaba-beijing-config"}' | json_pp 
 curl -sX GET http://localhost:1024/spider/orgzone -H 'Content-Type: application/json' -d '{"ConnectionName": "alibaba-beijing-config"}' | json_pp 

[Tencent]

 curl -sX GET http://localhost:1024/spider/regionzone -H 'Content-Type: application/json' -d '{"ConnectionName": "tencent-guangzhou3-config"}' | json_pp
 curl -sX GET http://localhost:1024/spider/regionzone/ap-guangzhou -H 'Content-Type: application/json' -d '{"ConnectionName": "tencent-guangzhou3-config"}'

 curl -sX GET http://localhost:1024/spider/orgregion -H 'Content-Type: application/json' -d '{"ConnectionName": "tencent-guangzhou3-config"}' | json_pp 
 curl -sX GET http://localhost:1024/spider/orgzone -H 'Content-Type: application/json' -d '{"ConnectionName": "tencent-guangzhou3-config"}' | json_pp 

[OpenStack]

[NCP Classic]

[NCP-VPC]

[NHN]

[KT Classic]

[KT-VPC]

dev4unet commented 1 year ago

@powerkimhub 로그를 보면 요청 정보에 &RegionId=cn-wulanchabu-test-3&Signature=oaq 부분이 보이네요. 리전 이름 뒤에 -test-3이 왜 붙었는지 모르겠지만 로그 상에서는 cn-wulanchabu-test-3이라는 없는 리전으로 요청이 전달되어서 내부에서는 "no such host" 응답이 내려 간 것 같은데 타임아웃이 드라이버에서 나오는지 json_pp에서 나오는지 소스를 봐야 할 수 있겠지만 아래처럼 잘 못된 dns로 요청이 전달되기 때문인 것 같습니다. Post "http://ecs.cn-wulanchabu-test-3.aliyuncs.com/?AcceptLanguage=en-US&AccessK

powerkimhub commented 1 year ago

@dev4unet

innodreamer commented 1 year ago

@powerkimhub NCP VPC driver RegionZoneHandler 개발을 완료했으며, CB-Spider API 기준으로 테스트한 결과를 공유해드립니다.

[ 'ncpvpc-korea1-config' 기준 테스트 결과 ]

#### Region-Zone Test process - start ###

## Region/Zone : List
{
   "regionzone" : [
      {
         "DisplayName" : "Korea",
         "ZoneList" : [
            {
               "Status" : "NotSupported",
               "DisplayName" : "평촌 zone",
               "Name" : "KR-2",
               "KeyValueList" : [
                  {
                     "Value" : "KR-2",
                     "Key" : "ZoneCode"
                  }
               ]
            },
            {
               "Name" : "KR-1",
               "KeyValueList" : [
                  {
                     "Key" : "ZoneCode",
                     "Value" : "KR-1"
                  }
               ],
               "Status" : "NotSupported",
               "DisplayName" : "가산 zone"
            }
         ],
         "Name" : "KR",
         "KeyValueList" : [
            {
               "Key" : "RegionCode",
               "Value" : "KR"
            }
         ]
      },
      {
         "Name" : "SGN",
         "KeyValueList" : [
            {
               "Key" : "RegionCode",
               "Value" : "SGN"
            }
         ],
         "ZoneList" : [
            {
               "KeyValueList" : [
                  {
                     "Value" : "SGN-4",
                     "Key" : "ZoneCode"
                  }
               ],
               "Name" : "SGN-4",
               "DisplayName" : "Singapore (New) ZONE-4",
               "Status" : "NotSupported"
            },
            {
               "KeyValueList" : [
                  {
                     "Value" : "SGN-5",
                     "Key" : "ZoneCode"
                  }
               ],
               "Name" : "SGN-5",
               "DisplayName" : "Singapore (New) ZONE-5",
               "Status" : "NotSupported"
            }
         ],
         "DisplayName" : "Singapore(New)"
      },
      {
         "DisplayName" : "Japan(New)",
         "ZoneList" : [
            {
               "Name" : "JPN-4",
               "KeyValueList" : [
                  {
                     "Key" : "ZoneCode",
                     "Value" : "JPN-4"
                  }
               ],
               "Status" : "NotSupported",
               "DisplayName" : "Japna (New) ZONE-4"
            },
            {
               "Name" : "JPN-5",
               "KeyValueList" : [
                  {
                     "Key" : "ZoneCode",
                     "Value" : "JPN-5"
                  }
               ],
               "Status" : "NotSupported",
               "DisplayName" : "Japna (New) ZONE-5"
            }
         ],
         "Name" : "JPN",
         "KeyValueList" : [
            {
               "Key" : "RegionCode",
               "Value" : "JPN"
            }
         ]
      }
   ]
}

## Region/Zone : Get
{"Name":"KR","DisplayName":"Korea","ZoneList":[{"Name":"KR-2","DisplayName":"평촌 zone","Status":"NotSupported","KeyValueList":[{"Key":"ZoneCode","Value":"KR-2"}]},{"Name":"KR-1","DisplayName":"가산 zone","Status":"NotSupported","KeyValueList":[{"Key":"ZoneCode","Value":"KR-1"}]}],"KeyValueList":[{"Key":"RegionCode","Value":"KR"}]}

## ORG Region : List
[
   {
      "regionCode" : "KR",
      "regionName" : "Korea"
   },
   {
      "regionCode" : "SGN",
      "regionName" : "Singapore(New)"
   },
   {
      "regionName" : "Japan(New)",
      "regionCode" : "JPN"
   }
]

## ORG Zone : List
[
   {
      "zoneName" : "KR-2",
      "regionCode" : "KR",
      "zoneCode" : "KR-2",
      "zoneDescription" : "평촌 zone"
   },
   {
      "zoneName" : "KR-1",
      "zoneDescription" : "가산 zone",
      "zoneCode" : "KR-1",
      "regionCode" : "KR"
   }
]
powerkimhub commented 1 year ago

@MZC-CSC @dev4unet @raccoon-pi @inno-cloudbarista @ish-hcc @ @innodreamer

[Region/Zone 정보 검증 요청 드립니다]

[AdminWeb 중심 검증 가이드]

[성능 개선 요청]

※ 간단 문의 등은 Slack, mail 등 활용하시면 되겠습니다. ※ 결과나 특이 사항 발생시 현재 이슈에 답글 부탁 드립니다.

-------------------------------- AdminWeb 활용한 점검 절차

(Mock 드라이버 중심으로 설명)

1. Driver 등록: Mock 선택 => '+' 클릭


image

image

2. Credential 등록, Region 등록

3. Connection 등록

4. Connection 선택

5. Region/Zone 정보 확인

image

6. 예시: Tencent Region/Zone 현황

image

※ 수고하셨습니다~

powerkimhub commented 1 year ago

@MZC-CSC @dev4unet @raccoon-pi @inno-cloudbarista @ish-hcc @ @innodreamer

[Region/Zone 드라이버 관련 문의 드립니다.]





innodreamer commented 1 year ago

@powerkimhub NCP Classic의 경우는 드라이버 내에서 Region/Zone과 관련된 value들(Image나 VMSpec 등)을 조회할때 parameter로서 Region과 Zone의 code가 아닌 number(숫자 형태)가 필요한데 사용자가 테스트나 디버깅시 그 number 정보가 제공되면 도움이 될거 같아 RegionZoneHandler에 Key/Value 값으로 포함시켜 제공하고 있습니다.

(참고) https://github.com/cloud-barista/cb-spider/issues/930#issuecomment-1727646662

중요한 사항은 아니지만 편의성 측면에 도움에 될거 같아 포함시켜놓았으니 유지하면 좋을거 같고, 만약 전체적으로 Key/Value값을 제거하기로 결정된다면 제거해도 큰 문제는 없습니다.

powerkimhub commented 1 year ago

@innodreamer

innodreamer commented 1 year ago

@powerkimhub 네. ListOrgRegion() 및 ListOrgZone()에서도 Region No. / Zone No.를 제공합니다. 필요하면 거기서 확인해도 될거 같네요.

powerkimhub commented 1 year ago

@MZC-CSC @dev4unet @raccoon-pi @inno-cloudbarista @ish-hcc @ @innodreamer

[Region/Zone 드라이버 성능 개선]



[Region/Zone Driver 개선 반영 현황] - 2023.10.15.

Cloud Provider Loop => Go Routine Omit KeValueList
OpenStack O O
IBM-VPC O O
Azure O O
Alibaba O O
AWS O O
GCP O O
Tencent O O
NHN O O
NCP Classic O O
NCP-VPC O O
KT Classic N/A O
KT-VPC N/A O
powerkimhub commented 1 year ago

@MZC-CSC @dev4unet @raccoon-pi

Alibaba, AWS, GCP, Tencent관련하여, 2023.10.04. 오전 PR 버전이 다음과 같은 현상을 보이고 있습니다. 확인 부탁드립니다.

[증상]

innodreamer commented 1 year ago

@powerkimhub NHN Cloud RegionZoneHandler 개발을 완료했으며, CB-Spider API 기준으로 테스트한 결과를 공유해드립니다.

참고로, 몇주전 분석한 내용과 같이 NHN Cloud는 Spider의 connection config에서 제공하는 Region 값에 따라 endpoint가 변경되어 동작하고, NHN Cloud API로는 Zone list만을 제공합니다. (그 결과 값에는 Region 정보 없이 Zone list만 제공함.) 따라서, RegionZoneHandler에서 정상적인 정보를 제공하기 위해서 Region 관련 정보는 driver 내에서 가공해서 제공하는 방향으로 개발했습니다.

[ 'nhncloud-korea-pangyo1-config' 기준 통합 테스크 결과 ]

#### Region-Zone Test Process - Start ###

### Region/Zone : List
{
   "regionzone" : [
      {
         "ZoneList" : [
            {
               "KeyValueList" : [
                  {
                     "Value" : "kr-pub-b",
                     "Key" : "ZoneCode"
                  }
               ],
               "Name" : "kr-pub-b",
               "DisplayName" : "N/A",
               "Status" : "Available"
            },
            {
               "Status" : "Available",
               "DisplayName" : "N/A",
               "Name" : "kr-pub-a",
               "KeyValueList" : [
                  {
                     "Key" : "ZoneCode",
                     "Value" : "kr-pub-a"
                  }
               ]
            }
         ],
         "DisplayName" : "한국(판교)",
         "KeyValueList" : [
            {
               "Key" : "RegionCode",
               "Value" : "KR1"
            }
         ],
         "Name" : "KR1"
      },
      {
         "ZoneList" : [
            {
               "Name" : "kr2-pub-b",
               "KeyValueList" : [
                  {
                     "Key" : "ZoneCode",
                     "Value" : "kr2-pub-b"
                  }
               ],
               "Status" : "Available",
               "DisplayName" : "N/A"
            },
            {
               "Status" : "Available",
               "DisplayName" : "N/A",
               "Name" : "kr2-pub-a",
               "KeyValueList" : [
                  {
                     "Key" : "ZoneCode",
                     "Value" : "kr2-pub-a"
                  }
               ]
            }
         ],
         "DisplayName" : "한국(평촌)",
         "KeyValueList" : [
            {
               "Key" : "RegionCode",
               "Value" : "KR2"
            }
         ],
         "Name" : "KR2"
      },
      {
         "DisplayName" : "일본",
         "ZoneList" : [
            {
               "DisplayName" : "N/A",
               "Status" : "Available",
               "KeyValueList" : [
                  {
                     "Value" : "jp-pub-a",
                     "Key" : "ZoneCode"
                  }
               ],
               "Name" : "jp-pub-a"
            },
            {
               "KeyValueList" : [
                  {
                     "Value" : "jp-pub-b",
                     "Key" : "ZoneCode"
                  }
               ],
               "Name" : "jp-pub-b",
               "DisplayName" : "N/A",
               "Status" : "Available"
            }
         ],
         "KeyValueList" : [
            {
               "Key" : "RegionCode",
               "Value" : "JP1"
            }
         ],
         "Name" : "JP1"
      }
   ]
}

### Region/Zone : Get
{"Name":"KR1","DisplayName":"한국(판교)","ZoneList":[{"Name":"kr-pub-b","DisplayName":"N/A","Status":"Available","KeyValueList":[{"Key":"ZoneCode","Value":"kr-pub-b"}]},{"Name":"kr-pub-a","DisplayName":"N/A","Status":"Available","KeyValueList":[{"Key":"ZoneCode","Value":"kr-pub-a"}]}],"KeyValueList":[{"Key":"RegionCode","Value":"KR1"}]}

### ORG Region : List
{
   "RegionList" : [
      {
         "RegionCode" : "KR1",
         "RegionName" : "한국(판교)"
      },
      {
         "RegionCode" : "KR2",
         "RegionName" : "한국(평촌)"
      },
      {
         "RegionName" : "일본",
         "RegionCode" : "JP1"
      }
   ]
}

### ORG Zone : List
{
   "ZoneList" : [
      {
         "zoneState" : {
            "available" : true
         },
         "zoneName" : "kr-pub-b"
      },
      {
         "zoneName" : "kr-pub-a",
         "zoneState" : {
            "available" : true
         }
      }
   ]
}
#### Region-Zone Test Process- Finished ###

image

innodreamer commented 1 year ago

@powerkimhub 국내 CSP 관련 Key/Value List 제거는 추가로 진행할 예정입니다.

innodreamer commented 1 year ago

@powerkimhub NCP Classic, NCP VPC, NHN Cloud driver에서 Go Routine 적용과 Key/Value List 제거 작업을 완료했습니다.

powerkimhub commented 1 year ago

@innodreamer

innodreamer commented 1 year ago

@powerkimhub KT Cloud VPC(D1 플랫폼) RegionZoneHandler 개발을 완료했으며, CB-Spider API 기준으로 테스트한 결과를 공유해드립니다.

특이사항으로, 몇주전 분석한 내용과 같이 KT Cloud VPC는 Region, Zone 정보를 제공하는 REST API를 제공하지 않고, 단일 Zone (Public cloud의 경우 DX-M1) 기준으로 서비스되고 있습니다. 따라서, CB-Spider 공통 인터페이스에 맞게 RegionZoneHandler에서 정상적인 정보를 제공하기 위해서 Region, Zone 관련 정보를 driver 내에서 가공해서 제공하는 방향으로 개발했습니다. (Constant variable로서 struct로 Region, Zone 정보를 정의해서 활용)

[ 'ktcloudvpc-mokdong1-config' 기준 통합 테스크 결과 ]

#### Region-Zone Test Process - Start ###

### Region/Zone : List
{
   "regionzone" : [
      {
         "KeyValueList" : null,
         "Name" : "KR1",
         "ZoneList" : [
            {
               "Status" : "NotSupported",
               "Name" : "DX-M1",
               "KeyValueList" : null,
               "DisplayName" : "목동-1"
            }
         ],
         "DisplayName" : "서울"
      }
   ]
}
# start: 1697035774.782712781
# finish: 1697035776.979071803
# diff(sec): 2.196359022

### Region/Zone : Get
{"Name":"KR1","DisplayName":"서울","ZoneList":[{"Name":"DX-M1","DisplayName":"목동-1","Status":"NotSupported","KeyValueList":null}],"KeyValueList":null}

### ORG Region : List
{
   "RegionList" : [
      {
         "RegionName" : "서울",
         "RegionCode" : "KR1"
      }
   ]
}

### ORG Zone : List
{
   "ZoneList" : [
      {
         "ZoneCode" : "DX-M1",
         "ZoneName" : "목동-1"
      }
   ]
}
#### Region-Zone Test Process- Finished ###

image

innodreamer commented 12 months ago

@powerkimhub KT Cloud Classic(G1/G1 Platform) RegionZoneHandler 개발을 완료했으며, CB-Spider API 기준으로 테스트한 결과를 공유해드립니다.

특이사항으로, KT Cloud Classic은 API로 Zone list만 제공하고, Region 정보가 없이 동작합니다. 따라서, CB-Spider 공통 인터페이스에 맞게 RegionZoneHandler에서 정상적인 정보를 제공하기 위해서 Region 관련 정보는 driver 내에서 가공해서 제공하도록 개발했습니다. Region과 그 하위 Zone list의 매핑은 KT Cloud API에서 조회한 Zone list에서 제공하는 Zone 'name' string의 일부로 Region code를 정하여 그 둘간에 매핑되도록 하여 조회가 가능하도록 했습니다.

[ 'ktcloud-korea-cheonan1-config' 기준 통합 테스크 결과 ]

#### Region-Zone Test Process - Start ###

### Region/Zone : List
{
   "regionzone" : [
      {
         "KeyValueList" : null,
         "ZoneList" : [
            {
               "DisplayName" : "KOR-HA",
               "Name" : "dfd6f03d-dae5-458e-a2ea-cb6a55d0d994",
               "Status" : "Available",
               "KeyValueList" : null
            }
         ],
         "DisplayName" : "김해",
         "Name" : "KOR-HA"
      },
      {
         "Name" : "KOR-Central",
         "DisplayName" : "천안",
         "ZoneList" : [
            {
               "Name" : "eceb5d65-6571-4696-875f-5a17949f3317",
               "DisplayName" : "KOR-Central A",
               "Status" : "Available",
               "KeyValueList" : null
            },
            {
               "Status" : "Available",
               "KeyValueList" : null,
               "Name" : "9845bd17-d438-4bde-816d-1b12f37d5080",
               "DisplayName" : "KOR-Central B"
            }
         ],
         "KeyValueList" : null
      },
      {
         "KeyValueList" : null,
         "ZoneList" : [
            {
               "Name" : "95e2f517-d64a-4866-8585-5177c256f7c7",
               "DisplayName" : "KOR-Seoul M",
               "Status" : "Available",
               "KeyValueList" : null
            }
         ],
         "DisplayName" : "서울",
         "Name" : "KOR-Seoul"
      }
   ]
}
# start: 1697196415.943575746
# finish: 1697196416.362927262
# diff(sec): .419351516

### Region/Zone : Get
{"Name":"KOR-Central","DisplayName":"천안","ZoneList":[{"Name":"eceb5d65-6571-4696-875f-5a17949f3317","DisplayName":"KOR-Central A","Status":"Available","KeyValueList":null},{"Name":"9845bd17-d438-4bde-816d-1b12f37d5080","DisplayName":"KOR-Central B","Status":"Available","KeyValueList":null}],"KeyValueList":null}

### ORG Region : List
{
   "RegionList" : [
      {
         "RegionName" : "서울",
         "RegionCode" : "KOR-Seoul"
      },
      {
         "RegionName" : "천안",
         "RegionCode" : "KOR-Central"
      },
      {
         "RegionCode" : "KOR-HA",
         "RegionName" : "김해"
      }
   ]
}

### ORG Zone : List
{
   "ZoneList" : [
      {
         "id" : "eceb5d65-6571-4696-875f-5a17949f3317",
         "localstorageenabled" : false,
         "tags" : [],
         "networktype" : "Advanced",
         "securitygroupsenabled" : false,
         "dhcpprovider" : "VirtualRouter",
         "name" : "KOR-Central A",
         "allocationstate" : "Enabled"
      },
      {
         "networktype" : "Advanced",
         "localstorageenabled" : false,
         "tags" : [],
         "id" : "9845bd17-d438-4bde-816d-1b12f37d5080",
         "name" : "KOR-Central B",
         "allocationstate" : "Enabled",
         "dhcpprovider" : "VirtualRouter",
         "securitygroupsenabled" : false
      }
   ]
}
#### Region-Zone Test Process- Finished ###

image

powerkimhub commented 11 months ago
powerkimhub commented 10 months ago