Kea 2.0.2
translator_shared_network.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_SHARED_NETWORK_H
8#define ISC_TRANSLATOR_SHARED_NETWORK_H 1
9
10#include <yang/translator.h>
12#include <list>
13
14namespace isc {
15namespace yang {
16
137
145public:
146
151 TranslatorSharedNetwork(sysrepo::S_Session session,
152 const std::string& model);
153
155 virtual ~TranslatorSharedNetwork();
156
162 isc::data::ElementPtr getSharedNetwork(const std::string& xpath);
163
168 void setSharedNetwork(const std::string& xpath,
170
171protected:
178 isc::data::ElementPtr getSharedNetworkKea(const std::string& xpath,
179 const std::string& subsel);
180
187 void setSharedNetworkKea(const std::string& xpath,
189 const std::string& subsel);
190};
191
199public:
200
205 TranslatorSharedNetworks(sysrepo::S_Session session,
206 const std::string& model);
207
210
215 isc::data::ElementPtr getSharedNetworks(const std::string& xpath);
216
221 void setSharedNetworks(const std::string& xpath,
223
224protected:
231 void setSharedNetworksKea(const std::string& xpath,
233};
234
235} // namespace yang
236} // namespace isc
237
238#endif // ISC_TRANSLATOR_SHARED_NETWORK_H
Shared network translation between YANG and JSON.
isc::data::ElementPtr getSharedNetworkKea(const std::string &xpath, const std::string &subsel)
getSharedNetwork for kea-dhcp4-server and kea-dhcp6-server models
TranslatorSharedNetwork(sysrepo::S_Session session, const std::string &model)
Constructor.
void setSharedNetworkKea(const std::string &xpath, isc::data::ConstElementPtr elem, const std::string &subsel)
setSharedNetwork for kea-dhcp4-server and kea-dhcp6-server models
void setSharedNetwork(const std::string &xpath, isc::data::ConstElementPtr elem)
Translate and set shared network from JSON to YANG.
isc::data::ElementPtr getSharedNetwork(const std::string &xpath)
Get and translate a shared network from YANG to JSON.
A translator class for converting a shared network list between YANG and JSON.
isc::data::ElementPtr getSharedNetworks(const std::string &xpath)
Get and translate shared networks from YANG to JSON.
void setSharedNetworksKea(const std::string &xpath, isc::data::ConstElementPtr elem)
setSharedNetworks for kea-dhcp4-server and kea-dhcp6-server
TranslatorSharedNetworks(sysrepo::S_Session session, const std::string &model)
Constructor.
void setSharedNetworks(const std::string &xpath, isc::data::ConstElementPtr elem)
Translate and set shared networks from JSON to YANG.
A translator class for converting a subnet list between YANG and JSON.
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.