Kea 2.7.5
|
JSON adaptor for subnets adding IDs and canonizes relays. More...
#include <adaptor_subnet.h>
Public Member Functions | |
virtual | ~AdaptorSubnet ()=default |
Destructor. | |
Static Public Member Functions | |
static void | assignID (isc::data::ElementPtr subnet, isc::dhcp::SubnetIDSet &set, isc::dhcp::SubnetID &next) |
Assign subnet ID. | |
static bool | collectID (isc::data::ConstElementPtr subnet, isc::dhcp::SubnetIDSet &set) |
Collect a subnet ID. | |
static void | updateRelay (isc::data::ElementPtr subnet) |
Update relay. | |
JSON adaptor for subnets adding IDs and canonizes relays.
Adding IDs is done in two passes walking through subnets. -1- Add in the set used values and return false when there is no ID so the caller can decide if the second pass is needed. -2- For a subnet without an ID, assigned the next unused ID.
Note as all canonization adaptors it is optional, i.e., code should work without it.
Definition at line 25 of file adaptor_subnet.h.
|
virtualdefault |
Destructor.
|
static |
Assign subnet ID.
subnet | The subnet. |
set | The reference to the set of assigned IDs. |
next | The next ID. |
Definition at line 30 of file adaptor_subnet.cc.
References isc::data::Element::create().
Referenced by isc::yang::AdaptorConfig::sharedNetworksAssignID(), and isc::yang::AdaptorConfig::subnetsAssignID().
|
static |
Collect a subnet ID.
subnet | The subnet. |
set | The reference to the set of assigned IDs. |
Definition at line 20 of file adaptor_subnet.cc.
Referenced by isc::yang::AdaptorConfig::subnetsCollectID().
|
static |
Update relay.
Can be used for shared networks too.
subnet | The subnet. |
Definition at line 44 of file adaptor_subnet.cc.
Referenced by isc::yang::AdaptorConfig::sanitizeRelayInSharedNetworks(), and isc::yang::AdaptorConfig::sanitizeRelaySubnets().