faucet.gauge_pollers module¶
Library for polling dataplanes for statistics.
-
class
faucet.gauge_pollers.
GaugeFlowTablePoller
(conf, logname, prom_client)[source]¶ Bases:
faucet.gauge_pollers.GaugeThreadPoller
Periodically dumps the current datapath flow table as a yaml object.
Includes a timestamp and a reference ($DATAPATHNAME-flowtables). The flow table is dumped as an OFFlowStatsReply message (in yaml format) that matches all flows.
-
class
faucet.gauge_pollers.
GaugePoller
(conf, logname, prom_client)[source]¶ Bases:
object
Abstraction for a poller for statistics.
-
update
(rcv_time, dp_id, msg)[source]¶ Handle the responses to requests.
Called when a reply to a stats request sent by this object is received by the controller.
It should acknowledge the receipt by setting self.reply_pending to false.
- Parameters
rcv_time – the time the response was received
dp_id – DP ID
msg – the stats reply message
-
-
class
faucet.gauge_pollers.
GaugePortStatePoller
(conf, logname, prom_client)[source]¶ Bases:
faucet.gauge_pollers.GaugePoller
Abstraction for port state poller.
-
class
faucet.gauge_pollers.
GaugePortStatsPoller
(conf, logname, prom_client)[source]¶ Bases:
faucet.gauge_pollers.GaugeThreadPoller
Periodically sends a port stats request to the datapath and parses and outputs the response.
-
class
faucet.gauge_pollers.
GaugeThreadPoller
(conf, logname, prom_client)[source]¶ Bases:
faucet.gauge_pollers.GaugePoller
A ryu thread object for sending and receiving OpenFlow stats requests.
The thread runs in a loop sending a request, sleeping then checking a response was received before sending another request.
The methods send_req, update and no_response should be implemented by subclasses.