Kea: translator_pd_pool.h Source File

| 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
10#include <yang/translator_option_data.h>
11#include <list>
12
13namespace isc {
14namespace yang {
15
110
117 class TranslatorPdPool : virtual public TranslatorOptionDataList {
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,
157 isc::data::ConstElementPtr elem);
158
164 isc::data::ElementPtr getPdPoolKea(const std::string& xpath);
165
170 void setPdPoolKea(const std::string& xpath,
171 isc::data::ConstElementPtr elem);
172};
173
180 class 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,
216 isc::data::ConstElementPtr elem);
217
223 void setPdPoolsPrefix(const std::string& xpath,
224 isc::data::ConstElementPtr elem);
225};
226
227} // namespace yang
228} // namespace isc
229
230#endif // ISC_TRANSLATOR_PD_POOL_H
isc::yang::TranslatorOptionDataList
A translator class for converting an option data list between YANG and JSON.
Definition: translator_option_data.h:123
isc::yang::TranslatorPdPool
Prefix delegation pool translation between YANG and JSON.
Definition: translator_pd_pool.h:117
isc::yang::TranslatorPdPool::TranslatorPdPool
TranslatorPdPool(sysrepo::S_Session session, const std::string &model)
Constructor.
Definition: translator_pd_pool.cc:22
isc::yang::TranslatorPdPool::setPdPoolIetf6
void setPdPoolIetf6(const std::string &xpath, isc::data::ConstElementPtr elem)
setPdPool for ietf-dhcpv6-server.
Definition: translator_pd_pool.cc:199
isc::yang::TranslatorPdPool::~TranslatorPdPool
virtual ~TranslatorPdPool()
Destructor.
Definition: translator_pd_pool.cc:28
isc::yang::TranslatorPdPool::getPdPool
isc::data::ElementPtr getPdPool(const std::string &xpath)
Get and translate a pd-pool from YANG to JSON.
Definition: translator_pd_pool.cc:32
isc::yang::TranslatorPdPool::getPdPoolKea
isc::data::ElementPtr getPdPoolKea(const std::string &xpath)
getPdPool for kea-dhcp6-server.
Definition: translator_pd_pool.cc:102
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:181
isc::yang::TranslatorPdPool::setPdPoolKea
void setPdPoolKea(const std::string &xpath, isc::data::ConstElementPtr elem)
setPdPool for kea-dhcp6-server.
Definition: translator_pd_pool.cc:241
isc::yang::TranslatorPdPool::getPdPoolIetf6
isc::data::ElementPtr getPdPoolIetf6(const std::string &xpath)
getPdPool for ietf-dhcpv6-server.
Definition: translator_pd_pool.cc:49
isc::yang::TranslatorPdPools
A translator class for converting a pd-pool list between YANG and JSON.
Definition: translator_pd_pool.h:180
isc::yang::TranslatorPdPools::setPdPoolsId
void setPdPoolsId(const std::string &xpath, isc::data::ConstElementPtr elem)
setPdPools using pool-id.
Definition: translator_pd_pool.cc:338
isc::yang::TranslatorPdPools::setPdPoolsPrefix
void setPdPoolsPrefix(const std::string &xpath, isc::data::ConstElementPtr elem)
setPdPools using prefix.
Definition: translator_pd_pool.cc:348
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:320
isc::yang::TranslatorPdPools::getPdPoolsCommon
isc::data::ElementPtr getPdPoolsCommon(const std::string &xpath)
getPdPools common part.
Definition: translator_pd_pool.cc:314
isc::yang::TranslatorPdPools::getPdPools
isc::data::ElementPtr getPdPools(const std::string &xpath)
Get and translate pd-pools from YANG to JSON.
Definition: translator_pd_pool.cc:298
isc::yang::TranslatorPdPools::~TranslatorPdPools
virtual ~TranslatorPdPools()
Destructor.
Definition: translator_pd_pool.cc:294
isc::yang::TranslatorPdPools::TranslatorPdPools
TranslatorPdPools(sysrepo::S_Session session, const std::string &model)
Constructor.
Definition: translator_pd_pool.cc:287
isc::data::ConstElementPtr
boost::shared_ptr< const Element > ConstElementPtr
Definition: data.h:27
isc::data::ElementPtr
boost::shared_ptr< Element > ElementPtr
Definition: data.h:24
isc
Defines the logger used by the top-level component of kea-lfc.
Definition: agent_parser.cc:143
translator_option_data.h