Ryu API Reference¶
Manage switches.
Planned to be replaced by ryu/topology.
-
class
ryu.controller.dpset.
DPSet
(*args, **kwargs)¶ DPSet application manages a set of switches (datapaths) connected to this controller.
-
get
(dp_id)¶ This method returns the ryu.controller.controller.Datapath instance for the given Datapath ID. Raises KeyError if no such a datapath connected to this controller.
-
get_all
()¶ This method returns a list of tuples which represents instances for switches connected to this controller. The tuple consists of a Datapath Id and an instance of ryu.controller.controller.Datapath. A return value looks like the following:
[ (dpid_A, Datapath_A), (dpid_B, Datapath_B), ... ]
-
get_port
(dpid, port_no)¶ This method returns the ryu.controller.dpset.PortState instance for the given Datapath ID and the port number. Raises ryu_exc.PortNotFound if no such a datapath connected to this controller or no such a port exists.
-
get_ports
(dpid)¶ This method returns a list of ryu.controller.dpset.PortState instances for the given Datapath ID. Raises KeyError if no such a datapath connected to this controller.
-