| Kea 3.0.2-git

adaptor_pool.h
Go to the documentation of this file.
1// Copyright (C) 2018-2022 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_ADAPTOR_POOL_H
8#define ISC_ADAPTOR_POOL_H 1
9
10#include <yang/adaptor.h>
11
12 namespace isc {
13 namespace yang {
14
27 class AdaptorPool {
28 public:
30 virtual ~AdaptorPool() = default;
31
36 static void canonizePool(isc::data::ElementPtr pool);
37
48 static void fromSubnet(const std::string& model,
49 isc::data::ConstElementPtr subnet,
50 isc::data::ConstElementPtr pools);
51
66 static void toSubnet(const std::string& model,
67 isc::data::ElementPtr subnet,
68 isc::data::ConstElementPtr pools);
69
70 protected:
77 static void fromSubnetIetf6(isc::data::ConstElementPtr subnet,
78 isc::data::ConstElementPtr pools);
79
86 static void toSubnetIetf6(isc::data::ElementPtr subnet,
87 isc::data::ConstElementPtr pools);
88}; // AdaptorPool
89
90} // namespace yang
91} // namespace isc
92
93#endif // ISC_ADAPTOR_POOL_H
adaptor.h
isc::yang::AdaptorPool
JSON adaptor for pools between canonical Kea and YANG models.
Definition adaptor_pool.h:27
isc::yang::AdaptorPool::toSubnetIetf6
static void toSubnetIetf6(isc::data::ElementPtr subnet, isc::data::ConstElementPtr pools)
To subnet for ietf-dhcpv6-server.
Definition adaptor_pool.cc:75
isc::yang::AdaptorPool::fromSubnetIetf6
static void fromSubnetIetf6(isc::data::ConstElementPtr subnet, isc::data::ConstElementPtr pools)
From subnets for ietf-dhcpv6-server.
Definition adaptor_pool.cc:55
isc::yang::AdaptorPool::~AdaptorPool
virtual ~AdaptorPool()=default
Destructor.
isc::yang::AdaptorPool::toSubnet
static void toSubnet(const std::string &model, isc::data::ElementPtr subnet, isc::data::ConstElementPtr pools)
Move parameters from pools to the subnet.
Definition adaptor_pool.cc:63
isc::yang::AdaptorPool::fromSubnet
static void fromSubnet(const std::string &model, isc::data::ConstElementPtr subnet, isc::data::ConstElementPtr pools)
Moves parameters from subnets to pools.
Definition adaptor_pool.cc:43
isc::yang::AdaptorPool::canonizePool
static void canonizePool(isc::data::ElementPtr pool)
Canonize pool.
Definition adaptor_pool.cc:21
isc::data::ConstElementPtr
boost::shared_ptr< const Element > ConstElementPtr
Definition data.h:29
isc::data::ElementPtr
boost::shared_ptr< Element > ElementPtr
Definition data.h:28
isc::yang
Definition adaptor.cc:17
isc
Defines the logger used by the top-level component of kea-lfc.
Definition agent_parser.cc:148