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

Register all CSP resources to CB-TB objs #1076

Merged
merged 1 commit into from
Apr 29, 2022

Conversation

seokho-son
Copy link
Member

Foundation for #1055

POST ​/registerCspResources

Register CSP Native Resources (vNet, securityGroup, sshKey, vm) to CB-Tumblebug

Request body ex

{
"connectionName": "aws-ap-northeast-2",
"mcisName": "mcis-csp-native",
"nsId": "ns01"
}

해당 클라우드 리전에 포함된 리소스를
vNet -> SG -> SSHKey -> VM 순서로 CB-TB의 오브젝트로 등록시킴.

[보완 필요 부분]

@seokho-son seokho-son requested a review from jihoon-seo as a code owner April 28, 2022 20:22
Copy link
Member

@jihoon-seo jihoon-seo left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM!

@@ -129,6 +129,7 @@ func RunServer(port string) {
e.POST("/tumblebug/lookupImage", rest_mcir.RestLookupImage)

e.POST("/tumblebug/inspectResources", rest_common.RestInspectResources)
e.POST("/tumblebug/registerCspResources", rest_common.RestRegisterCspNativeResources)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

  • 기존의 다른 'CSP 자원을 TB의 특정 NS에 등록하는 API'들은 API path에 /ns/:nsId 를 포함하고 있습니다.
  • 이 API에서는 nsId 를 JSON body의 field 중 하나로 받고 있습니다.

스타일을 반드시 일치시켜야 한다는 것은 아닙니다. 😊

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

음 일치시키는 방법도 있겠네요^^
일단은 이대로 유지해볼까요? inspectResources 랑 path를 유사하게하면 좋을 것 같아서요.

@seokho-son seokho-son merged commit 6053feb into cloud-barista:main Apr 29, 2022
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.

2 participants