faucet.conf module

Base configuration implementation.

class faucet.conf.Conf(_id, dp_id, conf=None)[source]

Bases: object

Base class for FAUCET configuration.

check_config()[source]

As far as possible, check config at instantiation time for errors, typically via assert.

conf_hash(dyn=False, subconf=True, ignore_keys=None)[source]
defaults = {}
defaults_types = {}
dyn_finalized = False
dyn_hash = None
finalize()[source]

Configuration parsing marked complete.

ignore_subconf(other, ignore_keys=None)[source]

Return True if this config same as other, ignoring sub config.

merge_dyn(other_conf)[source]

Merge dynamic state from other conf object.

set_defaults()[source]

Set default values and run any basic sanity checks.

to_conf()[source]

Return configuration as a dict.

update(conf)[source]

Parse supplied YAML config and sanity check.

exception faucet.conf.InvalidConfigError[source]

Bases: Exception

This error is thrown when the config file is not valid.