Srikanth Vavilapalli | 9338f9d | 2014-09-18 07:37:09 -0700 | [diff] [blame] | 1 | package net.onrc.onos.apps.segmentrouting; |
| 2 | |
Srikanth Vavilapalli | 363f1dc | 2014-09-22 14:30:23 -0700 | [diff] [blame] | 3 | import java.util.ArrayList; |
Srikanth Vavilapalli | 9338f9d | 2014-09-18 07:37:09 -0700 | [diff] [blame] | 4 | import java.util.HashMap; |
Srikanth Vavilapalli | 9338f9d | 2014-09-18 07:37:09 -0700 | [diff] [blame] | 5 | import java.util.LinkedList; |
Srikanth Vavilapalli | 174e67c | 2014-09-19 07:27:17 -0700 | [diff] [blame] | 6 | |
Srikanth Vavilapalli | 363f1dc | 2014-09-22 14:30:23 -0700 | [diff] [blame] | 7 | import net.onrc.onos.core.intent.Path; |
Srikanth Vavilapalli | 9338f9d | 2014-09-18 07:37:09 -0700 | [diff] [blame] | 8 | import net.onrc.onos.core.topology.Link; |
| 9 | import net.onrc.onos.core.topology.LinkData; |
| 10 | import net.onrc.onos.core.topology.Switch; |
| 11 | import net.onrc.onos.core.util.Dpid; |
Srikanth Vavilapalli | 9338f9d | 2014-09-18 07:37:09 -0700 | [diff] [blame] | 12 | |
Srikanth Vavilapalli | 174e67c | 2014-09-19 07:27:17 -0700 | [diff] [blame] | 13 | import org.slf4j.Logger; |
| 14 | import org.slf4j.LoggerFactory; |
| 15 | |
Srikanth Vavilapalli | 9338f9d | 2014-09-18 07:37:09 -0700 | [diff] [blame] | 16 | /** |
| 17 | * This class creates bandwidth constrained breadth first tree and returns paths |
| 18 | * from root switch to leaf switches which satisfies the bandwidth condition. If |
| 19 | * bandwidth parameter is not specified, the normal breadth first tree will be |
| 20 | * calculated. The paths are snapshot paths at the point of the class |
| 21 | * instantiation. |
| 22 | */ |
| 23 | public class ECMPShortestPathGraph { |
| 24 | LinkedList<Switch> switchQueue = new LinkedList<>(); |
Srikanth Vavilapalli | 174e67c | 2014-09-19 07:27:17 -0700 | [diff] [blame] | 25 | LinkedList<Integer> distanceQueue = new LinkedList<>(); |
| 26 | HashMap<Dpid, Integer> switchSearched = new HashMap<>(); |
| 27 | HashMap<Dpid, ArrayList<LinkData>> upstreamLinks = new HashMap<>(); |
| 28 | HashMap<Dpid, ArrayList<Path>> paths = new HashMap<>(); |
| 29 | HashMap<Integer, ArrayList<Switch>> distanceSwitchMap = new HashMap<>(); |
Srikanth Vavilapalli | 9338f9d | 2014-09-18 07:37:09 -0700 | [diff] [blame] | 30 | Switch rootSwitch; |
Srikanth Vavilapalli | 174e67c | 2014-09-19 07:27:17 -0700 | [diff] [blame] | 31 | private static final Logger log = LoggerFactory |
| 32 | .getLogger(SegmentRoutingManager.class); |
Srikanth Vavilapalli | 363f1dc | 2014-09-22 14:30:23 -0700 | [diff] [blame] | 33 | |
Srikanth Vavilapalli | 9338f9d | 2014-09-18 07:37:09 -0700 | [diff] [blame] | 34 | /** |
Saurav Das | c0aa04c | 2014-09-22 10:22:23 -0700 | [diff] [blame] | 35 | * Constructor |
Sangho Shin | fbc572c | 2014-10-02 16:37:05 -0700 | [diff] [blame] | 36 | * |
Srikanth Vavilapalli | 9338f9d | 2014-09-18 07:37:09 -0700 | [diff] [blame] | 37 | * @param rootSwitch root of the BFS tree |
| 38 | */ |
| 39 | public ECMPShortestPathGraph(Switch rootSwitch) { |
| 40 | this.rootSwitch = rootSwitch; |
| 41 | calcECMPShortestPathGraph(); |
| 42 | } |
| 43 | |
| 44 | /** |
| 45 | * Calculates the BFS tree using any provided constraints and Intents. |
| 46 | */ |
| 47 | private void calcECMPShortestPathGraph() { |
| 48 | switchQueue.add(rootSwitch); |
Srikanth Vavilapalli | 174e67c | 2014-09-19 07:27:17 -0700 | [diff] [blame] | 49 | int currDistance = 0; |
| 50 | distanceQueue.add(currDistance); |
Srikanth Vavilapalli | f25c7b0 | 2014-10-01 14:30:43 -0700 | [diff] [blame] | 51 | switchSearched.put(rootSwitch.getDpid(), currDistance); |
Srikanth Vavilapalli | 9338f9d | 2014-09-18 07:37:09 -0700 | [diff] [blame] | 52 | while (!switchQueue.isEmpty()) { |
| 53 | Switch sw = switchQueue.poll(); |
Srikanth Vavilapalli | 174e67c | 2014-09-19 07:27:17 -0700 | [diff] [blame] | 54 | Switch prevSw = null; |
| 55 | currDistance = distanceQueue.poll(); |
Srikanth Vavilapalli | 9338f9d | 2014-09-18 07:37:09 -0700 | [diff] [blame] | 56 | for (Link link : sw.getOutgoingLinks()) { |
| 57 | Switch reachedSwitch = link.getDstPort().getSwitch(); |
Srikanth Vavilapalli | f25c7b0 | 2014-10-01 14:30:43 -0700 | [diff] [blame] | 58 | if ((prevSw != null) |
| 59 | && (prevSw.getDpid().equals(reachedSwitch.getDpid()))) |
Srikanth Vavilapalli | 174e67c | 2014-09-19 07:27:17 -0700 | [diff] [blame] | 60 | { |
Srikanth Vavilapalli | 878dad1 | 2014-09-19 21:02:10 -0700 | [diff] [blame] | 61 | /* Ignore LAG links between the same set of switches */ |
Srikanth Vavilapalli | f25c7b0 | 2014-10-01 14:30:43 -0700 | [diff] [blame] | 62 | continue; |
Srikanth Vavilapalli | 174e67c | 2014-09-19 07:27:17 -0700 | [diff] [blame] | 63 | } |
Srikanth Vavilapalli | 878dad1 | 2014-09-19 21:02:10 -0700 | [diff] [blame] | 64 | else |
Srikanth Vavilapalli | 174e67c | 2014-09-19 07:27:17 -0700 | [diff] [blame] | 65 | { |
Srikanth Vavilapalli | 878dad1 | 2014-09-19 21:02:10 -0700 | [diff] [blame] | 66 | prevSw = reachedSwitch; |
Srikanth Vavilapalli | 174e67c | 2014-09-19 07:27:17 -0700 | [diff] [blame] | 67 | } |
Srikanth Vavilapalli | 363f1dc | 2014-09-22 14:30:23 -0700 | [diff] [blame] | 68 | |
Srikanth Vavilapalli | 174e67c | 2014-09-19 07:27:17 -0700 | [diff] [blame] | 69 | Integer distance = switchSearched.get(reachedSwitch.getDpid()); |
Srikanth Vavilapalli | f25c7b0 | 2014-10-01 14:30:43 -0700 | [diff] [blame] | 70 | if ((distance != null) && (distance.intValue() < (currDistance + 1))) { |
Srikanth Vavilapalli | 9338f9d | 2014-09-18 07:37:09 -0700 | [diff] [blame] | 71 | continue; |
| 72 | } |
Srikanth Vavilapalli | f25c7b0 | 2014-10-01 14:30:43 -0700 | [diff] [blame] | 73 | if (distance == null) { |
| 74 | /* First time visiting this switch node */ |
Srikanth Vavilapalli | 878dad1 | 2014-09-19 21:02:10 -0700 | [diff] [blame] | 75 | switchQueue.add(reachedSwitch); |
Srikanth Vavilapalli | f25c7b0 | 2014-10-01 14:30:43 -0700 | [diff] [blame] | 76 | distanceQueue.add(currDistance + 1); |
| 77 | switchSearched.put(reachedSwitch.getDpid(), currDistance + 1); |
Srikanth Vavilapalli | 363f1dc | 2014-09-22 14:30:23 -0700 | [diff] [blame] | 78 | |
Srikanth Vavilapalli | f25c7b0 | 2014-10-01 14:30:43 -0700 | [diff] [blame] | 79 | ArrayList<Switch> distanceSwArray = distanceSwitchMap |
| 80 | .get(currDistance + 1); |
Srikanth Vavilapalli | 878dad1 | 2014-09-19 21:02:10 -0700 | [diff] [blame] | 81 | if (distanceSwArray == null) |
| 82 | { |
Srikanth Vavilapalli | f25c7b0 | 2014-10-01 14:30:43 -0700 | [diff] [blame] | 83 | distanceSwArray = new ArrayList<Switch>(); |
| 84 | distanceSwArray.add(reachedSwitch); |
| 85 | distanceSwitchMap.put(currDistance + 1, distanceSwArray); |
Srikanth Vavilapalli | 878dad1 | 2014-09-19 21:02:10 -0700 | [diff] [blame] | 86 | } |
| 87 | else |
Srikanth Vavilapalli | f25c7b0 | 2014-10-01 14:30:43 -0700 | [diff] [blame] | 88 | distanceSwArray.add(reachedSwitch); |
Srikanth Vavilapalli | 174e67c | 2014-09-19 07:27:17 -0700 | [diff] [blame] | 89 | } |
Srikanth Vavilapalli | 878dad1 | 2014-09-19 21:02:10 -0700 | [diff] [blame] | 90 | |
Srikanth Vavilapalli | 363f1dc | 2014-09-22 14:30:23 -0700 | [diff] [blame] | 91 | ArrayList<LinkData> upstreamLinkArray = |
Srikanth Vavilapalli | f25c7b0 | 2014-10-01 14:30:43 -0700 | [diff] [blame] | 92 | upstreamLinks.get(reachedSwitch.getDpid()); |
Srikanth Vavilapalli | 878dad1 | 2014-09-19 21:02:10 -0700 | [diff] [blame] | 93 | if (upstreamLinkArray == null) |
| 94 | { |
Srikanth Vavilapalli | f25c7b0 | 2014-10-01 14:30:43 -0700 | [diff] [blame] | 95 | upstreamLinkArray = new ArrayList<LinkData>(); |
| 96 | upstreamLinkArray.add(new LinkData(link)); |
| 97 | upstreamLinks.put(reachedSwitch.getDpid(), upstreamLinkArray); |
Srikanth Vavilapalli | 878dad1 | 2014-09-19 21:02:10 -0700 | [diff] [blame] | 98 | } |
| 99 | else |
Srikanth Vavilapalli | f25c7b0 | 2014-10-01 14:30:43 -0700 | [diff] [blame] | 100 | /* ECMP links */ |
| 101 | upstreamLinkArray.add(new LinkData(link)); |
Srikanth Vavilapalli | 9338f9d | 2014-09-18 07:37:09 -0700 | [diff] [blame] | 102 | } |
| 103 | } |
Srikanth Vavilapalli | 174e67c | 2014-09-19 07:27:17 -0700 | [diff] [blame] | 104 | |
Sangho Shin | 5be3e53 | 2014-10-03 17:20:58 -0700 | [diff] [blame] | 105 | /* |
Srikanth Vavilapalli | 174e67c | 2014-09-19 07:27:17 -0700 | [diff] [blame] | 106 | log.debug("ECMPShortestPathGraph:switchSearched for switch {} is {}", |
Srikanth Vavilapalli | f25c7b0 | 2014-10-01 14:30:43 -0700 | [diff] [blame] | 107 | HexString.toHexString(rootSwitch.getDpid().value()), switchSearched); |
Srikanth Vavilapalli | 174e67c | 2014-09-19 07:27:17 -0700 | [diff] [blame] | 108 | log.debug("ECMPShortestPathGraph:upstreamLinks for switch {} is {}", |
Srikanth Vavilapalli | f25c7b0 | 2014-10-01 14:30:43 -0700 | [diff] [blame] | 109 | HexString.toHexString(rootSwitch.getDpid().value()), upstreamLinks); |
Srikanth Vavilapalli | 174e67c | 2014-09-19 07:27:17 -0700 | [diff] [blame] | 110 | log.debug("ECMPShortestPathGraph:distanceSwitchMap for switch {} is {}", |
Srikanth Vavilapalli | f25c7b0 | 2014-10-01 14:30:43 -0700 | [diff] [blame] | 111 | HexString.toHexString(rootSwitch.getDpid().value()), distanceSwitchMap); |
Sangho Shin | 5be3e53 | 2014-10-03 17:20:58 -0700 | [diff] [blame] | 112 | */ |
Srikanth Vavilapalli | 174e67c | 2014-09-19 07:27:17 -0700 | [diff] [blame] | 113 | /* |
| 114 | for (Integer distance: distanceSwitchMap.keySet()){ |
| 115 | for (Switch sw: distanceSwitchMap.get(distance)){ |
| 116 | ArrayList<Path> path = getPath(sw); |
| 117 | log.debug("ECMPShortestPathGraph:Paths in Pass{} from switch {} to switch {} is {}", |
| 118 | distance, |
| 119 | HexString.toHexString(rootSwitch.getDpid().value()), |
| 120 | HexString.toHexString(sw.getDpid().value()), path); |
| 121 | } |
| 122 | }*/ |
| 123 | } |
| 124 | |
| 125 | private void getDFSPaths(Dpid dstSwitchDpid, Path path, ArrayList<Path> paths) { |
| 126 | Dpid rootSwitchDpid = rootSwitch.getDpid(); |
| 127 | for (LinkData upstreamLink : upstreamLinks.get(dstSwitchDpid)) { |
Srikanth Vavilapalli | f25c7b0 | 2014-10-01 14:30:43 -0700 | [diff] [blame] | 128 | /* Deep clone the path object */ |
Srikanth Vavilapalli | 878dad1 | 2014-09-19 21:02:10 -0700 | [diff] [blame] | 129 | Path sofarPath = new Path(); |
| 130 | if (!path.isEmpty()) |
Srikanth Vavilapalli | f25c7b0 | 2014-10-01 14:30:43 -0700 | [diff] [blame] | 131 | sofarPath.addAll(path.subList(0, path.size())); |
Srikanth Vavilapalli | 878dad1 | 2014-09-19 21:02:10 -0700 | [diff] [blame] | 132 | sofarPath.add(upstreamLink); |
| 133 | if (upstreamLink.getSrc().getDpid().equals(rootSwitchDpid)) |
| 134 | { |
Srikanth Vavilapalli | f25c7b0 | 2014-10-01 14:30:43 -0700 | [diff] [blame] | 135 | paths.add(sofarPath); |
| 136 | return; |
Srikanth Vavilapalli | 878dad1 | 2014-09-19 21:02:10 -0700 | [diff] [blame] | 137 | } |
| 138 | else |
Srikanth Vavilapalli | f25c7b0 | 2014-10-01 14:30:43 -0700 | [diff] [blame] | 139 | getDFSPaths(upstreamLink.getSrc().getDpid(), sofarPath, paths); |
Srikanth Vavilapalli | 174e67c | 2014-09-19 07:27:17 -0700 | [diff] [blame] | 140 | } |
Srikanth Vavilapalli | 9338f9d | 2014-09-18 07:37:09 -0700 | [diff] [blame] | 141 | } |
| 142 | |
| 143 | /** |
Sangho Shin | fbc572c | 2014-10-02 16:37:05 -0700 | [diff] [blame] | 144 | * Return root switch for the graph |
| 145 | * |
| 146 | * @return root switch |
| 147 | */ |
| 148 | public Switch getRootSwitch() { |
| 149 | return rootSwitch; |
| 150 | } |
| 151 | |
| 152 | /** |
Srikanth Vavilapalli | f25c7b0 | 2014-10-01 14:30:43 -0700 | [diff] [blame] | 153 | * Return the computed ECMP paths from the root switch to a given switch in |
| 154 | * the network |
Sangho Shin | fbc572c | 2014-10-02 16:37:05 -0700 | [diff] [blame] | 155 | * |
Srikanth Vavilapalli | 363f1dc | 2014-09-22 14:30:23 -0700 | [diff] [blame] | 156 | * @param targetSwitch the target switch |
| 157 | * @return the list of ECMP Paths from the root switch to the target switch |
Srikanth Vavilapalli | 9338f9d | 2014-09-18 07:37:09 -0700 | [diff] [blame] | 158 | */ |
Srikanth Vavilapalli | 363f1dc | 2014-09-22 14:30:23 -0700 | [diff] [blame] | 159 | public ArrayList<Path> getECMPPaths(Switch targetSwitch) { |
| 160 | ArrayList<Path> pathArray = paths.get(targetSwitch.getDpid()); |
| 161 | if (pathArray == null && switchSearched.containsKey( |
| 162 | targetSwitch.getDpid())) { |
Srikanth Vavilapalli | 878dad1 | 2014-09-19 21:02:10 -0700 | [diff] [blame] | 163 | pathArray = new ArrayList<>(); |
Srikanth Vavilapalli | 174e67c | 2014-09-19 07:27:17 -0700 | [diff] [blame] | 164 | Path path = new Path(); |
Srikanth Vavilapalli | 363f1dc | 2014-09-22 14:30:23 -0700 | [diff] [blame] | 165 | Dpid sw = targetSwitch.getDpid(); |
Srikanth Vavilapalli | 174e67c | 2014-09-19 07:27:17 -0700 | [diff] [blame] | 166 | getDFSPaths(sw, path, pathArray); |
Srikanth Vavilapalli | 363f1dc | 2014-09-22 14:30:23 -0700 | [diff] [blame] | 167 | paths.put(targetSwitch.getDpid(), pathArray); |
Srikanth Vavilapalli | 9338f9d | 2014-09-18 07:37:09 -0700 | [diff] [blame] | 168 | } |
Srikanth Vavilapalli | 174e67c | 2014-09-19 07:27:17 -0700 | [diff] [blame] | 169 | return pathArray; |
Srikanth Vavilapalli | 9338f9d | 2014-09-18 07:37:09 -0700 | [diff] [blame] | 170 | } |
Srikanth Vavilapalli | 363f1dc | 2014-09-22 14:30:23 -0700 | [diff] [blame] | 171 | |
| 172 | /** |
| 173 | * Return the complete info of the computed ECMP paths for each switch |
| 174 | * learned in multiple iterations from the root switch |
Sangho Shin | fbc572c | 2014-10-02 16:37:05 -0700 | [diff] [blame] | 175 | * |
Srikanth Vavilapalli | 363f1dc | 2014-09-22 14:30:23 -0700 | [diff] [blame] | 176 | * @return the hash table of Switches learned in multiple Dijkstra |
Srikanth Vavilapalli | f25c7b0 | 2014-10-01 14:30:43 -0700 | [diff] [blame] | 177 | * iterations and corresponding ECMP paths to it from the root |
| 178 | * switch |
Srikanth Vavilapalli | 363f1dc | 2014-09-22 14:30:23 -0700 | [diff] [blame] | 179 | */ |
| 180 | public HashMap<Integer, HashMap<Switch, |
Srikanth Vavilapalli | f25c7b0 | 2014-10-01 14:30:43 -0700 | [diff] [blame] | 181 | ArrayList<Path>>> getCompleteLearnedSwitchesAndPaths() { |
Srikanth Vavilapalli | 363f1dc | 2014-09-22 14:30:23 -0700 | [diff] [blame] | 182 | |
| 183 | HashMap<Integer, HashMap<Switch, ArrayList<Path>>> pathGraph = new |
Srikanth Vavilapalli | f25c7b0 | 2014-10-01 14:30:43 -0700 | [diff] [blame] | 184 | HashMap<Integer, HashMap<Switch, ArrayList<Path>>>(); |
Srikanth Vavilapalli | 363f1dc | 2014-09-22 14:30:23 -0700 | [diff] [blame] | 185 | |
| 186 | for (Integer itrIndx : distanceSwitchMap.keySet()) { |
| 187 | HashMap<Switch, ArrayList<Path>> swMap = new |
Srikanth Vavilapalli | f25c7b0 | 2014-10-01 14:30:43 -0700 | [diff] [blame] | 188 | HashMap<Switch, ArrayList<Path>>(); |
Srikanth Vavilapalli | 363f1dc | 2014-09-22 14:30:23 -0700 | [diff] [blame] | 189 | for (Switch sw : distanceSwitchMap.get(itrIndx)) { |
| 190 | swMap.put(sw, getECMPPaths(sw)); |
| 191 | } |
| 192 | pathGraph.put(itrIndx, swMap); |
| 193 | } |
| 194 | |
| 195 | return pathGraph; |
| 196 | } |
| 197 | |
| 198 | /** |
| 199 | * Return the complete info of the computed ECMP paths for each switch |
Srikanth Vavilapalli | f25c7b0 | 2014-10-01 14:30:43 -0700 | [diff] [blame] | 200 | * learned in multiple iterations from the root switch in the form of { |
| 201 | * Iteration1, Switch<> via {Switch<>, Switch<>} Switch<> via {Switch<>, |
| 202 | * Switch<>} Iteration2, Switch<> via {Switch<>, Switch<>, Switch<>} |
| 203 | * {Switch<>, Switch<>, Switch<>} Switch<> via {Switch<>, Switch<>, |
| 204 | * Switch<>} } |
Sangho Shin | fbc572c | 2014-10-02 16:37:05 -0700 | [diff] [blame] | 205 | * |
Srikanth Vavilapalli | 363f1dc | 2014-09-22 14:30:23 -0700 | [diff] [blame] | 206 | * @return the hash table of Switches learned in multiple Dijkstra |
Srikanth Vavilapalli | f25c7b0 | 2014-10-01 14:30:43 -0700 | [diff] [blame] | 207 | * iterations and corresponding ECMP paths in terms of Switches to |
| 208 | * be traversed to it from the root switch |
Srikanth Vavilapalli | 363f1dc | 2014-09-22 14:30:23 -0700 | [diff] [blame] | 209 | */ |
| 210 | public HashMap<Integer, HashMap<Switch, |
Srikanth Vavilapalli | f25c7b0 | 2014-10-01 14:30:43 -0700 | [diff] [blame] | 211 | ArrayList<ArrayList<Dpid>>>> getAllLearnedSwitchesAndVia() { |
Srikanth Vavilapalli | 363f1dc | 2014-09-22 14:30:23 -0700 | [diff] [blame] | 212 | |
Srikanth Vavilapalli | f25c7b0 | 2014-10-01 14:30:43 -0700 | [diff] [blame] | 213 | HashMap<Integer, HashMap<Switch, ArrayList<ArrayList<Dpid>>>> switchViaMap = new HashMap<Integer, HashMap<Switch, ArrayList<ArrayList<Dpid>>>>(); |
Srikanth Vavilapalli | 363f1dc | 2014-09-22 14:30:23 -0700 | [diff] [blame] | 214 | |
| 215 | for (Integer itrIndx : distanceSwitchMap.keySet()) { |
Srikanth Vavilapalli | 5ddf8f0 | 2014-09-24 11:02:28 -0700 | [diff] [blame] | 216 | HashMap<Switch, ArrayList<ArrayList<Dpid>>> swMap = |
| 217 | new HashMap<Switch, ArrayList<ArrayList<Dpid>>>(); |
Srikanth Vavilapalli | 363f1dc | 2014-09-22 14:30:23 -0700 | [diff] [blame] | 218 | |
| 219 | for (Switch sw : distanceSwitchMap.get(itrIndx)) { |
| 220 | ArrayList<ArrayList<Dpid>> swViaArray = new ArrayList<>(); |
Srikanth Vavilapalli | f25c7b0 | 2014-10-01 14:30:43 -0700 | [diff] [blame] | 221 | for (Path path : getECMPPaths(sw)) { |
Srikanth Vavilapalli | 363f1dc | 2014-09-22 14:30:23 -0700 | [diff] [blame] | 222 | ArrayList<Dpid> swVia = new ArrayList<>(); |
Srikanth Vavilapalli | f25c7b0 | 2014-10-01 14:30:43 -0700 | [diff] [blame] | 223 | for (LinkData link : path.subList(0, path.size())) { |
| 224 | if (link.getSrc().getDpid().equals(rootSwitch.getDpid())) { |
Srikanth Vavilapalli | 363f1dc | 2014-09-22 14:30:23 -0700 | [diff] [blame] | 225 | /* No need to add the root switch again in |
| 226 | * the Via list |
| 227 | */ |
| 228 | continue; |
| 229 | } |
| 230 | swVia.add(link.getSrc().getDpid()); |
| 231 | } |
| 232 | swViaArray.add(swVia); |
| 233 | } |
| 234 | swMap.put(sw, swViaArray); |
| 235 | } |
| 236 | switchViaMap.put(itrIndx, swMap); |
| 237 | } |
| 238 | return switchViaMap; |
| 239 | } |
Srikanth Vavilapalli | 9338f9d | 2014-09-18 07:37:09 -0700 | [diff] [blame] | 240 | } |