![]() |
Kea 3.1.1
|
Manager which handles the delta (differences) between two subnets serialized as a JSON tree (usually a user provided subnet configuration and an already existing subnet configuration). More...
Public Member Functions | |
ConfigDiffManager (std::string space) | |
Constructor. | |
~ConfigDiffManager ()=default | |
Destructor. | |
void | processDelta (UpdateType type, ElementPtr &old_element, ConstElementPtr &subnet_element) |
Process the delta between existing configuration and user provided data. | |
Manager which handles the delta (differences) between two subnets serialized as a JSON tree (usually a user provided subnet configuration and an already existing subnet configuration).
It uses an internal representation of the subnet parameters hierarchy to traverse the JSON tree, and functions to detect elements that match the same configuration element or to detect if the element itself is a key identifier of another configuration element. For more details, see isc::data::mergeDiffAdd isc::data::mergeDiffDel and isc::data::extend.
SubnetConfigParserType | One of the Subnet4ConfigParser or Subnet6ConfigParser . |
Definition at line 59 of file subnet_cmds.cc.
|
inline |
Constructor.
space | The type of configuration to handle (dhcp4 or dhcp6). |
function which returns true if there are no other parameters in the subnet beside the identification keys: 'id' and 'subnet'.
function which returns true if there are no other parameters in the pool beside the identification keys: 'pool' and an empty 'option-data'.
function which returns true if there are no other parameters in the pd-pool beside the identification keys: 'prefix', 'prefix-len', 'delegated-len' and an empty 'option-data'.
function which returns true if there are no other parameters in the option beside the identification keys: 'code' and 'name' and 'space'.
function which returns true for any pair of configuration elements.
function which returns true if the pair of subnet elements refer to the same subnet in the configuration.
function which returns true if the pair of pool elements refer to the same pool in the configuration.
function which returns true if the pair of pd-pool elements refer to the same pd-pool in the configuration.
function which returns true if the pair of option elements refer to the same option in the configuration.
function which returns true if the parameter name is an identification key for the subnet.
function which returns true if the parameter name is an identification key for the pool.
function which returns true if the parameter name is an identification key for the pd-pool.
function which returns true if the parameter name is an identification key for the option.
Definition at line 65 of file subnet_cmds.cc.
References DHCP4_OPTION_SPACE, DHCP6_OPTION_SPACE, and isc_throw.
|
default |
Destructor.
|
inline |
Process the delta between existing configuration and user provided data.
type | The type of merge performed. |
old_element | The configuration element which needs update. |
subnet_element | The user provided data containing only the desired configuration changes. |
Definition at line 234 of file subnet_cmds.cc.
References isc::data::extend(), isc::data::mergeDiffAdd(), isc::data::mergeDiffDel(), isc::subnet_cmds::UPDATE_DELTA_ADD, and isc::subnet_cmds::UPDATE_DELTA_DEL.