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

Enhance ListResource() #1105

Merged

Conversation

jihoon-seo
Copy link
Member

Closes #1099

@seokho-son #1104 에서 제안해 주신 대로
ListResource() 함수를
'호출에는 문제가 없었으나 결과가 0개인 경우'
nil interface를 return하는 것이 아니라
길이 0인 []Tb***Info slice를 return하는 것으로 변경하였습니다.

이에 따라, ListResource() 함수의 references 중에서
resourceList == nil 코드로 item 개수가 0인지 확인하는 부분이 있던 경우
'적절한 type으로 assertion 후 해당 slice의 len이 0인지 체크' 하도록 코드를 변경했습니다. 😊

다음 2가지 REST API (및 각각에 대응되는 core 함수) 에 대해 테스트 했습니다.

  • List vNet
  • Inspect resources

Copy link
Member

@seokho-son seokho-son left a comment

Choose a reason for hiding this comment

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

LGTM!

@seokho-son seokho-son merged commit 1d10c98 into cloud-barista:main May 11, 2022
@jihoon-seo jihoon-seo deleted the 220511_Enhance_ListResource_function branch September 29, 2022 08:45
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.

Problematic logic in ListResource
2 participants