| Kea 3.0.2-git

ha_service_states.h
Go to the documentation of this file.
1// Copyright (C) 2018-2021 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_SERVICE_STATES_H
8#define HA_SERVICE_STATES_H
9
10#include <util/state_model.h>
11#include <string>
12
13 namespace isc {
14 namespace ha {
15
17 const int HA_BACKUP_ST = util::StateModel::SM_DERIVED_STATE_MIN + 1;
18
20 const int HA_COMMUNICATION_RECOVERY_ST = util::StateModel::SM_DERIVED_STATE_MIN + 2;
21
23 const int HA_HOT_STANDBY_ST = util::StateModel::SM_DERIVED_STATE_MIN + 3;
24
26 const int HA_LOAD_BALANCING_ST = util::StateModel::SM_DERIVED_STATE_MIN + 4;
27
29 const int HA_IN_MAINTENANCE_ST = util::StateModel::SM_DERIVED_STATE_MIN + 5;
30
32 const int HA_PARTNER_DOWN_ST = util::StateModel::SM_DERIVED_STATE_MIN + 6;
33
35 const int HA_PARTNER_IN_MAINTENANCE_ST = util::StateModel::SM_DERIVED_STATE_MIN + 7;
36
38 const int HA_PASSIVE_BACKUP_ST = util::StateModel::SM_DERIVED_STATE_MIN + 8;
39
41 const int HA_READY_ST = util::StateModel::SM_DERIVED_STATE_MIN + 9;
42
44 const int HA_SYNCING_ST = util::StateModel::SM_DERIVED_STATE_MIN + 10;
45
47 const int HA_TERMINATED_ST = util::StateModel::SM_DERIVED_STATE_MIN + 11;
48
50 const int HA_WAITING_ST = util::StateModel::SM_DERIVED_STATE_MIN + 12;
51
54 const int HA_UNAVAILABLE_ST = util::StateModel::SM_DERIVED_STATE_MIN + 1000;
55
61std::string stateToString(int state);
62
68 int stringToState(const std::string& state_name);
69
70} // end of namespace isc::ha
71} // end of namespace isc
72
73#endif
isc::util::StateModel::SM_DERIVED_STATE_MIN
static const int SM_DERIVED_STATE_MIN
Value at which custom states in a derived class should begin.
Definition state_model.h:285
isc::ha
Definition command_creator.cc:20
isc::ha::HA_PASSIVE_BACKUP_ST
const int HA_PASSIVE_BACKUP_ST
In passive-backup state with a single active server and backup servers.
Definition ha_service_states.h:38
isc::ha::HA_HOT_STANDBY_ST
const int HA_HOT_STANDBY_ST
Hot standby state.
Definition ha_service_states.h:23
isc::ha::HA_COMMUNICATION_RECOVERY_ST
const int HA_COMMUNICATION_RECOVERY_ST
Communication recovery state.
Definition ha_service_states.h:20
isc::ha::HA_UNAVAILABLE_ST
const int HA_UNAVAILABLE_ST
Special state indicating that this server is unable to communicate with the partner.
Definition ha_service_states.h:54
isc::ha::HA_TERMINATED_ST
const int HA_TERMINATED_ST
HA service terminated state.
Definition ha_service_states.h:47
isc::ha::HA_IN_MAINTENANCE_ST
const int HA_IN_MAINTENANCE_ST
In maintenance state.
Definition ha_service_states.h:29
isc::ha::HA_LOAD_BALANCING_ST
const int HA_LOAD_BALANCING_ST
Load balancing state.
Definition ha_service_states.h:26
isc::ha::HA_PARTNER_DOWN_ST
const int HA_PARTNER_DOWN_ST
Partner down state.
Definition ha_service_states.h:32
isc::ha::HA_PARTNER_IN_MAINTENANCE_ST
const int HA_PARTNER_IN_MAINTENANCE_ST
Partner in-maintenance state.
Definition ha_service_states.h:35
isc::ha::HA_WAITING_ST
const int HA_WAITING_ST
Server waiting state, i.e. waiting for another server to be ready.
Definition ha_service_states.h:50
isc::ha::HA_BACKUP_ST
const int HA_BACKUP_ST
Backup state.
Definition ha_service_states.h:17
isc::ha::HA_SYNCING_ST
const int HA_SYNCING_ST
Synchronizing database state.
Definition ha_service_states.h:44
isc::ha::stateToString
std::string stateToString(int state)
Returns state name.
Definition ha_service_states.cc:14
isc::ha::HA_READY_ST
const int HA_READY_ST
Server ready state, i.e. synchronized database, can enable DHCP service.
Definition ha_service_states.h:41
isc::ha::stringToState
int stringToState(const std::string &state_name)
Returns state for a given name.
Definition ha_service_states.cc:49
isc
Defines the logger used by the top-level component of kea-lfc.
Definition agent_parser.cc:148
state_model.h
This file defines the class StateModel.