Kea  1.9.9-git
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

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

Static Public Member Functions

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

Static Public Attributes

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

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

isc::yang::AdaptorHost::AdaptorHost ( )

Constructor.

Definition at line 26 of file adaptor_host.cc.

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

Destructor.

Definition at line 29 of file adaptor_host.cc.

Member Function Documentation

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 33 of file adaptor_host.cc.

References isc::util::str::quotedStringToBinary().

+ Here is the call graph for this function:

Member Data Documentation

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.


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