Kea 2.0.1
translator_pd_pool.h
Go to the documentation of this file.
1// Copyright (C) 2018-2021 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#include <list>
12
13namespace isc {
14namespace yang {
15
109
117public:
118
123 TranslatorPdPool(sysrepo::S_Session session, const std::string& model);
124
126 virtual ~TranslatorPdPool();
127
134 isc::data::ElementPtr getPdPool(const std::string& xpath);
135
140 void setPdPool(const std::string& xpath, isc::data::ConstElementPtr elem);
141
142protected:
148 isc::data::ElementPtr getPdPoolIetf6(const std::string& xpath);
149
155 void setPdPoolIetf6(const std::string& xpath,
157
163 isc::data::ElementPtr getPdPoolKea(const std::string& xpath);
164
169 void setPdPoolKea(const std::string& xpath,
171};
172
179class TranslatorPdPools : virtual public TranslatorPdPool {
180public:
181
186 TranslatorPdPools(sysrepo::S_Session session, const std::string& model);
187
189 virtual ~TranslatorPdPools();
190
195 isc::data::ElementPtr getPdPools(const std::string& xpath);
196
201 void setPdPools(const std::string& xpath, isc::data::ConstElementPtr elem);
202
203protected:
208 isc::data::ElementPtr getPdPoolsCommon(const std::string& xpath);
209
214 void setPdPoolsId(const std::string& xpath,
216
222 void setPdPoolsPrefix(const std::string& xpath,
224};
225
226} // namespace yang
227} // namespace isc
228
229#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.
TranslatorPdPool(sysrepo::S_Session session, const std::string &model)
Constructor.
void setPdPoolIetf6(const std::string &xpath, isc::data::ConstElementPtr elem)
setPdPool for ietf-dhcpv6-server.
virtual ~TranslatorPdPool()
Destructor.
isc::data::ElementPtr getPdPool(const std::string &xpath)
Get and translate a pd-pool from YANG to JSON.
isc::data::ElementPtr getPdPoolKea(const std::string &xpath)
getPdPool for kea-dhcp6-server.
void setPdPool(const std::string &xpath, isc::data::ConstElementPtr elem)
Translate and set pd-pool from JSON to YANG.
void setPdPoolKea(const std::string &xpath, isc::data::ConstElementPtr elem)
setPdPool for kea-dhcp6-server.
isc::data::ElementPtr getPdPoolIetf6(const std::string &xpath)
getPdPool for ietf-dhcpv6-server.
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.
void setPdPoolsPrefix(const std::string &xpath, isc::data::ConstElementPtr elem)
setPdPools using prefix.
void setPdPools(const std::string &xpath, isc::data::ConstElementPtr elem)
Translate and set pd-pools from JSON to YANG.
isc::data::ElementPtr getPdPoolsCommon(const std::string &xpath)
getPdPools common part.
isc::data::ElementPtr getPdPools(const std::string &xpath)
Get and translate pd-pools from YANG to JSON.
virtual ~TranslatorPdPools()
Destructor.
TranslatorPdPools(sysrepo::S_Session session, const std::string &model)
Constructor.
boost::shared_ptr< const Element > ConstElementPtr
Definition: data.h:27
boost::shared_ptr< Element > ElementPtr
Definition: data.h:24
Defines the logger used by the top-level component of kea-lfc.