-
Notifications
You must be signed in to change notification settings - Fork 51
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
Add list MCIS simple option #731
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@seokho-son 리뷰를 해 보았습니다 😊
그리고 GET http://localhost:1323/tumblebug/ns/tb01/mcis?option=simple
을 테스트할 수 있는 테스트 스크립트가 있으면
다른 분들도 바로 테스트를 해 볼 수 있을 것 같은데.. 어떻게 생각하시나요 😊
src/api/rest/server/mcis/control.go
Outdated
} else if option == "simple" { | ||
// mcis in detail (with status information) | ||
detail := "simple" | ||
|
||
result, err := mcis.CoreGetAllMcis(nsId, detail) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
detail
변수를 새로 만들지 않고 다음과 같이 할 수도 있긴 한데.. minor 한 사항이기는 합니다.. 😊
} else if option == "simple" { | |
// mcis in detail (with status information) | |
detail := "simple" | |
result, err := mcis.CoreGetAllMcis(nsId, detail) | |
} else if option == "simple" { | |
// mcis in detail (with status information) | |
result, err := mcis.CoreGetAllMcis(nsId, option) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
좋네요.. ^^ 업데이트 하겠습니다.
//mapA := map[string]string{"message": "Cannot find " + key} | ||
//return c.JSON(http.StatusOK, &mapA) | ||
return nil, fmt.Errorf("in CoreGetAllMcis() vm loop; Cannot find " + vmKey) | ||
if option != "simple" { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
option != "simple"
이라 하면
option == "id"
option == "status"
option == (whatever)
인 경우겠네요.. ㅎㅎ
(개인적인 이해를 위해 기록을 남겨 봅니다 😊)
감사합니다~~ 필요에 따라선, 기존 스크립트에 옵션을 제공하도록 개선해 볼 수 있겠습니다. |
@jihoon-seo 리뷰 의견을 고려하여, PR을 업데이트하였습니다. (커밋 추가) |
@all-contributors please add @MZC-CSC for Ideas & Planning |
I've put up a pull request to add @MZC-CSC! 🎉 |
Feature request from cb-webtool. @MZC-CSC
According to request, this PR adds the feature to list MCIS with simple response option.
With the option=simple, CB-TB doesn't include VM details in the response body.
Test example
[Request URL]
GET
http://localhost:1323/tumblebug/ns/tb01/mcis?option=simple
[Response body]