Kea  1.9.9-git
isc::yang::AdaptorSubnet Class Reference

JSON adaptor for subnets adding IDs and canonizes relays. More...

#include <adaptor_subnet.h>

+ Inheritance diagram for isc::yang::AdaptorSubnet:

Public Member Functions

 AdaptorSubnet ()
 Constructor. More...
 
virtual ~AdaptorSubnet ()
 Destructor. More...
 

Static Public Member Functions

static void assignID (isc::data::ElementPtr subnet, SubnetIDSet &set, isc::dhcp::SubnetID &next)
 Assign subnet ID. More...
 
static bool collectID (isc::data::ConstElementPtr subnet, SubnetIDSet &set)
 Collect a subnet ID. More...
 
static void updateRelay (isc::data::ElementPtr subnet)
 Update relay. More...
 

Detailed Description

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.

For relays an old syntax ip-address is translated into a new syntax ip-addresses. Note as all canonization adaptor it is optional, i.e., code should work without it.

Definition at line 30 of file adaptor_subnet.h.

Constructor & Destructor Documentation

isc::yang::AdaptorSubnet::AdaptorSubnet ( )

Constructor.

Definition at line 18 of file adaptor_subnet.cc.

isc::yang::AdaptorSubnet::~AdaptorSubnet ( )
virtual

Destructor.

Definition at line 21 of file adaptor_subnet.cc.

Member Function Documentation

void isc::yang::AdaptorSubnet::assignID ( isc::data::ElementPtr  subnet,
SubnetIDSet set,
isc::dhcp::SubnetID next 
)
static

Assign subnet ID.

Parameters
subnetThe subnet.
setThe reference to the set of assigned IDs.
nextThe next ID.

Definition at line 35 of file adaptor_subnet.cc.

bool isc::yang::AdaptorSubnet::collectID ( isc::data::ConstElementPtr  subnet,
SubnetIDSet set 
)
static

Collect a subnet ID.

Parameters
subnetThe subnet.
setThe reference to the set of assigned IDs.
Returns
True if the subnet has an ID, false otherwise.

Definition at line 25 of file adaptor_subnet.cc.

void isc::yang::AdaptorSubnet::updateRelay ( isc::data::ElementPtr  subnet)
static

Update relay.

Force the use of ip-addresses when it finds an ip-address entry. Can be used for shared networks too.

Parameters
subnetThe subnet.

Definition at line 49 of file adaptor_subnet.cc.


The documentation for this class was generated from the following files: