Kea  1.5.0
translator_logger.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_LOGGER_H
8 #define ISC_TRANSLATOR_LOGGER_H 1
9 
10 #include <yang/translator.h>
11 #include <list>
12 
13 namespace isc {
14 namespace yang {
15 
85 
94 class TranslatorLogger : virtual public TranslatorBasic {
95 public:
96 
101 #ifndef HAVE_PRE_0_7_6_SYSREPO
102  TranslatorLogger(sysrepo::S_Session session, const std::string& model);
103 #else
104  TranslatorLogger(S_Session session, const std::string& model);
105 #endif
106 
108  virtual ~TranslatorLogger();
109 
115  isc::data::ElementPtr getLogger(const std::string& xpath);
116 
121  void setLogger(const std::string& xpath, isc::data::ConstElementPtr elem);
122 
123 protected:
129  isc::data::ElementPtr getOutputOption(const std::string& xpath);
130 
136  isc::data::ElementPtr getOutputOptions(const std::string& xpath);
137 
142  void setOutputOption(const std::string& xpath,
144 
150  void setOutputOptions(const std::string& xpath,
152 
158  isc::data::ElementPtr getLoggerKea(const std::string& xpath);
159 
164  void setLoggerKea(const std::string& xpath,
166 };
167 
172 class TranslatorLoggers : virtual public TranslatorLogger {
173 public:
174 
179 #ifndef HAVE_PRE_0_7_6_SYSREPO
180  TranslatorLoggers(sysrepo::S_Session session, const std::string& model);
181 #else
182  TranslatorLoggers(S_Session session, const std::string& model);
183 #endif
184 
186  virtual ~TranslatorLoggers();
187 
193  isc::data::ConstElementPtr getLoggers(const std::string& xpath);
194 
199  void setLoggers(const std::string& xpath,
201 
202 protected:
208  isc::data::ElementPtr getLoggersKea(const std::string& xpath);
209 
215  void setLoggersKea(const std::string& xpath,
217 };
218 
219 }; // end of namespace isc::yang
220 }; // end of namespace isc
221 
222 #endif // ISC_TRANSLATOR_LOGGER_H
TranslatorLoggers(sysrepo::S_Session session, const std::string &model)
Constructor.
Between YANG and JSON translator class for basic values.
Definition: translator.h:27
boost::shared_ptr< Element > ElementPtr
Definition: data.h:20
isc::data::ConstElementPtr getLoggers(const std::string &xpath)
Get and translate loggeres from YANG to JSON.
TranslatorLogger(sysrepo::S_Session session, const std::string &model)
Constructor.
isc::data::ElementPtr getOutputOption(const std::string &xpath)
Get and translate an output option from YANG to JSON.
void setLoggerKea(const std::string &xpath, isc::data::ConstElementPtr elem)
setLogger for kea-logging.
isc::data::ElementPtr getLoggerKea(const std::string &xpath)
getLogger JSON for kea-logging.
void setLoggersKea(const std::string &xpath, isc::data::ConstElementPtr elem)
setLoggers for kea-logging.
isc::data::ElementPtr getLoggersKea(const std::string &xpath)
getLoggers JSON for kea-logging.
A translator class for converting a logger list between YANG and JSON.
void setLogger(const std::string &xpath, isc::data::ConstElementPtr elem)
Translate and set logger from JSON to YANG.
boost::shared_ptr< const Element > ConstElementPtr
Definition: data.h:23
isc::data::ElementPtr getOutputOptions(const std::string &xpath)
Get and translate output options from YANG to JSON.
void setLoggers(const std::string &xpath, isc::data::ConstElementPtr elem)
Translate and set loggeres from JSON to YANG.
void setOutputOption(const std::string &xpath, isc::data::ConstElementPtr elem)
Translate and set an output option from JSON to YANG.
Logger translation between YANG and JSON.
Defines the logger used by the top-level component of kea-dhcp-ddns.
void setOutputOptions(const std::string &xpath, isc::data::ConstElementPtr elem)
Translate and set output options from JSON to YANG.
virtual ~TranslatorLogger()
Destructor.
virtual ~TranslatorLoggers()
Destructor.
isc::data::ElementPtr getLogger(const std::string &xpath)
Get and translate a logger from YANG to JSON.