Nettle.Discovery.Topology
Description
Module defining an abstract data type describing the connectivity among a collection of OpenFlow switches.
- type Port = (SwitchID, PortID)
- type Link = Set Port
- type Topology = Set Link
- unTopology :: Topology -> Set Link
- merge :: Topology -> Topology -> Topology
- empty :: Topology
- link :: (Port, Port) -> Link
- addLink :: Port -> Port -> Topology -> Topology
- removeSwitch :: SwitchID -> Topology -> Topology
- combine :: Topology -> Topology -> Topology
- removeLink :: Link -> Topology -> Topology
- removePort :: Port -> Topology -> Topology
- subset :: SwitchID -> Topology -> Topology
- containsDataPathID :: SwitchID -> Link -> Bool
- containsPort :: Port -> Link -> Bool
Documentation
type Port = (SwitchID, PortID)Source
Port definition that references a specific port on a specific switch
A set of two Ports (as defined above) that represents a connection from the PortID of a switch with a certain DataPathID to the PortID of another switch with a different DataPathID
type Topology = Set LinkSource
Definition of Topology, that is, a set of two-member sets of ports It's constructors are not made available in other modules; Topologies can only be manipulated by the functions defined in this module. This is done so that certain properties can be assumed of any Topology, namely that all Links contain two members
unTopology :: Topology -> Set LinkSource
Deconstructor for Topology constructor
addLink :: Port -> Port -> Topology -> TopologySource
Add a link into an existing topology. Use with empty to make a new Topology.
removeSwitch :: SwitchID -> Topology -> TopologySource
Removes all links that include a certain switch's DataPathID from the Topology.
removeLink :: Link -> Topology -> TopologySource
removePort :: Port -> Topology -> TopologySource
subset :: SwitchID -> Topology -> TopologySource
Find the subset of Links in a Topology that all include a certain switch's DataPathID
containsDataPathID :: SwitchID -> Link -> BoolSource
containsPort :: Port -> Link -> BoolSource