![]() |
Kea 2.2.0
|
DHCP configuration translation between YANG and JSON. More...
#include <translator_config.h>
Inheritance diagram for isc::yang::TranslatorConfig:Public Member Functions | |
| TranslatorConfig (sysrepo::S_Session session, const std::string &model) | |
| Constructor. More... | |
| virtual | ~TranslatorConfig () |
| Destructor. More... | |
| isc::data::ElementPtr | getConfig () |
| Get and translate the whole DHCP server configuration from YANG to JSON. More... | |
| void | setConfig (isc::data::ConstElementPtr elem) |
| Translate and sets the DHCP server configuration from JSON to YANG. More... | |
Public Member Functions inherited from isc::yang::TranslatorControlSocket | |
| TranslatorControlSocket (sysrepo::S_Session session, const std::string &model) | |
| Constructor. More... | |
| virtual | ~TranslatorControlSocket () |
| Destructor. More... | |
| isc::data::ConstElementPtr | getControlSocket (const std::string &xpath) |
| Get and translate a control socket from YANG to JSON. More... | |
| void | setControlSocket (const std::string &xpath, isc::data::ConstElementPtr elem) |
| Translate and set control socket from JSON to YANG. More... | |
Public Member Functions inherited from isc::yang::TranslatorBasic | |
| TranslatorBasic (sysrepo::S_Session session, const std::string &model) | |
| Constructor. More... | |
| virtual | ~TranslatorBasic () |
| Destructor. More... | |
| void | checkAndGetLeaf (isc::data::ElementPtr &storage, const std::string &xpath, const std::string &name) |
| Retrieves an item and stores it in the specified storage. More... | |
| void | checkAndSetLeaf (isc::data::ConstElementPtr const &from, std::string const &xpath, std::string const &name, sr_type_t const type) |
| Get an element from given ElementPtr node and set it in sysrepo at given xpath. More... | |
| void | delItem (const std::string &xpath) |
| Delete basic value from YANG. More... | |
| template<typename functor_t > | |
| void | forAll (std::string const &xpath, functor_t f) |
| Run a function for a node and all its children. More... | |
| isc::data::ElementPtr | getItem (const std::string &xpath) |
| Get and translate basic value from YANG to JSON. More... | |
| isc::data::ElementPtr | getItems (const std::string &xpath) |
| Get and translate a list of basic values from YANG to JSON. More... | |
| template<typename T > | |
| isc::data::ElementPtr | getList (std::string const &xpath, T &t, isc::data::ElementPtr(T::*f)(std::string const &xpath)) |
| Retrieve a list as ElementPtr from sysrepo from a certain xpath. More... | |
| sysrepo::S_Vals | getValuesFromItems (std::string const &xpath) |
| Get the values of all siblings at a certain xpath. More... | |
| void | setItem (const std::string &xpath, isc::data::ConstElementPtr elem, sr_type_t type) |
| Translate and set basic value from JSON to YANG. More... | |
Public Member Functions inherited from isc::yang::TranslatorDatabases | |
| TranslatorDatabases (sysrepo::S_Session session, const std::string &model) | |
| Constructor. More... | |
| virtual | ~TranslatorDatabases () |
| Destructor. More... | |
| isc::data::ConstElementPtr | getDatabases (const std::string &xpath) |
| Get and translate database accesses from YANG to JSON. More... | |
| void | setDatabases (const std::string &xpath, isc::data::ConstElementPtr elem) |
| Translate and set database accesses from JSON to YANG. More... | |
Public Member Functions inherited from isc::yang::TranslatorDatabase | |
| TranslatorDatabase (sysrepo::S_Session session, const std::string &model) | |
| Constructor. More... | |
| virtual | ~TranslatorDatabase () |
| Destructor. More... | |
| isc::data::ElementPtr | getDatabase (const std::string &xpath) |
| Get and translate a database access from YANG to JSON. More... | |
| void | setDatabase (const std::string &xpath, isc::data::ConstElementPtr elem, bool skip=false) |
| Translate and set database access from JSON to YANG. More... | |
Public Member Functions inherited from isc::yang::TranslatorClasses | |
| TranslatorClasses (sysrepo::S_Session session, const std::string &model) | |
| Constructor. More... | |
| virtual | ~TranslatorClasses () |
| Destructor. More... | |
| isc::data::ConstElementPtr | getClasses (const std::string &xpath) |
| Get and translate client classes from YANG to JSON. More... | |
| void | setClasses (const std::string &xpath, isc::data::ConstElementPtr elem) |
| Translate and set client classes from JSON to YANG. More... | |
Public Member Functions inherited from isc::yang::TranslatorClass | |
| TranslatorClass (sysrepo::S_Session session, const std::string &model) | |
| Constructor. More... | |
| virtual | ~TranslatorClass () |
| Destructor. More... | |
| isc::data::ElementPtr | getClass (const std::string &xpath) |
| Get and translate a client class from YANG to JSON. More... | |
| void | setClass (const std::string &xpath, isc::data::ConstElementPtr elem) |
| Translate and set client class from JSON to YANG. More... | |
Public Member Functions inherited from isc::yang::TranslatorOptionDataList | |
| TranslatorOptionDataList (sysrepo::S_Session session, const std::string &model) | |
| Constructor. More... | |
| virtual | ~TranslatorOptionDataList () |
| Destructor. More... | |
| isc::data::ConstElementPtr | getOptionDataList (const std::string &xpath) |
| Get and translate option data list from YANG to JSON. More... | |
| void | setOptionDataList (const std::string &xpath, isc::data::ConstElementPtr elem) |
| Translate and set option data list from JSON to YANG. More... | |
Public Member Functions inherited from isc::yang::TranslatorOptionData | |
| TranslatorOptionData (sysrepo::S_Session session, const std::string &model) | |
| Constructor. More... | |
| virtual | ~TranslatorOptionData () |
| Destructor. More... | |
| isc::data::ElementPtr | getOptionData (const std::string &xpath) |
| Get and translate an option data from YANG to JSON. More... | |
| void | setOptionData (const std::string &xpath, isc::data::ConstElementPtr elem) |
| Translate and set option data from JSON to YANG. More... | |
Public Member Functions inherited from isc::yang::TranslatorOptionDefList | |
| TranslatorOptionDefList (sysrepo::S_Session session, const std::string &model) | |
| Constructor. More... | |
| virtual | ~TranslatorOptionDefList () |
| Destructor. More... | |
| isc::data::ConstElementPtr | getOptionDefList (const std::string &xpath) |
| Get and translate option definition list from YANG to JSON. More... | |
| void | setOptionDefList (const std::string &xpath, isc::data::ConstElementPtr elem) |
| Translate and set option definition list from JSON to YANG. More... | |
Public Member Functions inherited from isc::yang::TranslatorOptionDef | |
| TranslatorOptionDef (sysrepo::S_Session session, const std::string &model) | |
| Constructor. More... | |
| virtual | ~TranslatorOptionDef () |
| Destructor. More... | |
| isc::data::ElementPtr | getOptionDef (const std::string &xpath) |
| Get and translate an option definition from YANG to JSON. More... | |
| void | setOptionDef (const std::string &xpath, isc::data::ConstElementPtr elem) |
| Translate and set option definition from JSON to YANG. More... | |
Public Member Functions inherited from isc::yang::TranslatorSharedNetworks | |
| TranslatorSharedNetworks (sysrepo::S_Session session, const std::string &model) | |
| Constructor. More... | |
| virtual | ~TranslatorSharedNetworks () |
| Destructor. More... | |
| isc::data::ElementPtr | getSharedNetworks (const std::string &xpath) |
| Get and translate shared networks from YANG to JSON. More... | |
| void | setSharedNetworks (const std::string &xpath, isc::data::ConstElementPtr elem) |
| Translate and set shared networks from JSON to YANG. More... | |
Public Member Functions inherited from isc::yang::TranslatorSharedNetwork | |
| TranslatorSharedNetwork (sysrepo::S_Session session, const std::string &model) | |
| Constructor. More... | |
| virtual | ~TranslatorSharedNetwork () |
| Destructor. More... | |
| isc::data::ElementPtr | getSharedNetwork (const std::string &xpath) |
| Get and translate a shared network from YANG to JSON. More... | |
| void | setSharedNetwork (const std::string &xpath, isc::data::ConstElementPtr elem) |
| Translate and set shared network from JSON to YANG. More... | |
Public Member Functions inherited from isc::yang::TranslatorSubnets | |
| TranslatorSubnets (sysrepo::S_Session session, const std::string &model) | |
| Constructor. More... | |
| virtual | ~TranslatorSubnets () |
| Destructor. More... | |
| isc::data::ElementPtr | getSubnets (const std::string &xpath) |
| Get and translate subnets from YANG to JSON. More... | |
| void | setSubnets (const std::string &xpath, isc::data::ConstElementPtr elem) |
| Translate and set subnets from JSON to YANG. More... | |
Public Member Functions inherited from isc::yang::TranslatorSubnet | |
| TranslatorSubnet (sysrepo::S_Session session, const std::string &model) | |
| Constructor. More... | |
| virtual | ~TranslatorSubnet () |
| Destructor. More... | |
| isc::data::ElementPtr | getSubnet (const std::string &xpath) |
| Get and translate a subnet from YANG to JSON. More... | |
| void | setSubnet (const std::string &xpath, isc::data::ConstElementPtr elem) |
| Translate and set subnet from JSON to YANG. More... | |
Public Member Functions inherited from isc::yang::TranslatorPools | |
| TranslatorPools (sysrepo::S_Session session, const std::string &model) | |
| Constructor. More... | |
| virtual | ~TranslatorPools () |
| Destructor. More... | |
| isc::data::ElementPtr | getPools (const std::string &xpath) |
| Get and translate pools from YANG to JSON. More... | |
| void | setPools (const std::string &xpath, isc::data::ConstElementPtr elem) |
| Translate and set (address) pools from JSON to YANG. More... | |
Public Member Functions inherited from isc::yang::TranslatorPool | |
| TranslatorPool (sysrepo::S_Session session, const std::string &model) | |
| Constructor. More... | |
| virtual | ~TranslatorPool () |
| Destructor. More... | |
| isc::data::ElementPtr | getPool (const std::string &xpath) |
| Get and translate a pool from YANG to JSON. More... | |
| void | setPool (const std::string &xpath, isc::data::ConstElementPtr elem) |
| Translate and set (address) pool from JSON to YANG. More... | |
Public Member Functions inherited from isc::yang::TranslatorPdPools | |
| TranslatorPdPools (sysrepo::S_Session session, const std::string &model) | |
| Constructor. More... | |
| virtual | ~TranslatorPdPools () |
| Destructor. More... | |
| isc::data::ElementPtr | getPdPools (const std::string &xpath) |
| Get and translate pd-pools from YANG to JSON. More... | |
| void | setPdPools (const std::string &xpath, isc::data::ConstElementPtr elem) |
| Translate and set pd-pools from JSON to YANG. More... | |
Public Member Functions inherited from isc::yang::TranslatorPdPool | |
| TranslatorPdPool (sysrepo::S_Session session, const std::string &model) | |
| Constructor. More... | |
| virtual | ~TranslatorPdPool () |
| Destructor. More... | |
| isc::data::ElementPtr | getPdPool (const std::string &xpath) |
| Get and translate a pd-pool from YANG to JSON. More... | |
| void | setPdPool (const std::string &xpath, isc::data::ConstElementPtr elem) |
| Translate and set pd-pool from JSON to YANG. More... | |
Public Member Functions inherited from isc::yang::TranslatorHosts | |
| TranslatorHosts (sysrepo::S_Session session, const std::string &model) | |
| Constructor. More... | |
| virtual | ~TranslatorHosts () |
| Destructor. More... | |
| isc::data::ElementPtr | getHosts (const std::string &xpath) |
| Get and translate host reservations from YANG to JSON. More... | |
| void | setHosts (const std::string &xpath, isc::data::ConstElementPtr elem) |
| Translate and set (address) host reservations from JSON to YANG. More... | |
Public Member Functions inherited from isc::yang::TranslatorHost | |
| TranslatorHost (sysrepo::S_Session session, const std::string &model) | |
| Constructor. More... | |
| virtual | ~TranslatorHost () |
| Destructor. More... | |
| isc::data::ElementPtr | getHost (const std::string &xpath) |
| Get and translate a host reservation from YANG to JSON. More... | |
| void | setHost (const std::string &xpath, isc::data::ConstElementPtr elem) |
| Translate and set host reservation from JSON to YANG. More... | |
Public Member Functions inherited from isc::yang::TranslatorLoggers | |
| TranslatorLoggers (sysrepo::S_Session session, const std::string &model) | |
| Constructor. More... | |
| virtual | ~TranslatorLoggers () |
| Destructor. More... | |
| isc::data::ConstElementPtr | getLoggers (const std::string &xpath) |
| Get and translate loggeres from YANG to JSON. More... | |
| void | setLoggers (const std::string &xpath, isc::data::ConstElementPtr elem) |
| Translate and set loggeres from JSON to YANG. More... | |
Public Member Functions inherited from isc::yang::TranslatorLogger | |
| TranslatorLogger (sysrepo::S_Session session, const std::string &model) | |
| Constructor. More... | |
| virtual | ~TranslatorLogger () |
| Destructor. More... | |
| isc::data::ElementPtr | getLogger (const std::string &xpath) |
| Get and translate a logger from YANG to JSON. More... | |
| void | setLogger (const std::string &xpath, isc::data::ConstElementPtr elem) |
| Translate and set logger from JSON to YANG. More... | |
Protected Member Functions | |
| void | delConfigIetf6 () |
| delConfig for ietf-dhcpv6-server. More... | |
| void | delConfigKea () |
| delConfig for kea-dhcp[46]-server. More... | |
| isc::data::ElementPtr | getConfigControlKea (const std::string &xpath) |
| Retrieves configuration control from sysrepo. More... | |
| isc::data::ElementPtr | getConfigIetf6 () |
| getConfig for ietf-dhcpv6-server. More... | |
| isc::data::ElementPtr | getConfigKea4 () |
| getConfig for kea-dhcp4-server. More... | |
| isc::data::ElementPtr | getConfigKea6 () |
| getConfig for kea-dhcp6-server. More... | |
| isc::data::ElementPtr | getDdnsKea (const std::string &xpath) |
| Retrieves DDNS configuration from sysrepo. More... | |
| isc::data::ElementPtr | getExpiredKea (const std::string &xpath) |
| Retrieves expired leases processing parameters from sysrepo. More... | |
| isc::data::ElementPtr | getHook (const std::string &xpath) |
| isc::data::ElementPtr | getHooksKea (const std::string &xpath) |
| Retrieves hooks configuration from sysrepo. More... | |
| isc::data::ElementPtr | getServerKeaDhcp4 () |
| getServer for kea-dhcp4-server:config. More... | |
| isc::data::ElementPtr | getServerKeaDhcp6 () |
| getServer for kea-dhcp6-server:config. More... | |
| isc::data::ElementPtr | getServerKeaDhcpCommon (const std::string &xpath) |
| getServer common part for kea-dhcp[46]-server:config. More... | |
| void | setConfigIetf6 (isc::data::ConstElementPtr elem) |
| setConfig for ietf-dhcpv6-server. More... | |
| void | setConfigKea4 (isc::data::ConstElementPtr elem) |
| setConfig for kea-dhcp[46]-server. More... | |
| void | setConfigKea6 (isc::data::ConstElementPtr elem) |
| setConfig for kea-dhcp6-server. More... | |
| void | setServerKeaDhcp4 (isc::data::ConstElementPtr elem) |
| setServer for kea-dhcp4-server:config. More... | |
| void | setServerKeaDhcp6 (isc::data::ConstElementPtr elem) |
| setServer for kea-dhcp6-server:config. More... | |
| void | setServerKeaDhcpCommon (const std::string &xpath, isc::data::ConstElementPtr elem) |
| setServer common part for kea-dhcp[46]-server:config. More... | |
Protected Member Functions inherited from isc::yang::TranslatorControlSocket | |
| isc::data::ElementPtr | getControlSocketKea (const std::string &xpath) |
| getControlSocket JSON for kea models. More... | |
| void | setControlSocketKea (const std::string &xpath, isc::data::ConstElementPtr elem) |
| setControlSocket for kea models. More... | |
Protected Member Functions inherited from isc::yang::TranslatorDatabases | |
| isc::data::ElementPtr | getDatabasesKea (const std::string &xpath) |
| getDatabases JSON for kea-dhcp[46]-server models. More... | |
| void | setDatabasesKea (const std::string &xpath, isc::data::ConstElementPtr elem) |
| setDatabases for kea-dhcp[46]-server models. More... | |
Protected Member Functions inherited from isc::yang::TranslatorDatabase | |
| isc::data::ElementPtr | getDatabaseKea (const std::string &xpath) |
| getDatabase JSON for kea-dhcp[46]-server models. More... | |
| void | setDatabaseKea (const std::string &xpath, isc::data::ConstElementPtr elem, bool skip) |
| setDatabase for kea-dhcp[46]-server models. More... | |
Protected Member Functions inherited from isc::yang::TranslatorClasses | |
| isc::data::ElementPtr | getClassesKea (const std::string &xpath) |
| getClasses JSON for kea-dhcp[46]. More... | |
| void | setClassesKea (const std::string &xpath, isc::data::ConstElementPtr elem) |
| setClasses for kea-dhcp[46]. More... | |
Protected Member Functions inherited from isc::yang::TranslatorClass | |
| isc::data::ElementPtr | getClassKea (const std::string &xpath) |
| getClass JSON for kea-dhcp[46]. More... | |
| void | setClassKea (const std::string &xpath, isc::data::ConstElementPtr elem) |
| setClass for kea-dhcp[46]. More... | |
Protected Member Functions inherited from isc::yang::TranslatorOptionDataList | |
| isc::data::ConstElementPtr | getOptionDataListKea (const std::string &xpath) |
| getOptionDataList for kea-dhcp[46]. More... | |
| void | setOptionDataListKea (const std::string &xpath, isc::data::ConstElementPtr elem) |
| setOptionDataList for kea-dhcp[46]. More... | |
Protected Member Functions inherited from isc::yang::TranslatorOptionData | |
| isc::data::ElementPtr | getOptionDataKea (const std::string &xpath) |
| getOptionData JSON for kea-dhcp[46]. More... | |
| void | setOptionDataKea (const std::string &xpath, isc::data::ConstElementPtr elem) |
| setOptionData for kea-dhcp[46]. More... | |
Protected Member Functions inherited from isc::yang::TranslatorOptionDefList | |
| isc::data::ConstElementPtr | getOptionDefListKea (const std::string &xpath) |
| getOptionDefList implementation specific to kea-dhcp[46]-server models. More... | |
| void | setOptionDefListKea (const std::string &xpath, isc::data::ConstElementPtr elem) |
| setOptionDefList implementation specific to kea-dhcp[46]-server models. More... | |
Protected Member Functions inherited from isc::yang::TranslatorOptionDef | |
| isc::data::ElementPtr | getOptionDefKea (const std::string &xpath) |
| getOptionDef implementation specific to kea-dhcp[46]-server models. More... | |
| void | setOptionDefKea (const std::string &xpath, isc::data::ConstElementPtr elem) |
| setOptionDef implementation specific to kea-dhcp[46]-server models. More... | |
Protected Member Functions inherited from isc::yang::TranslatorSharedNetworks | |
| void | setSharedNetworksKea (const std::string &xpath, isc::data::ConstElementPtr elem) |
| setSharedNetworks for kea-dhcp4-server and kea-dhcp6-server More... | |
Protected Member Functions inherited from isc::yang::TranslatorSharedNetwork | |
| isc::data::ElementPtr | getSharedNetworkKea (const std::string &xpath, const std::string &subsel) |
| getSharedNetwork for kea-dhcp4-server and kea-dhcp6-server models More... | |
| void | setSharedNetworkKea (const std::string &xpath, isc::data::ConstElementPtr elem, const std::string &subsel) |
| setSharedNetwork for kea-dhcp4-server and kea-dhcp6-server models More... | |
Protected Member Functions inherited from isc::yang::TranslatorSubnets | |
| isc::data::ElementPtr | getSubnetsCommon (const std::string &xpath, const std::string &subsel) |
| getSubnets common part. More... | |
| void | setSubnetsIetf6 (const std::string &xpath, isc::data::ConstElementPtr elem) |
| setSubnets for ietf-dhcpv6-server. More... | |
| void | setSubnetsKea (const std::string &xpath, isc::data::ConstElementPtr elem, const std::string &subsel) |
| setSubnets for kea-dhcp[46]-server. More... | |
Protected Member Functions inherited from isc::yang::TranslatorSubnet | |
| isc::data::ElementPtr | getSubnetIetf6 (const std::string &xpath) |
| getSubnet for ietf-dhcpv6-server. More... | |
| isc::data::ElementPtr | getSubnetKea (const std::string &xpath) |
| getSubnet for kea-dhcp[46]-server. More... | |
| void | setSubnetIetf6 (const std::string &xpath, isc::data::ConstElementPtr elem) |
| setSubnet for ietf-dhcpv6-server. More... | |
| void | setSubnetKea (const std::string &xpath, isc::data::ConstElementPtr elem) |
| setSubnet for kea-dhcp[46]-server. More... | |
Protected Member Functions inherited from isc::yang::TranslatorPools | |
| isc::data::ElementPtr | getPoolsIetf (const std::string &xpath) |
| getPools for ietf-dhcpv6-server. More... | |
| isc::data::ElementPtr | getPoolsKea (const std::string &xpath) |
| getPools for kea-dhcp[46]-server. More... | |
| void | setPoolsByAddresses (const std::string &xpath, isc::data::ConstElementPtr elem) |
| setPools using address pair. More... | |
| void | setPoolsById (const std::string &xpath, isc::data::ConstElementPtr elem) |
| setPools using pool-id. More... | |
Protected Member Functions inherited from isc::yang::TranslatorPool | |
| isc::data::ElementPtr | getPoolIetf6 (const std::string &xpath) |
| getPool for ietf-dhcpv6-server. More... | |
| isc::data::ElementPtr | getPoolKea (const std::string &xpath) |
| getPool for kea-dhcp[46]-server. More... | |
| void | setPoolIetf6 (const std::string &xpath, isc::data::ConstElementPtr elem) |
| setPool for ietf-dhcpv6-server. More... | |
| void | setPoolKea (const std::string &xpath, isc::data::ConstElementPtr elem) |
| setPool for kea-dhcp[46]-server. More... | |
Protected Member Functions inherited from isc::yang::TranslatorPdPools | |
| isc::data::ElementPtr | getPdPoolsCommon (const std::string &xpath) |
| getPdPools common part. More... | |
| void | setPdPoolsId (const std::string &xpath, isc::data::ConstElementPtr elem) |
| setPdPools using pool-id. More... | |
| void | setPdPoolsPrefix (const std::string &xpath, isc::data::ConstElementPtr elem) |
| setPdPools using prefix. More... | |
Protected Member Functions inherited from isc::yang::TranslatorPdPool | |
| isc::data::ElementPtr | getPdPoolIetf6 (const std::string &xpath) |
| getPdPool for ietf-dhcpv6-server. More... | |
| isc::data::ElementPtr | getPdPoolKea (const std::string &xpath) |
| getPdPool for kea-dhcp6-server. More... | |
| void | setPdPoolIetf6 (const std::string &xpath, isc::data::ConstElementPtr elem) |
| setPdPool for ietf-dhcpv6-server. More... | |
| void | setPdPoolKea (const std::string &xpath, isc::data::ConstElementPtr elem) |
| setPdPool for kea-dhcp6-server. More... | |
Protected Member Functions inherited from isc::yang::TranslatorHosts | |
| void | setHostsKea (const std::string &xpath, isc::data::ConstElementPtr elem) |
| setHosts for kea-dhcp[46]. More... | |
Protected Member Functions inherited from isc::yang::TranslatorHost | |
| isc::data::ElementPtr | getHostKea (const std::string &xpath) |
| getHost for kea-dhcp[46]-server models. More... | |
| void | setHostKea (const std::string &xpath, isc::data::ConstElementPtr elem) |
| setHost for kea-dhcp[46]-server models. More... | |
Protected Member Functions inherited from isc::yang::TranslatorLoggers | |
| isc::data::ElementPtr | getLoggersKea (const std::string &xpath) |
| getLoggers JSON for loggers. More... | |
| void | setLoggersKea (const std::string &xpath, isc::data::ConstElementPtr elem) |
| setLoggers for loggers. More... | |
Protected Member Functions inherited from isc::yang::TranslatorLogger | |
| isc::data::ElementPtr | getLoggerKea (const std::string &xpath) |
| getLogger JSON for loggers. More... | |
| isc::data::ElementPtr | getOutputOption (const std::string &xpath) |
| Get and translate an output option from YANG to JSON. More... | |
| isc::data::ElementPtr | getOutputOptions (const std::string &xpath) |
| Get and translate output options from YANG to JSON. More... | |
| void | setLoggerKea (const std::string &xpath, isc::data::ConstElementPtr elem) |
| setLogger for loggers. More... | |
| void | setOutputOption (const std::string &xpath, isc::data::ConstElementPtr elem) |
| Translate and set an output option from JSON to YANG. More... | |
| void | setOutputOptions (const std::string &xpath, isc::data::ConstElementPtr elem) |
| Translate and set output options from JSON to YANG. More... | |
Additional Inherited Members | |
Static Public Member Functions inherited from isc::yang::TranslatorBasic | |
| static sysrepo::S_Val | value (isc::data::ConstElementPtr elem, sr_type_t type) |
| Translate basic value from JSON to YANG. More... | |
| static isc::data::ElementPtr | value (sysrepo::S_Val s_val) |
| Translate basic value from YANG to JSON. More... | |
Static Public Member Functions inherited from isc::yang::TranslatorPool | |
| static void | getAddresses (const std::string &prefix, std::string &start_address, std::string &end_address) |
| Get start and end addresses from prefix. More... | |
Protected Attributes inherited from isc::yang::TranslatorBasic | |
| std::string | model_ |
| The model. More... | |
| sysrepo::S_Session | session_ |
| The sysrepo session. More... | |
DHCP configuration translation between YANG and JSON.
This translator supports kea-dhcp4-server, kea-dhcp6-server and partially ietf-dhcpv6-server. JSON syntax for kea-dhcp4 is:
YANG syntax for kea-dhcp4-server:config is:
Example of kea-dhcp6 simple configuration:
The same configuration wrote into YANG datastore using setConfig() with the kea-dhcp4-model and exported to XML format:
JSON syntax for kea-dhcp6 is:
YANG syntax for kea-dhcp6-server:config is:
Example of kea-dhcp6 simple configuration:
The same configuration wrote into YANG datastore using setConfig() with the kea-dhcp6-model and exported to XML format:
Inheritance graph between translators is:
+-----------------------------------------+ | | +------------------------------+ | | | | +----------+-------------------+----------+ | | | | | | +---------+----------+ | | | | |
config +- shared +- subnet +- pool –+- option -+ basic | network (list) | (list) | data | | (list) | | (list) | | | | | | +- pd -—+ | | | pool | | | | (list) | | | | | | +-----------------—+- host –+ | | (liat) | | | | | | +-----------------—+-------—+ | | | +- class -+- option -------------------—+ | (list) | def | | | (list) | +------—+ | | |
'XXX (list)' stands for 'XXX list — XXX' which is a common motif (only database shows direct dependencies on both the list and the element)
A translator class for converting the config between YANG and JSON.
Currently supports the following models:
Definition at line 405 of file translator_config.h.
| isc::yang::TranslatorConfig::TranslatorConfig | ( | sysrepo::S_Session | session, |
| const std::string & | model | ||
| ) |
Constructor.
| session | Sysrepo session. |
| model | Model name. |
Definition at line 21 of file translator_config.cc.
|
virtual |
Destructor.
Definition at line 46 of file translator_config.cc.
|
protected |
delConfig for ietf-dhcpv6-server.
Definition at line 454 of file translator_config.cc.
References isc::yang::TranslatorBasic::delItem(), and isc::yang::TranslatorBasic::model_.
Referenced by setConfig().
Here is the call graph for this function:
|
protected |
delConfig for kea-dhcp[46]-server.
Definition at line 473 of file translator_config.cc.
References isc::yang::TranslatorBasic::delItem(), and isc::yang::TranslatorBasic::model_.
Referenced by setConfig().
Here is the call graph for this function:| ElementPtr isc::yang::TranslatorConfig::getConfig | ( | ) |
Get and translate the whole DHCP server configuration from YANG to JSON.
| SysrepoError | when sysrepo raises an error. |
Definition at line 50 of file translator_config.cc.
References getConfigIetf6(), getConfigKea4(), getConfigKea6(), isc_throw, isc::yang::TranslatorBasic::model_, and isc::Exception::what().
Referenced by isc::netconf::NetconfAgent::change(), isc::netconf::NetconfAgent::done(), and isc::netconf::NetconfAgent::yangConfig().
Here is the call graph for this function:
|
protected |
Retrieves configuration control from sysrepo.
| xpath | path to configuration control. |
Definition at line 168 of file translator_config.cc.
References isc::yang::TranslatorBasic::checkAndGetLeaf(), and isc::yang::TranslatorDatabases::getDatabases().
Referenced by getServerKeaDhcpCommon().
Here is the call graph for this function:
|
protected |
getConfig for ietf-dhcpv6-server.
This implementation is very preliminary. It handles network-ranges only partially and nothing else.
| SysrepoError | when sysrepo raises an error. |
Definition at line 67 of file translator_config.cc.
References isc::yang::TranslatorSubnets::getSubnets(), and isc::yang::TranslatorBasic::model_.
Referenced by getConfig().
Here is the call graph for this function:
|
protected |
getConfig for kea-dhcp4-server.
| SysrepoError | when sysrepo raises an error. |
Definition at line 82 of file translator_config.cc.
References getServerKeaDhcp4().
Referenced by getConfig().
Here is the call graph for this function:
|
protected |
getConfig for kea-dhcp6-server.
| SysrepoError | when sysrepo raises an error. |
Definition at line 90 of file translator_config.cc.
References getServerKeaDhcp6().
Referenced by getConfig().
Here is the call graph for this function:
|
protected |
Retrieves DDNS configuration from sysrepo.
| xpath | path to dhcp-ddns configuration. |
Definition at line 135 of file translator_config.cc.
References isc::yang::TranslatorBasic::checkAndGetLeaf(), and isc::yang::TranslatorBasic::getItem().
Referenced by getServerKeaDhcpCommon().
Here is the call graph for this function:
|
protected |
Retrieves expired leases processing parameters from sysrepo.
| xpath | path to expired leases configuration. |
Definition at line 117 of file translator_config.cc.
References isc::yang::TranslatorBasic::checkAndGetLeaf().
Referenced by getServerKeaDhcpCommon().
Here is the call graph for this function:
|
protected |
Definition at line 97 of file translator_config.cc.
References isc::yang::TranslatorBasic::getItem().
Referenced by getHooksKea().
Here is the call graph for this function:
|
protected |
Retrieves hooks configuration from sysrepo.
| xpath | path to hooks configuration. |
Definition at line 112 of file translator_config.cc.
References getHook(), and isc::yang::TranslatorBasic::getList().
Referenced by getServerKeaDhcpCommon().
Here is the call graph for this function:
|
protected |
getServer for kea-dhcp4-server:config.
| SysrepoError | when sysrepo raises an error. |
Definition at line 314 of file translator_config.cc.
References isc::yang::TranslatorBasic::checkAndGetLeaf(), isc::yang::TranslatorBasic::getItem(), isc::yang::TranslatorBasic::getItems(), getServerKeaDhcpCommon(), and isc::yang::TranslatorSubnets::getSubnets().
Referenced by getConfigKea4().
Here is the call graph for this function:
|
protected |
getServer for kea-dhcp6-server:config.
| SysrepoError | when sysrepo raises an error. |
Definition at line 355 of file translator_config.cc.
References isc::yang::TranslatorBasic::checkAndGetLeaf(), isc::yang::TranslatorBasic::getItem(), isc::yang::TranslatorBasic::getItems(), getServerKeaDhcpCommon(), and isc::yang::TranslatorSubnets::getSubnets().
Referenced by getConfigKea6().
Here is the call graph for this function:
|
protected |
getServer common part for kea-dhcp[46]-server:config.
| xpath | The xpath of the server. |
Definition at line 185 of file translator_config.cc.
References isc::yang::TranslatorBasic::checkAndGetLeaf(), isc::yang::TranslatorClasses::getClasses(), getConfigControlKea(), isc::yang::TranslatorControlSocket::getControlSocket(), isc::yang::TranslatorDatabase::getDatabase(), isc::yang::TranslatorDatabases::getDatabases(), getDdnsKea(), getExpiredKea(), getHooksKea(), isc::yang::TranslatorHosts::getHosts(), isc::yang::TranslatorBasic::getItem(), isc::yang::TranslatorBasic::getItems(), isc::yang::TranslatorLoggers::getLoggers(), isc::yang::TranslatorOptionDataList::getOptionDataList(), isc::yang::TranslatorOptionDefList::getOptionDefList(), and isc::yang::TranslatorSharedNetworks::getSharedNetworks().
Referenced by getServerKeaDhcp4(), and getServerKeaDhcp6().
Here is the call graph for this function:| void isc::yang::TranslatorConfig::setConfig | ( | isc::data::ConstElementPtr | elem | ) |
Translate and sets the DHCP server configuration from JSON to YANG.
Null elem argument removes the config containers.
| elem | The JSON element. |
Definition at line 419 of file translator_config.cc.
References delConfigIetf6(), delConfigKea(), isc_throw, isc::yang::TranslatorBasic::model_, isc::yang::AdaptorConfig::preProcess4(), isc::yang::AdaptorConfig::preProcess6(), setConfigIetf6(), setConfigKea4(), setConfigKea6(), and isc::Exception::what().
Here is the call graph for this function:
|
protected |
setConfig for ietf-dhcpv6-server.
This implementation is very preliminary. It handles network-ranges only partially and nothing else.
| elem | The JSON element. |
| BadValue | on config without Dhcp6. |
Definition at line 459 of file translator_config.cc.
References isc_throw, isc::yang::TranslatorBasic::model_, and isc::yang::TranslatorSubnets::setSubnets().
Referenced by setConfig().
Here is the call graph for this function:
|
protected |
setConfig for kea-dhcp[46]-server.
| elem | The JSON element. |
Definition at line 478 of file translator_config.cc.
References setServerKeaDhcp4().
Referenced by setConfig().
Here is the call graph for this function:
|
protected |
setConfig for kea-dhcp6-server.
| elem | The JSON element. |
Definition at line 486 of file translator_config.cc.
References setServerKeaDhcp6().
Referenced by setConfig().
Here is the call graph for this function:
|
protected |
setServer for kea-dhcp4-server:config.
| elem | The JSON element. |
Definition at line 671 of file translator_config.cc.
References isc::yang::TranslatorBasic::checkAndSetLeaf(), isc::yang::Adaptor::getContext(), isc::yang::TranslatorBasic::setItem(), setServerKeaDhcpCommon(), and isc::yang::TranslatorSubnets::setSubnets().
Referenced by setConfigKea4().
Here is the call graph for this function:
|
protected |
setServer for kea-dhcp6-server:config.
| elem | The JSON element. |
Definition at line 709 of file translator_config.cc.
References isc::yang::TranslatorBasic::checkAndSetLeaf(), isc::yang::Adaptor::getContext(), isc::yang::TranslatorBasic::setItem(), setServerKeaDhcpCommon(), and isc::yang::TranslatorSubnets::setSubnets().
Referenced by setConfigKea6().
Here is the call graph for this function:
|
protected |
setServer common part for kea-dhcp[46]-server:config.
| xpath | The xpath of the server. |
| elem | The JSON element. |
Definition at line 494 of file translator_config.cc.
References isc::yang::TranslatorBasic::checkAndSetLeaf(), isc::data::copy(), isc::yang::Adaptor::getContext(), isc::yang::TranslatorClasses::setClasses(), isc::yang::TranslatorControlSocket::setControlSocket(), isc::yang::TranslatorDatabase::setDatabase(), isc::yang::TranslatorDatabases::setDatabases(), isc::yang::TranslatorHosts::setHosts(), isc::yang::TranslatorBasic::setItem(), isc::yang::TranslatorLoggers::setLoggers(), isc::yang::TranslatorOptionDataList::setOptionDataList(), isc::yang::TranslatorOptionDefList::setOptionDefList(), and isc::yang::TranslatorSharedNetworks::setSharedNetworks().
Referenced by setServerKeaDhcp4(), and setServerKeaDhcp6().
Here is the call graph for this function: