Paul Greyson | 7a30082 | 2013-04-09 12:57:49 -0700 | [diff] [blame] | 1 | /*************************************************************************************************** |
| 2 | find the links that include the switch with this dpid |
| 3 | ***************************************************************************************************/ |
| 4 | function debug_findlink(model, dpid) { |
| 5 | var links = []; |
| 6 | model.links.forEach(function (link) { |
| 7 | if (link['src-switch'] == dpid || link['dst-switch'] == dpid) { |
| 8 | links.push(link); |
| 9 | } |
| 10 | }); |
| 11 | return links; |
| 12 | } |