-
Notifications
You must be signed in to change notification settings - Fork 192
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
MGMT-6897: Swagger support multiple networks #2339
MGMT-6897: Swagger support multiple networks #2339
Conversation
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: YuviGold The full list of commands accepted by this bot can be found here. The pull request process is described here
Needs approval from an approver in each of these files:
Approvers can indicate their approval by writing |
/lgtm |
description: Cluster networks that are associated with this cluster. | ||
items: | ||
type: object | ||
$ref: '#/definitions/cluster_network' |
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.
What should be the logic for update? If a record exists - is it add or update? If it does not exist - is it delete?
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.
Good question.
This is used in PATCH API - meaning the user doesn't have to pass the complete entity.
@avishayt thoughts on this?
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.
The user doesn't need to pass the entire cluster resource, but the simplest way to implement this is that they pass the entire list of networks and we replace any previous entry. Let's not overcomplicate it.
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.
Updating the networks would work the same as it goes for the monitored operators.
- In case the network weren't given (nil) then its update is ignored.
- In case networks were provided - they are overriding the current
cluster networks.
/retest-required Please review the full test history for this PR and help us cut down flakes. |
/lgtm cancel |
The most straight-forward solution for maintaining multiple networks is to have different tables for each one. Then, there's no need to handle BLOBs marshalling and it avoid any assumptions for order, amount, etc (Those would be validated as part of the service logic). Updating the networks would work the same as it goes for the monitored operators. - In case the network weren't given (nil) then its update is ignored. - In case networks were provided - they are overriding the current cluster networks.
8930ad3
to
6e55db1
Compare
/lgtm |
Assisted Pull Request
Description
The most straight-forward solution for maintaining multiple networks
is to have different tables for each one.
Then, there's no need to handle BLOBs marshalling and it avoid any
assumptions for order, amount, etc (Those would be validated as part of
the service logic).
Updating the networks would work the same as it goes for the monitored
operators.
cluster networks.
List all the issues related to this PR
What environments does this code impact?
How was this code tested?
Assignees
/cc @mkowalski
/cc @ori-amizur
/cc @eranco74
Checklist
docs
, README, etc)Reviewers Checklist