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

Update 'registerExistingSG' function #1015

Conversation

jihoon-seo
Copy link
Member

  • Add 'registerExistingSG' feature #990 (review) 에서 제안된 대로,
    별도로 추가했던 RegisterSecurityGroup 함수를
    CreateSecurityGroup 에 통합했습니다.
  • 다만, Add 'registerExistingSG' feature #990 (comment) 의 내용대로
    'firewallRules 필드에 임의의 기본값을 넣고 struct validate' 하려고 했으나
    *u.FirewallRules = append(*u.FirewallRules, mockFirewallRule) 부분에서 Internal Server Error 가 발생하여
    • TB 코드 중에 *returnResult = append(*returnResult, sshResultTmp) 와 같은 코드가 있는데..
      왜 여기서는 안되는걸까요.. ㅠㅠ
  • 다음과 같이 하였습니다.
    • TbSecurityGroupReq struct의 FirewallRules 필드의 required 태그 해제
    • 대신, option != "register" 이면 FirewallRules 필드에 대해 따로 required validate 수행

@jihoon-seo jihoon-seo requested a review from seokho-son January 14, 2022 06:27
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 0a1831d into cloud-barista:main Jan 17, 2022
@jihoon-seo jihoon-seo deleted the 220114_Update_registerExistingSG_feature branch January 17, 2022 02:52
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