Kea 1.5.0
translator_shared_network.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_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
118
126public:
127
132#ifndef HAVE_PRE_0_7_6_SYSREPO
133 TranslatorSharedNetwork(sysrepo::S_Session session,
134 const std::string& model);
135#else
136 TranslatorSharedNetwork(S_Session session, const std::string& model);
137#endif
138
140 virtual ~TranslatorSharedNetwork();
141
147 isc::data::ElementPtr getSharedNetwork(const std::string& xpath);
148
153 void setSharedNetwork(const std::string& xpath,
155
156protected:
163 isc::data::ElementPtr getSharedNetworkKea(const std::string& xpath,
164 const std::string& subsel);
165
172 void setSharedNetworkKea(const std::string& xpath,
174 const std::string& subsel);
175};
176
184public:
185
190#ifndef HAVE_PRE_0_7_6_SYSREPO
191 TranslatorSharedNetworks(sysrepo::S_Session session,
192 const std::string& model);
193#else
194 TranslatorSharedNetworks(S_Session session, const std::string& model);
195#endif
196
199
204 isc::data::ElementPtr getSharedNetworks(const std::string& xpath);
205
210 void setSharedNetworks(const std::string& xpath,
212
213protected:
220 void setSharedNetworksKea(const std::string& xpath,
222};
223
224}; // end of namespace isc::yang
225}; // end of namespace isc
226
227#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
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
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:23
boost::shared_ptr< Element > ElementPtr
Definition: data.h:22
Defines the logger used by the top-level component of kea-dhcp-ddns.