faucet.gauge_pollers module
Library for polling dataplanes for statistics.
- class faucet.gauge_pollers.GaugeFlowTablePoller(conf, logname, prom_client)[source]
Bases:
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.GaugeMeterStatsPoller(conf, logname, prom_client)[source]
Bases:
GaugeThreadPoller
Poll for all meter stats.
- class faucet.gauge_pollers.GaugePoller(conf, logname, prom_client)[source]
Bases:
object
Abstraction for a poller for statistics.
- update(rcv_time, 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
msg – the stats reply message
- class faucet.gauge_pollers.GaugePortStatePoller(conf, logname, prom_client)[source]
Bases:
GaugePoller
Abstraction for port state poller.
- class faucet.gauge_pollers.GaugePortStatsPoller(conf, logname, prom_client)[source]
Bases:
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:
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.