Kea: translator_pd_pool.h Source File

| Kea 3.2.0-git

translator_pd_pool.h
Go to the documentation of this file.
1// Copyright (C) 2018-2025 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_TRANSLATOR_PD_POOL_H
8#define ISC_TRANSLATOR_PD_POOL_H 1
9
10#include <yang/translator_option_data.h>
11
12namespace isc {
13namespace yang {
14
114
121 class TranslatorPdPool : virtual public TranslatorOptionDataList {
122public:
127 TranslatorPdPool(sysrepo::Session session, const std::string& model);
128
130 virtual ~TranslatorPdPool() = default;
131
140 isc::data::ElementPtr getPdPool(libyang::DataNode const& data_node);
141
150 isc::data::ElementPtr getPdPoolFromAbsoluteXpath(std::string const& xpath);
151
156 void setPdPool(const std::string& xpath, isc::data::ConstElementPtr elem);
157
158protected:
166 isc::data::ElementPtr getPdPoolIetf6(libyang::DataNode const& data_node);
167
173 void setPdPoolIetf6(const std::string& xpath,
174 isc::data::ConstElementPtr elem);
175
183 isc::data::ElementPtr getPdPoolKea(libyang::DataNode const& data_node);
184
189 void setPdPoolKea(const std::string& xpath,
190 isc::data::ConstElementPtr elem);
191}; // TranslatorPdPool
192
199 class TranslatorPdPools : virtual public TranslatorPdPool {
200public:
205 TranslatorPdPools(sysrepo::Session session, const std::string& model);
206
208 virtual ~TranslatorPdPools() = default;
209
217 isc::data::ElementPtr getPdPools(libyang::DataNode const& data_node);
218
226 isc::data::ElementPtr getPdPoolsFromAbsoluteXpath(std::string const& xpath);
227
232 void setPdPools(const std::string& xpath, isc::data::ConstElementPtr elem);
233
234protected:
240 isc::data::ElementPtr getPdPoolsCommon(libyang::DataNode const& data_node);
241
246 void setPdPoolsId(const std::string& xpath,
247 isc::data::ConstElementPtr elem);
248
254 void setPdPoolsPrefix(const std::string& xpath,
255 isc::data::ConstElementPtr elem);
256}; // TranslatorPdPools
257
258} // namespace yang
259} // namespace isc
260
261#endif // ISC_TRANSLATOR_PD_POOL_H
isc::yang::TranslatorOptionDataList::TranslatorOptionDataList
TranslatorOptionDataList(sysrepo::Session session, const std::string &model)
Constructor.
Definition translator_option_data.cc:114
isc::yang::TranslatorPdPool::setPdPoolIetf6
void setPdPoolIetf6(const std::string &xpath, isc::data::ConstElementPtr elem)
setPdPool for ietf-dhcpv6-server.
Definition translator_pd_pool.cc:200
isc::yang::TranslatorPdPool::getPdPoolKea
isc::data::ElementPtr getPdPoolKea(libyang::DataNode const &data_node)
getPdPool for kea-dhcp6-server.
Definition translator_pd_pool.cc:96
isc::yang::TranslatorPdPool::~TranslatorPdPool
virtual ~TranslatorPdPool()=default
Destructor.
isc::yang::TranslatorPdPool::getPdPoolFromAbsoluteXpath
isc::data::ElementPtr getPdPoolFromAbsoluteXpath(std::string const &xpath)
Translate a pd-pool from YANG to JSON.
Definition translator_pd_pool.cc:48
isc::yang::TranslatorPdPool::setPdPool
void setPdPool(const std::string &xpath, isc::data::ConstElementPtr elem)
Translate and set pd-pool from JSON to YANG.
Definition translator_pd_pool.cc:182
isc::yang::TranslatorPdPool::getPdPoolIetf6
isc::data::ElementPtr getPdPoolIetf6(libyang::DataNode const &data_node)
getPdPool for ietf-dhcpv6-server.
Definition translator_pd_pool.cc:57
isc::yang::TranslatorPdPool::setPdPoolKea
void setPdPoolKea(const std::string &xpath, isc::data::ConstElementPtr elem)
setPdPool for kea-dhcp6-server.
Definition translator_pd_pool.cc:229
isc::yang::TranslatorPdPool::getPdPool
isc::data::ElementPtr getPdPool(libyang::DataNode const &data_node)
Translate a pd-pool from YANG to JSON.
Definition translator_pd_pool.cc:31
isc::yang::TranslatorPdPool::TranslatorPdPool
TranslatorPdPool(sysrepo::Session session, const std::string &model)
Constructor.
Definition translator_pd_pool.cc:24
isc::yang::TranslatorPdPools::setPdPoolsId
void setPdPoolsId(const std::string &xpath, isc::data::ConstElementPtr elem)
setPdPools using pool-id.
Definition translator_pd_pool.cc:326
isc::yang::TranslatorPdPools::~TranslatorPdPools
virtual ~TranslatorPdPools()=default
Destructor.
isc::yang::TranslatorPdPools::setPdPoolsPrefix
void setPdPoolsPrefix(const std::string &xpath, isc::data::ConstElementPtr elem)
setPdPools using prefix.
Definition translator_pd_pool.cc:336
isc::yang::TranslatorPdPools::TranslatorPdPools
TranslatorPdPools(sysrepo::Session session, const std::string &model)
Constructor.
Definition translator_pd_pool.cc:269
isc::yang::TranslatorPdPools::setPdPools
void setPdPools(const std::string &xpath, isc::data::ConstElementPtr elem)
Translate and set pd-pools from JSON to YANG.
Definition translator_pd_pool.cc:308
isc::yang::TranslatorPdPools::getPdPoolsFromAbsoluteXpath
isc::data::ElementPtr getPdPoolsFromAbsoluteXpath(std::string const &xpath)
Translate pd-pools from YANG to JSON.
Definition translator_pd_pool.cc:293
isc::yang::TranslatorPdPools::getPdPools
isc::data::ElementPtr getPdPools(libyang::DataNode const &data_node)
Translate pd-pools from YANG to JSON.
Definition translator_pd_pool.cc:277
isc::yang::TranslatorPdPools::getPdPoolsCommon
isc::data::ElementPtr getPdPoolsCommon(libyang::DataNode const &data_node)
getPdPools common part.
Definition translator_pd_pool.cc:302
isc::data::ConstElementPtr
boost::shared_ptr< const Element > ConstElementPtr
Definition data.h:30
isc::data::ElementPtr
boost::shared_ptr< Element > ElementPtr
Definition data.h:29
isc::yang
Definition adaptor.cc:17
isc
Defines the logger used by the top-level component of kea-lfc.
Definition check_exists_add.cc:18
translator_option_data.h