Kea: translator_shared_network.h Source File

| 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>
11#include <yang/translator_subnet.h>
12#include <list>
13
14namespace isc {
15namespace yang {
16
159
166 class TranslatorSharedNetwork : virtual public TranslatorSubnets {
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,
191 isc::data::ConstElementPtr elem);
192
193protected:
200 isc::data::ElementPtr getSharedNetworkKea(const std::string& xpath,
201 const std::string& subsel);
202
209 void setSharedNetworkKea(const std::string& xpath,
210 isc::data::ConstElementPtr elem,
211 const std::string& subsel);
212};
213
220 class TranslatorSharedNetworks : virtual public TranslatorSharedNetwork {
221public:
222
227 TranslatorSharedNetworks(sysrepo::S_Session session,
228 const std::string& model);
229
231 virtual ~TranslatorSharedNetworks();
232
237 isc::data::ElementPtr getSharedNetworks(const std::string& xpath);
238
243 void setSharedNetworks(const std::string& xpath,
244 isc::data::ConstElementPtr elem);
245
246protected:
253 void setSharedNetworksKea(const std::string& xpath,
254 isc::data::ConstElementPtr elem);
255};
256
257} // namespace yang
258} // namespace isc
259
260#endif // ISC_TRANSLATOR_SHARED_NETWORK_H
isc::yang::TranslatorSharedNetwork
Shared network translation between YANG and JSON.
Definition: translator_shared_network.h:166
isc::yang::TranslatorSharedNetwork::getSharedNetworkKea
isc::data::ElementPtr getSharedNetworkKea(const std::string &xpath, const std::string &subsel)
getSharedNetwork for kea-dhcp4-server and kea-dhcp6-server models
Definition: translator_shared_network.cc:57
isc::yang::TranslatorSharedNetwork::~TranslatorSharedNetwork
virtual ~TranslatorSharedNetwork()
Destructor.
Definition: translator_shared_network.cc:36
isc::yang::TranslatorSharedNetwork::TranslatorSharedNetwork
TranslatorSharedNetwork(sysrepo::S_Session session, const std::string &model)
Constructor.
Definition: translator_shared_network.cc:21
isc::yang::TranslatorSharedNetwork::setSharedNetworkKea
void setSharedNetworkKea(const std::string &xpath, isc::data::ConstElementPtr elem, const std::string &subsel)
setSharedNetwork for kea-dhcp4-server and kea-dhcp6-server models
Definition: translator_shared_network.cc:218
isc::yang::TranslatorSharedNetwork::setSharedNetwork
void setSharedNetwork(const std::string &xpath, isc::data::ConstElementPtr elem)
Translate and set shared network from JSON to YANG.
Definition: translator_shared_network.cc:198
isc::yang::TranslatorSharedNetwork::getSharedNetwork
isc::data::ElementPtr getSharedNetwork(const std::string &xpath)
Get and translate a shared network from YANG to JSON.
Definition: translator_shared_network.cc:40
isc::yang::TranslatorSharedNetworks
A translator class for converting a shared network list between YANG and JSON.
Definition: translator_shared_network.h:220
isc::yang::TranslatorSharedNetworks::getSharedNetworks
isc::data::ElementPtr getSharedNetworks(const std::string &xpath)
Get and translate shared networks from YANG to JSON.
Definition: translator_shared_network.cc:381
isc::yang::TranslatorSharedNetworks::setSharedNetworksKea
void setSharedNetworksKea(const std::string &xpath, isc::data::ConstElementPtr elem)
setSharedNetworks for kea-dhcp4-server and kea-dhcp6-server
Definition: translator_shared_network.cc:406
isc::yang::TranslatorSharedNetworks::TranslatorSharedNetworks
TranslatorSharedNetworks(sysrepo::S_Session session, const std::string &model)
Constructor.
Definition: translator_shared_network.cc:361
isc::yang::TranslatorSharedNetworks::~TranslatorSharedNetworks
virtual ~TranslatorSharedNetworks()
Destructor.
Definition: translator_shared_network.cc:377
isc::yang::TranslatorSharedNetworks::setSharedNetworks
void setSharedNetworks(const std::string &xpath, isc::data::ConstElementPtr elem)
Translate and set shared networks from JSON to YANG.
Definition: translator_shared_network.cc:387
isc::yang::TranslatorSubnets
A translator class for converting a subnet list between YANG and JSON.
Definition: translator_subnet.h:333
isc::data::ConstElementPtr
boost::shared_ptr< const Element > ConstElementPtr
Definition: data.h:27
isc::data::ElementPtr
boost::shared_ptr< Element > ElementPtr
Definition: data.h:24
isc
Defines the logger used by the top-level component of kea-lfc.
Definition: agent_parser.cc:143
translator.h
translator_subnet.h