Kea 2.7.5
translator_pd_pool.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_TRANSLATOR_PD_POOL_H
8#define ISC_TRANSLATOR_PD_POOL_H 1
9
11
12namespace isc {
13namespace yang {
14
109
117public:
122 TranslatorPdPool(sysrepo::Session session, const std::string& model);
123
125 virtual ~TranslatorPdPool() = default;
126
135 isc::data::ElementPtr getPdPool(libyang::DataNode const& data_node);
136
145 isc::data::ElementPtr getPdPoolFromAbsoluteXpath(std::string const& xpath);
146
151 void setPdPool(const std::string& xpath, isc::data::ConstElementPtr elem);
152
153protected:
161 isc::data::ElementPtr getPdPoolIetf6(libyang::DataNode const& data_node);
162
168 void setPdPoolIetf6(const std::string& xpath,
170
178 isc::data::ElementPtr getPdPoolKea(libyang::DataNode const& data_node);
179
184 void setPdPoolKea(const std::string& xpath,
186}; // TranslatorPdPool
187
194class TranslatorPdPools : virtual public TranslatorPdPool {
195public:
200 TranslatorPdPools(sysrepo::Session session, const std::string& model);
201
203 virtual ~TranslatorPdPools() = default;
204
212 isc::data::ElementPtr getPdPools(libyang::DataNode const& data_node);
213
221 isc::data::ElementPtr getPdPoolsFromAbsoluteXpath(std::string const& xpath);
222
227 void setPdPools(const std::string& xpath, isc::data::ConstElementPtr elem);
228
229protected:
235 isc::data::ElementPtr getPdPoolsCommon(libyang::DataNode const& data_node);
236
241 void setPdPoolsId(const std::string& xpath,
243
249 void setPdPoolsPrefix(const std::string& xpath,
251}; // TranslatorPdPools
252
253} // namespace yang
254} // namespace isc
255
256#endif // ISC_TRANSLATOR_PD_POOL_H
A translator class for converting an option data list between YANG and JSON.
Prefix delegation pool translation between YANG and JSON.
void setPdPoolIetf6(const std::string &xpath, isc::data::ConstElementPtr elem)
setPdPool for ietf-dhcpv6-server.
isc::data::ElementPtr getPdPoolKea(libyang::DataNode const &data_node)
getPdPool for kea-dhcp6-server.
virtual ~TranslatorPdPool()=default
Destructor.
isc::data::ElementPtr getPdPoolFromAbsoluteXpath(std::string const &xpath)
Translate a pd-pool from YANG to JSON.
void setPdPool(const std::string &xpath, isc::data::ConstElementPtr elem)
Translate and set pd-pool from JSON to YANG.
isc::data::ElementPtr getPdPoolIetf6(libyang::DataNode const &data_node)
getPdPool for ietf-dhcpv6-server.
void setPdPoolKea(const std::string &xpath, isc::data::ConstElementPtr elem)
setPdPool for kea-dhcp6-server.
isc::data::ElementPtr getPdPool(libyang::DataNode const &data_node)
Translate a pd-pool from YANG to JSON.
TranslatorPdPool(sysrepo::Session session, const std::string &model)
Constructor.
A translator class for converting a pd-pool list between YANG and JSON.
void setPdPoolsId(const std::string &xpath, isc::data::ConstElementPtr elem)
setPdPools using pool-id.
virtual ~TranslatorPdPools()=default
Destructor.
void setPdPoolsPrefix(const std::string &xpath, isc::data::ConstElementPtr elem)
setPdPools using prefix.
TranslatorPdPools(sysrepo::Session session, const std::string &model)
Constructor.
void setPdPools(const std::string &xpath, isc::data::ConstElementPtr elem)
Translate and set pd-pools from JSON to YANG.
isc::data::ElementPtr getPdPoolsFromAbsoluteXpath(std::string const &xpath)
Translate pd-pools from YANG to JSON.
isc::data::ElementPtr getPdPools(libyang::DataNode const &data_node)
Translate pd-pools from YANG to JSON.
isc::data::ElementPtr getPdPoolsCommon(libyang::DataNode const &data_node)
getPdPools common part.
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.