Kea 1.5.0
translator_pd_pool.h
Go to the documentation of this file.
1// Copyright (C) 2018 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#ifndef HAVE_PRE_0_7_6_SYSREPO
124 TranslatorPdPool(sysrepo::S_Session session, const std::string& model);
125#else
126 TranslatorPdPool(S_Session session, const std::string& model);
127#endif
128
130 virtual ~TranslatorPdPool();
131
138 isc::data::ElementPtr getPdPool(const std::string& xpath);
139
144 void setPdPool(const std::string& xpath, isc::data::ConstElementPtr elem);
145
146protected:
152 isc::data::ElementPtr getPdPoolIetf6(const std::string& xpath);
153
159 void setPdPoolIetf6(const std::string& xpath,
161
167 isc::data::ElementPtr getPdPoolKea(const std::string& xpath);
168
173 void setPdPoolKea(const std::string& xpath,
175};
176
183class TranslatorPdPools : virtual public TranslatorPdPool {
184public:
185
190#ifndef HAVE_PRE_0_7_6_SYSREPO
191 TranslatorPdPools(sysrepo::S_Session session, const std::string& model);
192#else
193 TranslatorPdPools(S_Session session, const std::string& model);
194#endif
195
197 virtual ~TranslatorPdPools();
198
203 isc::data::ElementPtr getPdPools(const std::string& xpath);
204
209 void setPdPools(const std::string& xpath, isc::data::ConstElementPtr elem);
210
211protected:
216 isc::data::ElementPtr getPdPoolsCommon(const std::string& xpath);
217
222 void setPdPoolsId(const std::string& xpath,
224
230 void setPdPoolsPrefix(const std::string& xpath,
232};
233
234}; // end of namespace isc::yang
235}; // end of namespace isc
236
237#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.
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.
boost::shared_ptr< const Element > ConstElementPtr
Definition: data.h:23
boost::shared_ptr< Element > ElementPtr
Definition: data.h:22
Defines the logger used by the top-level component of kea-dhcp-ddns.