alcor
alcor copied to clipboard
[DPM] GS Manager Major Refactor
Context
GS Manager has two major issues that require fix as soon as possible.
- Global variable usage throughput the class, which could break basic functionality of DPM when two tenants use the same DPM, or two subsequent requests uses the same DPM.
private Map<String, String> ipPortIdMap;
private Map<String, String> ipMacMap;
private Map<String, String> ipSubnetIdMap;
private Map<String, String> ipHostIpMap;
private Map<String, Set<String>> hostIpFixedIpsMap;
private Map<String, Set<String>> hostIpSubnetIdsMap;
private Map<String, InternalSubnetEntity> subnetIdSubnetsMap;
private Map<String, InternalPortEntity> portIdPortMap;
private Map<String, NeighborInfo> portIdNeighborInfoMap;
- transformNorthToSouth is more than 500+ lines of codes. This needs major refactor to improve code readability and reduce potential risk of NPE (tracking by Issue #431)
The first issue should be resolved by d2afb65 (#418) by getting rid of DPM global variable, and keeping them local on a message level.