Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
[ALIBABA]
IID,GuestOS,Status는 Set 하지 않음.
Name -> image.ImageFamily Set
OSArchitecture -> image.Architecture Set
OSPlatform -> image.Platform Set
OSDistribution -> image.Description Set
OSDiskType -> "NA" 제공하지 않음
OSDiskSizeInGB -> "-1" 제공하지 않음
ImageStatus -> image.Status Set
GetImageN(Name string) (ImageInfo, err) 임시 함수 개발.
[GCP]
IID,GuestOS,Status 는 Set 하지 않음.
OSArchitecture 매핑되는 경우가 있고 없는 경우가 있음.
gcp는 mac os 지원하지 않음(2024-12월 현재)
gcp result에 Architecture property가 있는 경우 → Architecture에서 추출
gcp result에 Architecture property가 없는 경우 → Description에서 추출
Description property가 없는 경우
ex) ubuntu-1204-precise-v20141031 → ‘Description’ 자체가 없음 ⇒ ‘NA’
Description에 있는 경우
"name": "ubuntu-1804-bionic-v20220505",
"description": "Canonical, Ubuntu, 18.04 LTS, amd64 bionic image built on 2022-05-05, supports Shielded VM features",
OSPlatform 에 매칭되는 정보 없음
유사하게 name에서 찾을 수 있음. window와 몇가지 linux에 대해서만 처리함.
OSDestribute 에 Description 이 적당하나 해당 property가 없는 경우가 있음.
있으면 Description 사용, 없으면 name사용
ImageStatus 는 Deprecated가 되어도 생성은 가능 but warning
gcp에서 반환하는 status 는 image 생성요청에 따른 결과로 보임. PENDING, FAILED, READY
gcp에서 deprecate가 있는 경우 해당 이미지는 DEPRECATED(생성가능: Available), OBSOLETE(에러:Unavailable), DELETED(에러:Unavailable), ACTIVE(상태로 존재는 하나, JSON에 Data는 없음. 즉 deprecated가 없는 경우가 ACTIVE로 보임)
deprecated가 아닌 경우 Distribution에 image 상태정보 추가 함.
ex) ACTIVE
Name: (string) (len=27) "ubuntu-2204-jammy-v20241218",
OSArchitecture: (resources.OSArchitecture) (len=6) "X86_64",
OSPlatform: (resources.OSPlatform) (len=10) "Linux/UNIX",
OSDistribution: (string) (len=67) "Canonical, Ubuntu, 22.04 LTS, amd64 jammy image built on 2024-12-18",
OSDiskType: (string) (len=2) "NA",
OSDiskSizeInGB: (string) (len=2) "10",
ImageStatus: (resources.ImageStatus) (len=9) "Available"
ex) DEPRECATED
Name: (string) (len=28) "ubuntu-1804-bionic-v20220505",
OSArchitecture: (resources.OSArchitecture) (len=6) "x86_64",
OSPlatform: (resources.OSPlatform) (len=10) "Linux/UNIX",
OSDistribution: (string) (len=246) "Canonical, Ubuntu, 18.04 LTS, amd64 bionic image built on 2022-05-05, supports Shielded VM features. ImageState : DEPRECATED, Replacement : https://www.googleapis.com/compute/v1/projects/ubuntu-os-cloud/global/images/ubuntu-1804-bionic-v20240116a",
OSDiskType: (string) (len=2) "NA",
OSDiskSizeInGB: (string) (len=2) "10",
ImageStatus: (resources.ImageStatus) (len=9) "Available",
ex) OBSOLETE
Name: (string) (len=29) "ubuntu-1204-precise-v20141031",
OSArchitecture: (resources.OSArchitecture) (len=2) "NA",
OSPlatform: (resources.OSPlatform) (len=10) "Linux/UNIX",
OSDistribution: (string) (len=52) "ubuntu-1204-precise-v20141031. ImageState : OBSOLETE",
OSDiskType: (string) (len=2) "NA",
OSDiskSizeInGB: (string) (len=2) "10",
ImageStatus: (resources.ImageStatus) (len=11) "Unavailable",