Skip to content
This repository has been archived by the owner on Mar 31, 2023. It is now read-only.

[Hotfix] Fix Issue #506 and Issue #505 #511

Merged
merged 30 commits into from
Jan 12, 2021

Conversation

kevin-zhonghao
Copy link
Contributor

@codecov-io
Copy link

codecov-io commented Dec 9, 2020

Codecov Report

Merging #511 (bf4b11d) into master (ea2d923) will decrease coverage by 0.02%.
The diff coverage is 34.92%.

Impacted file tree graph

@@             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     
Impacted Files Coverage Δ Complexity Δ
...lcor/route/service/Impl/RouterToPMServiceImpl.java 5.12% <0.00%> (-1.54%) 1.00 <0.00> (ø)
...rewei/alcor/subnet/exception/SubnetBindRouter.java 0.00% <0.00%> (ø) 0.00 <0.00> (?)
...cor/subnet/service/implement/SubnetServiceImp.java 1.10% <0.00%> (+<0.01%) 1.00 <0.00> (ø)
...ewei/alcor/subnet/controller/SubnetController.java 54.18% <41.66%> (-0.70%) 13.00 <0.00> (ø)
...lcor/route/controller/NeutronRouterController.java 58.12% <50.00%> (-0.43%) 12.00 <0.00> (ø)
...rewei/alcor/route/controller/RouterController.java 47.02% <55.00%> (-0.24%) 11.00 <0.00> (ø)
...ei/alcor/route/service/Impl/RouterServiceImpl.java 58.82% <66.66%> (-0.39%) 15.00 <0.00> (ø)

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update ea2d923...bf4b11d. Read the comment docs.

@kevin-zhonghao kevin-zhonghao requested a review from xieus December 15, 2020 00:17
Comment on lines 527 to 531
// 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();
// }
Copy link
Contributor

@cj-chung cj-chung Dec 17, 2020

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.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Sure

Comment on lines 86 to 89
public void updateL3Neighbors(String projectid, List<String> gatewayPorts) {
String portManagerServiceUrl = portUrl + "/project/" + projectid + "/update-l3-neighbors";
//restTemplate.put(portManagerServiceUrl, request, PortWebJson.class);
}
Copy link
Contributor

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.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Added it

Copy link
Contributor

@cj-chung cj-chung left a comment

Choose a reason for hiding this comment

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

LGTM

@xieus xieus changed the title [Hotfix] Fix Issue 506 and Issue 505 [Hotfix] Fix Issue #506 and Issue #505 Jan 12, 2021
@xieus xieus merged commit 00ac3f0 into futurewei-cloud:master Jan 12, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug Something isn't working
Projects
None yet
4 participants