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

Move MCIS refine feature's REST API: from GET /mcis to GET /control/mcis #760

Merged
merged 1 commit into from
Sep 23, 2021
Merged

Conversation

PARKINHYO
Copy link
Member

@PARKINHYO PARKINHYO commented Sep 23, 2021

fix #755

  • src/api/rest/server/mcis/control.go에서 RestGetMcis(c echo.Context) error 함수의 action == "refine" 조건 삭제 및 RestGetControlMcis(c echo.Context) error 함수에 action == "refine" 조건 추가
  • 위 두 함수의 annotations 수정
  • Swagger doc 업데이트
  • src/testclient/scripts/8.mcis/refine-mcis.sh 스크립트 REST API path 수정

@PARKINHYO
Copy link
Member Author

/assign @PARKINHYO

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
@PARKINHYO 기여 감사합니다!
아래 comment는 just 의견 입니다. 😊

@@ -342,7 +342,7 @@ func RestGetControlMcis(c echo.Context) error {

action := c.QueryParam("action")

if action == "suspend" || action == "resume" || action == "reboot" || action == "terminate" {
if action == "suspend" || action == "resume" || action == "reboot" || action == "terminate" || action == "refine" {
Copy link
Member

Choose a reason for hiding this comment

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

지금 드는 생각은..
개인적으로는
이 경우처럼 case 가 많은 경우에는
switch-case + fallthrough 로 짜는 것이 더 좋은 것 같기는 합니다.. 😊

Copy link
Member Author

Choose a reason for hiding this comment

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

맞습니다 ㅎㅎ 코드 수정할 때는 생각 못했었는데 지금 다시 보니깐 switch문으로 바꾸는게 좀 더 코드가 이쁠 것 같네요😊
시간될 때 한번 고쳐보겠습니다.

@jihoon-seo jihoon-seo added the lgtm This PR is acceptable by at least one reviewer label Sep 23, 2021
@jihoon-seo jihoon-seo assigned seokho-son and jihoon-seo and unassigned PARKINHYO Sep 23, 2021
@seokho-son
Copy link
Member

@PARKINHYO 깔끔하게 잘 처리해주셨네요!! 기여 감사합니다~~ ^^

@seokho-son
Copy link
Member

/approve

@seokho-son seokho-son merged commit 074dc2e into cloud-barista:main Sep 23, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
lgtm This PR is acceptable by at least one reviewer
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Move MCIS refine feature's REST API: from GET /mcis to GET /control/mcis
3 participants