Kea 2.2.0
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
110
118public:
119
124 TranslatorPdPool(sysrepo::S_Session session, const std::string& model);
125
127 virtual ~TranslatorPdPool();
128
135 isc::data::ElementPtr getPdPool(const std::string& xpath);
136
141 void setPdPool(const std::string& xpath, isc::data::ConstElementPtr elem);
142
143protected:
149 isc::data::ElementPtr getPdPoolIetf6(const std::string& xpath);
150
156 void setPdPoolIetf6(const std::string& xpath,
158
164 isc::data::ElementPtr getPdPoolKea(const std::string& xpath);
165
170 void setPdPoolKea(const std::string& xpath,
172};
173
180class TranslatorPdPools : virtual public TranslatorPdPool {
181public:
182
187 TranslatorPdPools(sysrepo::S_Session session, const std::string& model);
188
190 virtual ~TranslatorPdPools();
191
196 isc::data::ElementPtr getPdPools(const std::string& xpath);
197
202 void setPdPools(const std::string& xpath, isc::data::ConstElementPtr elem);
203
204protected:
209 isc::data::ElementPtr getPdPoolsCommon(const std::string& xpath);
210
215 void setPdPoolsId(const std::string& xpath,
217
223 void setPdPoolsPrefix(const std::string& xpath,
225};
226
227} // namespace yang
228} // namespace isc
229
230#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.