Kea: ha_config_parser.h Source File

| Kea 3.2.0-git

ha_config_parser.h
Go to the documentation of this file.
1// Copyright (C) 2018-2023 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 HA_CONFIG_PARSER_H
8#define HA_CONFIG_PARSER_H
9
10#include <ha_config.h>
11#include <cc/data.h>
12#include <cc/simple_parser.h>
13#include <string>
14
15namespace isc {
16namespace ha {
17
19 class HAConfigParser : public data::SimpleParser {
20public:
21
27 static HAConfigMapperPtr parse(const data::ConstElementPtr& config);
28
29private:
30
37 static void parseAll(const HAConfigMapperPtr& config_storage,
38 const data::ConstElementPtr& config);
39
49 static void parseOne(const HAConfigMapperPtr& config_storage,
50 const data::ElementPtr& config);
51
58 template<typename T>
59 static T getAndValidateInteger(const data::ConstElementPtr& config,
60 const std::string& parameter_name);
61
70 static void logConfigStatus(const HAConfigMapperPtr& config_storage);
71
76 static void validateRelationships(const HAConfigMapperPtr& config_storage);
77};
78
79} // end of namespace isc::ha
80} // end of namespace isc
81
82#endif
isc::data::SimpleParser
A simple parser.
Definition lib/cc/simple_parser.h:68
isc::ha::HAConfigParser
Configuration parser for High Availability.
Definition ha_config_parser.h:19
isc::ha::HAConfigParser::parse
static HAConfigMapperPtr parse(const data::ConstElementPtr &config)
Parses HA configuration.
Definition ha_config_parser.cc:69
data.h
ha_config.h
simple_parser.h
isc::config
Definition command_interpreter.cc:23
isc::data::ConstElementPtr
boost::shared_ptr< const Element > ConstElementPtr
Definition data.h:30
isc::data::ElementPtr
boost::shared_ptr< Element > ElementPtr
Definition data.h:29
isc::ha
Definition command_creator.cc:20
isc::ha::HAConfigMapperPtr
boost::shared_ptr< HAConfigMapper > HAConfigMapperPtr
Pointer to an object mapping HAConfig to relationships.
Definition ha_config.h:43
isc
Defines the logger used by the top-level component of kea-lfc.
Definition check_exists_add.cc:18