faucet.valves_manager module

Manage a collection of Valves.

class faucet.valves_manager.ConfigWatcher[source]

Bases: object

Watch config for file or content changes.

config_file = None
config_file_stats = None
config_hashes = None
content_changed(new_config_file)[source]

Return True if config file content actually changed.

files_changed()[source]

Return True if any config files changed.

update(new_config_file, new_config_hashes=None)[source]

Update state with new config file/hashes.

class faucet.valves_manager.ValvesManager(logname, logger, metrics, notifier, bgp, dot1x, send_flows_to_dp_by_id)[source]

Bases: object

Manage a collection of Valves.

load_configs(now, new_config_file, delete_dp=None)[source]

Load/apply new config to all Valves.

new_valve(new_dp)[source]
parse_configs(new_config_file)[source]

Return parsed configs for Valves, or None.

request_reload_configs(now, new_config_file, delete_dp=None)[source]

Process a request to load config changes.

stack_topo_change(_now, valve)[source]

Update stack topo of all other Valves affected by the event on this Valve.

update_metrics(now)[source]

Update metrics in all Valves.

valve_flow_services(now, valve_service)[source]

Call a method on all Valves and send any resulting flows.

valve_packet_in(now, valve, msg)[source]

Time a call to Valve packet in handler.

valves = {}