for (NodeConnector connector : globalContainerEdges.keySet()) {
// Skip if node connector belongs to production switch
- if (connector.getType() == NodeConnector.NodeConnectorIDType.PRODUCTION) {
+ if (connector.getType().equals(NodeConnector.NodeConnectorIDType.PRODUCTION)) {
continue;
}
return;
}
if ((this.topologyServiceShimListeners != null)
- && !this.topologyServiceShimListeners.containsKey(s)) {
+ && !this.topologyServiceShimListeners
+ .containsKey(containerName)) {
this.topologyServiceShimListeners.put(containerName, s);
logger.trace("Added topologyServiceShimListener for container:"
+ containerName);
return;
}
if ((this.topologyServiceShimListeners != null)
- && this.topologyServiceShimListeners.containsKey(s)) {
+ && this.topologyServiceShimListeners
+ .containsKey(containerName)
+ && this.topologyServiceShimListeners
+ .get(containerName).equals(s)
+ ) {
this.topologyServiceShimListeners.remove(containerName);
logger.trace("Removed topologyServiceShimListener for container: "
+ containerName);
}
ci.println("Container: " + container);
- ci
- .println(" Edge Bandwidth");
+ ci.println(" Edge Bandwidth");
Map<NodeConnector, Pair<Edge, Set<Property>>> edgePropsMap = edgeMap
.get(container);
if (edgePropsMap == null) {
return;
}
+ int count = 0;
for (Pair<Edge, Set<Property>> edgeProps : edgePropsMap.values()) {
if (edgeProps == null) {
continue;
bw = ((Bandwidth) prop).getValue();
}
}
-
+ count++;
ci.println(edgeProps.getLeft() + " " + bw);
}
+ ci.println("Total number of Edges: " + count);
}
public void _bwfactor(CommandInterpreter ci) {