Last active
December 9, 2015 08:32
-
-
Save yasuhito/343cd1549da7693a9dd9 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class RoutingSwitch < Trema::Controller | |
# ... | |
def start_topology | |
TopologyController.new { |topo| topo.add_observer @path_manager }.start | |
end | |
end | |
class PathManager < Trema::Controller | |
# ... | |
def delete_link(port_a, port_b, _topology) | |
@graph.delete_link port_a, port_b | |
Path.select { |each| each.link?(port_a, port_b) }.each(&:destroy) | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment