Kea  1.9.9-git
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 
13 namespace isc {
14 namespace yang {
15 
109 
117 public:
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 
146 protected:
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 
183 class TranslatorPdPools : virtual public TranslatorPdPool {
184 public:
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 
211 protected:
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
isc::data::ElementPtr getPdPoolsCommon(const std::string &xpath)
getPdPools common part.
void setPdPool(const std::string &xpath, isc::data::ConstElementPtr elem)
Translate and set pd-pool from JSON to YANG.
TranslatorPdPool(sysrepo::S_Session session, const std::string &model)
Constructor.
boost::shared_ptr< Element > ElementPtr
Definition: data.h:20
TranslatorPdPools(sysrepo::S_Session session, const std::string &model)
Constructor.
virtual ~TranslatorPdPool()
Destructor.
A translator class for converting a pd-pool list between YANG and JSON.
virtual ~TranslatorPdPools()
Destructor.
isc::data::ElementPtr getPdPools(const std::string &xpath)
Get and translate pd-pools from YANG to JSON.
isc::data::ElementPtr getPdPoolIetf6(const std::string &xpath)
getPdPool for ietf-dhcpv6-server.
A translator class for converting an option data list between YANG and JSON.
isc::data::ElementPtr getPdPool(const std::string &xpath)
Get and translate a pd-pool from YANG to JSON.
boost::shared_ptr< const Element > ConstElementPtr
Definition: data.h:23
void setPdPoolsId(const std::string &xpath, isc::data::ConstElementPtr elem)
setPdPools using pool-id.
void setPdPools(const std::string &xpath, isc::data::ConstElementPtr elem)
Translate and set pd-pools from JSON to YANG.
Defines the logger used by the top-level component of kea-dhcp-ddns.
void setPdPoolIetf6(const std::string &xpath, isc::data::ConstElementPtr elem)
setPdPool for ietf-dhcpv6-server.
Prefix delegation pool translation between YANG and JSON.
isc::data::ElementPtr getPdPoolKea(const std::string &xpath)
getPdPool for kea-dhcp6-server.
void setPdPoolsPrefix(const std::string &xpath, isc::data::ConstElementPtr elem)
setPdPools using prefix.
void setPdPoolKea(const std::string &xpath, isc::data::ConstElementPtr elem)
setPdPool for kea-dhcp6-server.