Kea 2.7.5
translator_config.h
Go to the documentation of this file.
1// Copyright (C) 2018-2024 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_CONFIG_H
8#define ISC_TRANSLATOR_CONFIG_H 1
9
10#include <yang/translator.h>
16
17namespace isc {
18namespace yang {
19
24
188
353
395
402class TranslatorConfig : virtual public TranslatorControlSocket,
403 virtual public TranslatorDatabases,
404 virtual public TranslatorClasses,
405 virtual public TranslatorSharedNetworks,
406 virtual public TranslatorLoggers {
407public:
412 TranslatorConfig(sysrepo::Session session, const std::string& model);
413
415 virtual ~TranslatorConfig() = default;
416
422
429
430protected:
439
441 void delConfigIetf6();
442
451
457
463
469 isc::data::ElementPtr getServerKeaDhcpCommon(libyang::DataNode const& data_node);
470
476
482
484 void delConfigKea();
485
490
495
500 void setServerKeaDhcpCommon(const std::string& xpath,
502
503 isc::data::ElementPtr getHook(libyang::DataNode const& data_node);
504
510 isc::data::ElementPtr getHooksKea(libyang::DataNode const& data_node);
511
517 isc::data::ElementPtr getExpiredKea(libyang::DataNode const& data_node);
518
524 isc::data::ElementPtr getDdnsKea(libyang::DataNode const& data_node);
525
531 isc::data::ElementPtr getConfigControlKea(libyang::DataNode const& data_node);
532
538 isc::data::ElementPtr getInterfacesKea(libyang::DataNode const& data_node);
539
544
549}; // TranslatorConfig
550
551} // namespace yang
552} // namespace isc
553
554#endif // ISC_TRANSLATOR_CONFIG_H
isc::data::ElementPtr getConfigKea4()
getConfig for kea-dhcp4-server.
isc::data::ElementPtr getHook(libyang::DataNode const &data_node)
void setServerKeaDhcpCommon(const std::string &xpath, isc::data::ConstElementPtr elem)
setServer common part for kea-dhcp[46]-server:config.
void delConfigKea()
delConfig for kea-dhcp[46]-server.
virtual ~TranslatorConfig()=default
Destructor.
isc::data::ElementPtr getExpiredKea(libyang::DataNode const &data_node)
Retrieves expired leases processing parameters from sysrepo.
isc::data::ElementPtr getServerKeaDhcp4()
getServer for kea-dhcp4-server:config.
void setConfigKea6(isc::data::ConstElementPtr elem)
setConfig for kea-dhcp6-server.
TranslatorConfig(sysrepo::Session session, const std::string &model)
Constructor.
void setConfigIetf6(isc::data::ConstElementPtr elem)
setConfig for ietf-dhcpv6-server.
isc::data::ElementPtr getDdnsKea(libyang::DataNode const &data_node)
Retrieves DDNS configuration from sysrepo.
isc::data::ElementPtr getInterfacesKea(libyang::DataNode const &data_node)
Retrieves interfaces configuration from sysrepo.
void setConfigKea4(isc::data::ConstElementPtr elem)
setConfig for kea-dhcp[46]-server.
void setConfig(isc::data::ElementPtr elem)
Translate and set the DHCP server configuration from JSON to YANG.
isc::data::ElementPtr getConfigControlKea(libyang::DataNode const &data_node)
Retrieves configuration control from sysrepo.
void setServerKeaDhcp6(isc::data::ConstElementPtr elem)
setServer for kea-dhcp6-server:config.
isc::data::ElementPtr getConfigKea6()
getConfig for kea-dhcp6-server.
isc::data::ElementPtr getConfigIetf6()
getConfig for ietf-dhcpv6-server.
void setServerKeaDhcp4(isc::data::ConstElementPtr elem)
setServer for kea-dhcp4-server:config.
isc::data::ElementPtr getServerKeaDhcp6()
getServer for kea-dhcp6-server:config.
void delConfigIetf6()
delConfig for ietf-dhcpv6-server.
isc::data::ElementPtr getConfig()
Translate the whole DHCP server configuration from YANG to JSON.
isc::data::ElementPtr getServerKeaDhcpCommon(libyang::DataNode const &data_node)
getServer common part for kea-dhcp[46]-server:config.
isc::data::ElementPtr getHooksKea(libyang::DataNode const &data_node)
Retrieves hooks configuration from sysrepo.
boost::shared_ptr< const Element > ConstElementPtr
Definition data.h:29
boost::shared_ptr< Element > ElementPtr
Definition data.h:28
Defines the logger used by the top-level component of kea-lfc.