20 : identifier_types_() {
28 cfg->addIdentifierType(
"hw-address");
29 cfg->addIdentifierType(
"duid");
30 cfg->addIdentifierType(
"circuit-id");
31 cfg->addIdentifierType(
"client-id");
40 cfg->addIdentifierType(
"hw-address");
41 cfg->addIdentifierType(
"duid");
48 if (std::find(identifier_types_.begin(), identifier_types_.end(),
49 identifier_type) != identifier_types_.end()) {
51 << identifier_name <<
"'");
53 identifier_types_.push_back(identifier_type);
58 identifier_types_.clear();
64 for (
auto const&
id : identifier_types_) {
A generic exception that is thrown if a parameter given to a method is considered invalid in that con...
static ElementPtr create(const Position &pos=ZERO_POSITION())
static ElementPtr createList(const Position &pos=ZERO_POSITION())
Creates an empty ListElement type ElementPtr.
static CfgHostOperationsPtr createConfig6()
Factory function for DHCPv6.
void addIdentifierType(const std::string &identifier_name)
Adds new identifier type to a collection of identifiers to be used by the server to search for host r...
void clearIdentifierTypes()
Removes existing identifier types.
virtual isc::data::ElementPtr toElement() const
Unparse a configuration object.
CfgHostOperations()
Constructor.
static CfgHostOperationsPtr createConfig4()
Factory function for DHCPv4.
IdentifierType
Type of the host identifier.
IdentifierType getIdentifierType() const
Returns the identifier type.
static std::string getIdentifierName(const IdentifierType &type)
Returns name of the identifier of a specified type.
#define isc_throw(type, stream)
A shortcut macro to insert known values into exception arguments.
boost::shared_ptr< Element > ElementPtr
boost::shared_ptr< CfgHostOperations > CfgHostOperationsPtr
Pointer to the Non-const object.
Defines the logger used by the top-level component of kea-lfc.