Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[VMImage:GCP,Alibaba] Develop #1414

Merged
merged 4 commits into from
Jan 2, 2025
Merged

Conversation

MZC-CSC
Copy link
Contributor

@MZC-CSC MZC-CSC commented Dec 31, 2024

  • IMAGE
    [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",

@powerkimhub
Copy link
Member

powerkimhub commented Dec 31, 2024

@powerkimhub powerkimhub changed the title Develop Develop (#1405 - GCP) Dec 31, 2024
@powerkimhub powerkimhub changed the title Develop (#1405 - GCP) Develop (https://github.com/cloud-barista/cb-spider/issues/1405 - GCP) Dec 31, 2024
@powerkimhub powerkimhub changed the title Develop (https://github.com/cloud-barista/cb-spider/issues/1405 - GCP) Develop (#1405 - GCP) Dec 31, 2024
@powerkimhub powerkimhub self-requested a review December 31, 2024 01:36
@powerkimhub powerkimhub changed the title Develop (#1405 - GCP) [VMImage:GCP] Develop Dec 31, 2024
@powerkimhub
Copy link
Member

@powerkimhub powerkimhub changed the title [VMImage:GCP] Develop [VMImage:GCP,Alibaba] Develop Jan 2, 2025
@powerkimhub powerkimhub merged commit c52300b into cloud-barista:master Jan 2, 2025
3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants