diff --git a/include/crm/common/Makefile.am b/include/crm/common/Makefile.am index 450fc8d8be..df9702344c 100644 --- a/include/crm/common/Makefile.am +++ b/include/crm/common/Makefile.am @@ -1,57 +1,58 @@ # # Copyright 2004-2025 the Pacemaker project contributors # # The version control history for this file may have further details. # # This source code is licensed under the GNU General Public License version 2 # or later (GPLv2+) WITHOUT ANY WARRANTY. # include $(top_srcdir)/mk/common.mk headerdir=$(pkgincludedir)/crm/common header_HEADERS = acl.h \ acl_compat.h \ actions.h \ agents.h \ + agents_compat.h \ cib.h \ ipc.h \ ipc_client_compat.h \ ipc_controld.h \ ipc_pacemakerd.h \ ipc_schedulerd.h \ iso8601.h \ logging.h \ logging_compat.h \ mainloop.h \ nodes.h \ nvpair.h \ nvpair_compat.h \ options.h \ output.h \ probes.h \ resources.h \ results.h \ results_compat.h \ roles.h \ rules.h \ scheduler.h \ scheduler_types.h \ schemas.h \ scores.h \ scores_compat.h \ strings.h \ strings_compat.h \ util.h \ util_compat.h \ xml.h \ xml_compat.h \ xml_element.h \ xml_element_compat.h \ xml_io.h \ xml_io_compat.h \ xml_names.h \ xml_names_compat.h noinst_HEADERS = $(wildcard *internal.h) diff --git a/include/crm/common/agents.h b/include/crm/common/agents.h index e99a702f80..650bedaa58 100644 --- a/include/crm/common/agents.h +++ b/include/crm/common/agents.h @@ -1,77 +1,76 @@ /* * Copyright 2017-2025 the Pacemaker project contributors * * The version control history for this file may have further details. * * This source code is licensed under the GNU Lesser General Public License * version 2.1 or later (LGPLv2.1+) WITHOUT ANY WARRANTY. */ #ifndef PCMK__CRM_COMMON_AGENTS__H #define PCMK__CRM_COMMON_AGENTS__H #ifdef __cplusplus extern "C" { #endif /** * \file * \brief API related to resource agents * \ingroup core */ #include // uint32_t #include // Known (not necessarily supported) resource classes #define PCMK_RESOURCE_CLASS_OCF "ocf" #define PCMK_RESOURCE_CLASS_SERVICE "service" #define PCMK_RESOURCE_CLASS_LSB "lsb" #define PCMK_RESOURCE_CLASS_SYSTEMD "systemd" #define PCMK_RESOURCE_CLASS_STONITH "stonith" #define PCMK_RESOURCE_CLASS_ALERT "alert" /* Special stonith-class agent parameters interpreted directly by Pacemaker * (not including the pcmk_ACTION_{action,retries,timeout} parameters) */ #define PCMK_FENCING_ACTION_LIMIT "pcmk_action_limit" -#define PCMK_STONITH_ACTION_LIMIT PCMK_FENCING_ACTION_LIMIT #define PCMK_STONITH_DELAY_BASE "pcmk_delay_base" #define PCMK_STONITH_DELAY_MAX "pcmk_delay_max" #define PCMK_STONITH_HOST_ARGUMENT "pcmk_host_argument" #define PCMK_STONITH_HOST_CHECK "pcmk_host_check" #define PCMK_STONITH_HOST_LIST "pcmk_host_list" #define PCMK_STONITH_HOST_MAP "pcmk_host_map" #define PCMK_STONITH_PROVIDES "provides" #define PCMK_STONITH_STONITH_TIMEOUT "stonith-timeout" // OCF Resource Agent API standard version that this Pacemaker supports #define PCMK_OCF_MAJOR_VERSION "1" #define PCMK_OCF_MINOR_VERSION "1" #define PCMK_OCF_VERSION PCMK_OCF_MAJOR_VERSION "." PCMK_OCF_MINOR_VERSION // Capabilities supported by a resource agent standard enum pcmk_ra_caps { pcmk_ra_cap_none = 0U, pcmk_ra_cap_provider = (1U << 0), // Requires provider pcmk_ra_cap_status = (1U << 1), // Supports status instead of monitor pcmk_ra_cap_params = (1U << 2), // Supports parameters pcmk_ra_cap_unique = (1U << 3), // Supports unique clones pcmk_ra_cap_promotable = (1U << 4), // Supports promotable clones pcmk_ra_cap_stdin = (1U << 5), // Reads from standard input pcmk_ra_cap_fence_params = (1U << 6), // Supports pcmk_monitor_timeout, etc. pcmk_ra_cap_cli_exec = (1U << 7), // Supports execution by crm_resource }; uint32_t pcmk_get_ra_caps(const char *standard); char *crm_generate_ra_key(const char *standard, const char *provider, const char *type); int crm_parse_agent_spec(const char *spec, char **standard, char **provider, char **type); bool pcmk_stonith_param(const char *param); #ifdef __cplusplus } #endif #endif // PCMK__CRM_COMMON_AGENTS__H diff --git a/include/crm/common/agents_compat.h b/include/crm/common/agents_compat.h new file mode 100644 index 0000000000..a206ca05f6 --- /dev/null +++ b/include/crm/common/agents_compat.h @@ -0,0 +1,33 @@ +/* + * Copyright 2004-2025 the Pacemaker project contributors + * + * The version control history for this file may have further details. + * + * This source code is licensed under the GNU Lesser General Public License + * version 2.1 or later (LGPLv2.1+) WITHOUT ANY WARRANTY. + */ + +#ifndef PCMK__CRM_COMMON_AGENTS_COMPAT__H +#define PCMK__CRM_COMMON_AGENTS_COMPAT__H + +#ifdef __cplusplus +extern "C" { +#endif + +/** + * \file + * \brief Deprecated Pacemaker resource agents API + * \ingroup core + * \deprecated Do not include this header directly. The nvpair APIs in this + * header, and the header itself, will be removed in a future + * release. + */ + +//! \deprecated Use \c PCMK_FENCING_ACTION_LIMIT instead +#define PCMK_STONITH_ACTION_LIMIT PCMK_FENCING_ACTION_LIMIT + +#ifdef __cplusplus +} +#endif + +#endif // PCMK__CRM_COMMON_AGENTS_COMPAT__H