-
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
Enhance NLB mgmt feature (2) #1178
Merged
seokho-son
merged 4 commits into
cloud-barista:main
from
jihoon-seo:220923_Revise_NLB_mgmt_feature
Sep 23, 2022
Merged
Enhance NLB mgmt feature (2) #1178
seokho-son
merged 4 commits into
cloud-barista:main
from
jihoon-seo:220923_Revise_NLB_mgmt_feature
Sep 23, 2022
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This pull request introduces 15 alerts when merging d5cf982 into ff8cf01 - view on LGTM.com new alerts:
|
seokho-son
reviewed
Sep 23, 2022
src/core/mcis/nlb.go
Outdated
Protocol string `json:"protocol" example:"TCP"` // TCP|HTTP|HTTPS | ||
Port string `json:"port" example:"22"` // Listener Port or 1-65535 | ||
|
||
VmGroupId string `json:"vmGroupId"` |
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.
Suggested change
VmGroupId string `json:"vmGroupId"` | |
VmGroupId string `json:"vmGroupId" example:"group"` |
api 예시를 추가해두었습니다. :)
@jihoon-seo Thanks! LGTM :) |
seokho-son
approved these changes
Sep 23, 2022
This pull request introduces 15 alerts when merging f82dcd4 into ff8cf01 - view on LGTM.com new alerts:
|
This was referenced Sep 26, 2022
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
CB-Spider v0.6.6 으로 테스트했습니다.
[주의]
'MCIS VmGroup에 VM을 추가/삭제했을 때
해당 VmGroup과 관련있는 NLB에도 VM을 추가/삭제하는 기능'은
이 PR에는 포함되어 있지 않습니다.
[As-is]
[To-be]
CreateNLB()
CreateNLB()
시, 기존처럼 VM들을 나열할 수 없고, TBvmGroupId
string을 명시하는 것만 가능합니다.TbNLBReq.TargetGroup
필드 안에VMs []string
필드가 남아 있기는 하지만, 여기에는 값을 적어도 무시됩니다.(이는
TbNLBReq
와TbNLBInfo
가 공통된TBNLBTargetGroup
struct를 활용하도록 되어 있기 때문입니다.Swagger 등에 표출되는
TbNLBReq
의 형식을 좀 더 정확히 나타내려면,TBNLBTargetGroup
struct를TbNLBReq
및TbNLBInfo
용으로 각각 분리할 수도 있겠습니다.)TbNLBInfo.TargetGroup
필드 안의VmGroupId
필드와VMs []string
필드를 모두 활용하도록 하였습니다.즉, CreateNLB / AddVM / RemoveVM 하면,
VmGroupId
필드에는 VmGroupId가,VMs []string
필드에는 NLB backend VM들이 나열됩니다.[Request]
❯ ./create-NLB.sh -n jhseo -c azure -r 1
POST
http://$TumblebugServer/tumblebug/ns/$NSID/mcis/${MCISID}/nlb
[Response]
'SP NameId에 해당되는 TB VM ID를 리턴하는 함수'를 추가하였고
이 함수를 활용하여 TB VM ID로 변환하여 출력합니다.
현재 TB의 구현은 이 SP NameId를 TB VM ID로 변환하여 출력하는 것이 아니고
사용자가 입력한 VmGroupId으로 TB VM 리스트를 조회하거나, add/remove할 TB VM 리스트가 오면 이를 가감하여
TB NLB 객체의 VM list에 저장 및 출력합니다.
필요 시, 이 부분도 'SP NameId에 해당되는 TB VM ID를 리턴하는 함수'를 활용하도록 변경할 수도 있겠습니다.
[Request]
❯ ./health-NLB.sh -n jhseo -c azure -r 1
GET
http://$TumblebugServer/tumblebug/ns/$NSID/mcis/${MCISID}/nlb/${CONN_CONFIG[$INDEX,$REGION]}-${POSTFIX}/healthz
[Response]