Kea 2.5.8
isc::yang::AdaptorHost Class Reference

JSON adaptor for host reservations quoting identifiers. More...

#include <adaptor_host.h>

+ Inheritance diagram for isc::yang::AdaptorHost:

Public Member Functions

virtual ~AdaptorHost ()=default
 Destructor.
 

Static Public Member Functions

static void quoteIdentifier (isc::data::ElementPtr host)
 Quote when needed a host identifier.
 

Static Public Attributes

static const std::string STD_CHARACTERS
 The string of standard (vs special or not printable) characters (digit, letters, -, ., @, _).
 

Detailed Description

JSON adaptor for host reservations quoting identifiers.

The identifier type and identifier value are used as keys in YANG host reservation lists so some constraints were put on their contents. For instance a quoted flex-id identifier raises an error (keys are between quotes in setItem commands).

Definition at line 21 of file adaptor_host.h.

Constructor & Destructor Documentation

◆ ~AdaptorHost()

virtual isc::yang::AdaptorHost::~AdaptorHost ( )
virtualdefault

Destructor.

Member Function Documentation

◆ quoteIdentifier()

void isc::yang::AdaptorHost::quoteIdentifier ( isc::data::ElementPtr  host)
static

Quote when needed a host identifier.

Check if the flex-id identifier includes a special (including quote) or not printable character. When it is the case produce and replace by a hexadecimal identifier trying first for a quoted identifier.

Parameters
hostThe host.

Definition at line 29 of file adaptor_host.cc.

References isc::data::Element::create(), isc::util::str::quotedStringToBinary(), and STD_CHARACTERS.

Referenced by isc::yang::AdaptorConfig::sanitizeHostList().

+ Here is the call graph for this function:

Member Data Documentation

◆ STD_CHARACTERS

const string isc::yang::AdaptorHost::STD_CHARACTERS
static
Initial value:
=
"0123456789@ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz-.@_"

The string of standard (vs special or not printable) characters (digit, letters, -, ., @, _).

Definition at line 26 of file adaptor_host.h.

Referenced by quoteIdentifier().


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