Kea 2.7.5
adaptor.h
Go to the documentation of this file.
1// Copyright (C) 2018-2022 Internet Systems Consortium, Inc. ("ISC")
2//
3// This Source Code Form is subject to the terms of the Mozilla Public
4// License, v. 2.0. If a copy of the MPL was not distributed with this
5// file, You can obtain one at http://mozilla.org/MPL/2.0/.
6
7#ifndef ISC_ADAPTOR_H
8#define ISC_ADAPTOR_H 1
9
10#include <cc/data.h>
12
13namespace isc {
14namespace yang {
15
22class Adaptor {
23public:
25 virtual ~Adaptor() = default;
26
40
50 static void fromParent(const std::string& name,
53
63 static void toParent(const std::string& name,
66
112 static void modify(isc::data::ConstElementPtr path,
114 isc::data::ElementPtr config);
115
116}; // Adaptor
117
118} // namespace yang
119} // namespace isc
120
121#endif // ISC_ADAPTOR_H
JSON adaptor between canonical Kea and YANG models.
Definition adaptor.h:22
static void fromParent(const std::string &name, isc::data::ConstElementPtr parent, isc::data::ConstElementPtr list)
Moves a parameter from parent to a list of children.
Definition adaptor.cc:37
virtual ~Adaptor()=default
Destructor.
static isc::data::ConstElementPtr getContext(isc::data::ConstElementPtr parent)
Get user context.
Definition adaptor.cc:20
static void toParent(const std::string &name, isc::data::ElementPtr parent, isc::data::ConstElementPtr list)
Moves a parameter to a parent.
Definition adaptor.cc:53
static void modify(isc::data::ConstElementPtr path, isc::data::ConstElementPtr actions, isc::data::ElementPtr config)
Modify a configuration in its JSON element format.
Definition adaptor.cc:296
boost::shared_ptr< const Element > ConstElementPtr
Definition data.h:29
boost::shared_ptr< Element > ElementPtr
Definition data.h:28
Defines the logger used by the top-level component of kea-lfc.