Kea 2.2.0
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
159
167public:
168
173 TranslatorSharedNetwork(sysrepo::S_Session session,
174 const std::string& model);
175
177 virtual ~TranslatorSharedNetwork();
178
184 isc::data::ElementPtr getSharedNetwork(const std::string& xpath);
185
190 void setSharedNetwork(const std::string& xpath,
192
193protected:
200 isc::data::ElementPtr getSharedNetworkKea(const std::string& xpath,
201 const std::string& subsel);
202
209 void setSharedNetworkKea(const std::string& xpath,
211 const std::string& subsel);
212};
213
221public:
222
227 TranslatorSharedNetworks(sysrepo::S_Session session,
228 const std::string& model);
229
232
237 isc::data::ElementPtr getSharedNetworks(const std::string& xpath);
238
243 void setSharedNetworks(const std::string& xpath,
245
246protected:
253 void setSharedNetworksKea(const std::string& xpath,
255};
256
257} // namespace yang
258} // namespace isc
259
260#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.