-
Leigh B Stoller authored
use this path when setting up the vlan, instead of recomputing the set of trunks that are need. Assign does a much better job of this, so throwing the info away is bad. But, if there is no switch path, we still have to be careful cause the switch infrastructure might have loops, and the existing algorithm did not take that into account. And in fact, Utah has loops and this was causing grief. I added a simple spanning tree function (Prim's Greedy) to calculate a loop free set of trunks. An added complication is if the vlans are modified on the command line, and the there is a switch path in the DB. In this case we have to throw that away, and revert to dumb loop free calculation. Note that we also have to store the switch path in the vlans table, since for swapmod/synctables, we need to know how to undo stale vlans (which are no longer in the lans table).
f61a6288