Relationship between CB-TB Object ID, Name, and CSP resource ID, Name #1829
seokho-son
started this conversation in
Show and tell
Replies: 1 comment
-
네트워크 리소스 예시 (CB-TB의 vNet 오브젝트와 AWS의 VPC) |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
CB-TB는 관리를 위해 오브젝트를 생성하며, 이때 사용자가 요청하는 명칭(name)을 기반으로 오브젝트의 ID를 생성함.
이 ID는 CB-TB의 오브젝트를 관리(CRUD) 하기 위한 주요 identifier 임.
실제 CSP가 생성하는 리소스에는 CSP가 자체적으로 부여하는 ID와 Name이 있기 때문에,
정보 관리를 위해서, 해당 정보도 CB-TB 오브젝트 내에서 포함하여 제공함.
ID와 관련된 정보들은 아래와 같이 구조화 되어 있음.
Id is unique identifier for the object
Id string
json:"id" example:"aws-ap-southeast-1"
Uid is universally unique identifier for the object, used for labelSelector
Uid string
json:"uid,omitempty" example:"wef12awefadf1221edcf"
CspResourceName is name assigned to the CSP resource. This name is internally used to handle the resource.
CspResourceName string
json:"cspResourceName,omitempty" example:"we12fawefadf1221edcf"
CspResourceId is resource identifier managed by CSP
CspResourceId string
json:"cspResourceId,omitempty" example:"csp-06eb41e14121c550a"
(예시)
https://pkg.go.dev/github.com/cloud-barista/[email protected]/src/core/model#TbVmInfo
여기서
예를 들어, MCI(MC-Infra) 오브젝트 조회 API를 통해서, 내부 VM 정보를 확인해보면, CB-TB VM 오브젝트의 cspResourceName를 찾을 수 있으며,
이 cspResourceName가 AWS 콘솔에서는 아래와 같이 instance의 name과 동일하게 매핑되어 있음

cspResourceName를 지정하는데도 활용함. (참고: 두 개의 값을 일반적으로 동일하게 처리하는 이유는, 내부 ID 정보 체계 복잡성을 완화하기 위한 노력임)
Assets으로써의 spec, image 의 경우, 혼동을 줄이기 위해서 CspResourceId 는 포함하지 않음
Beta Was this translation helpful? Give feedback.
All reactions