-
Notifications
You must be signed in to change notification settings - Fork 34
[Hotfix] Fix Issue #506 and Issue #505 #511
[Hotfix] Fix Issue #506 and Issue #505 #511
Conversation
Codecov Report
@@ Coverage Diff @@
## master #511 +/- ##
============================================
- Coverage 34.92% 34.90% -0.03%
Complexity 1183 1183
============================================
Files 473 473
Lines 11776 11799 +23
Branches 1521 1526 +5
============================================
+ Hits 4113 4118 +5
- Misses 7102 7114 +12
- Partials 561 567 +6
Continue to review full report at Codecov.
|
// TODO: check if there is any gateway / non-gateway port for the subnet, waiting for PM new API | ||
// Boolean checkIfAnyNoneGatewayPortInSubnet = this.subnetService.checkIfAnyPortInSubnet(rangeId); | ||
// if (checkIfAnyNoneGatewayPortInSubnet) { | ||
// throw new HavePortInSubnet(); | ||
// } |
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.
@kevin-zhonghao Please check PM's new API for port count in a subnet, it should be {"/project/{project_id}/subnet-port-count/{subnet_id}
. This api will only return non-gateway port count. If it's not zero, the subnet cannot be deleted. If it returns zero, we need to ask PM to delete the gateway port first before delete the subnet.
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.
Sure
public void updateL3Neighbors(String projectid, List<String> gatewayPorts) { | ||
String portManagerServiceUrl = portUrl + "/project/" + projectid + "/update-l3-neighbors"; | ||
//restTemplate.put(portManagerServiceUrl, request, PortWebJson.class); | ||
} |
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.
@kevin-zhonghao please prepare a RouterUpdateInfo
object here for request body. @chenpiaoping's code for this API requires RouterUpdateInfo
object.
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.
Added 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.
LGTM
#505
#506