diff options
author | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-17 07:45:40 +0000 |
---|---|---|
committer | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-17 07:45:40 +0000 |
commit | 07d7f4cfa4b10de87a31b68191036ff446add675 (patch) | |
tree | 7162524d8aaf1aef62d2f4fa51f595ed113981ff /tools/crm_resource.h | |
parent | Adding upstream version 2.1.6. (diff) | |
download | pacemaker-07d7f4cfa4b10de87a31b68191036ff446add675.tar.xz pacemaker-07d7f4cfa4b10de87a31b68191036ff446add675.zip |
Adding upstream version 2.1.7.upstream/2.1.7
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to '')
-rw-r--r-- | tools/crm_resource.h | 61 |
1 files changed, 34 insertions, 27 deletions
diff --git a/tools/crm_resource.h b/tools/crm_resource.h index dcd6c3d..dc86572 100644 --- a/tools/crm_resource.h +++ b/tools/crm_resource.h @@ -19,6 +19,7 @@ #include <crm/common/xml.h> #include <crm/common/mainloop.h> #include <crm/common/output_internal.h> +#include <crm/common/scheduler_internal.h> #include <crm/cib.h> #include <crm/common/attrd_internal.h> @@ -43,54 +44,56 @@ enum resource_check_flags { }; typedef struct resource_checks_s { - pe_resource_t *rsc; // Resource being checked + pcmk_resource_t *rsc; // Resource being checked uint32_t flags; // Group of enum resource_check_flags const char *lock_node; // Node that resource is shutdown-locked to, if any } resource_checks_t; -resource_checks_t *cli_check_resource(pe_resource_t *rsc, char *role_s, char *managed); +resource_checks_t *cli_check_resource(pcmk_resource_t *rsc, char *role_s, + char *managed); /* ban */ int cli_resource_prefer(pcmk__output_t *out, const char *rsc_id, const char *host, const char *move_lifetime, cib_t * cib_conn, int cib_options, - gboolean promoted_role_only); + gboolean promoted_role_only, const char *promoted_role); int cli_resource_ban(pcmk__output_t *out, const char *rsc_id, const char *host, - const char *move_lifetime, GList *allnodes, cib_t * cib_conn, - int cib_options, gboolean promoted_role_only); + const char *move_lifetime, cib_t *cib_conn, int cib_options, + gboolean promoted_role_only, const char *promoted_role); int cli_resource_clear(const char *rsc_id, const char *host, GList *allnodes, cib_t * cib_conn, int cib_options, bool clear_ban_constraints, gboolean force); int cli_resource_clear_all_expired(xmlNode *root, cib_t *cib_conn, int cib_options, const char *rsc, const char *node, gboolean promoted_role_only); /* print */ -void cli_resource_print_cts(pe_resource_t * rsc, pcmk__output_t *out); -void cli_resource_print_cts_constraints(pe_working_set_t * data_set); +void cli_resource_print_cts(pcmk_resource_t *rsc, pcmk__output_t *out); +void cli_resource_print_cts_constraints(pcmk_scheduler_t *scheduler); -int cli_resource_print(pe_resource_t *rsc, pe_working_set_t *data_set, bool expanded); +int cli_resource_print(pcmk_resource_t *rsc, pcmk_scheduler_t *scheduler, + bool expanded); int cli_resource_print_operations(const char *rsc_id, const char *host_uname, - bool active, pe_working_set_t * data_set); + bool active, pcmk_scheduler_t *scheduler); /* runtime */ -int cli_resource_check(pcmk__output_t *out, pe_resource_t *rsc, - pe_node_t *node); +int cli_resource_check(pcmk__output_t *out, pcmk_resource_t *rsc, + pcmk_node_t *node); int cli_resource_fail(pcmk_ipc_api_t *controld_api, const char *host_uname, - const char *rsc_id, pe_working_set_t *data_set); -GList *cli_resource_search(pe_resource_t *rsc, const char *requested_name, - pe_working_set_t *data_set); + const char *rsc_id, pcmk_scheduler_t *scheduler); +GList *cli_resource_search(pcmk_resource_t *rsc, const char *requested_name, + pcmk_scheduler_t *scheduler); int cli_resource_delete(pcmk_ipc_api_t *controld_api, const char *host_uname, - const pe_resource_t *rsc, const char *operation, + const pcmk_resource_t *rsc, const char *operation, const char *interval_spec, bool just_failures, - pe_working_set_t *data_set, gboolean force); + pcmk_scheduler_t *scheduler, gboolean force); int cli_cleanup_all(pcmk_ipc_api_t *controld_api, const char *node_name, const char *operation, const char *interval_spec, - pe_working_set_t *data_set); -int cli_resource_restart(pcmk__output_t *out, pe_resource_t *rsc, - const pe_node_t *node, const char *move_lifetime, + pcmk_scheduler_t *scheduler); +int cli_resource_restart(pcmk__output_t *out, pcmk_resource_t *rsc, + const pcmk_node_t *node, const char *move_lifetime, int timeout_ms, cib_t *cib, int cib_options, gboolean promoted_role_only, gboolean force); -int cli_resource_move(const pe_resource_t *rsc, const char *rsc_id, +int cli_resource_move(const pcmk_resource_t *rsc, const char *rsc_id, const char *host_name, const char *move_lifetime, - cib_t *cib, int cib_options, pe_working_set_t *data_set, + cib_t *cib, int cib_options, pcmk_scheduler_t *scheduler, gboolean promoted_role_only, gboolean force); crm_exit_t cli_resource_execute_from_params(pcmk__output_t *out, const char *rsc_name, const char *rsc_class, const char *rsc_prov, @@ -98,24 +101,28 @@ crm_exit_t cli_resource_execute_from_params(pcmk__output_t *out, const char *rsc GHashTable *params, GHashTable *override_hash, int timeout_ms, int resource_verbose, gboolean force, int check_level); -crm_exit_t cli_resource_execute(pe_resource_t *rsc, const char *requested_name, +crm_exit_t cli_resource_execute(pcmk_resource_t *rsc, + const char *requested_name, const char *rsc_action, GHashTable *override_hash, - int timeout_ms, cib_t *cib, pe_working_set_t *data_set, + int timeout_ms, cib_t *cib, + pcmk_scheduler_t *scheduler, int resource_verbose, gboolean force, int check_level); -int cli_resource_update_attribute(pe_resource_t *rsc, const char *requested_name, +int cli_resource_update_attribute(pcmk_resource_t *rsc, + const char *requested_name, const char *attr_set, const char *attr_set_type, const char *attr_id, const char *attr_name, const char *attr_value, gboolean recursive, cib_t *cib, int cib_options, gboolean force); -int cli_resource_delete_attribute(pe_resource_t *rsc, const char *requested_name, +int cli_resource_delete_attribute(pcmk_resource_t *rsc, + const char *requested_name, const char *attr_set, const char *attr_set_type, const char *attr_id, const char *attr_name, cib_t *cib, int cib_options, gboolean force); -int update_working_set_xml(pe_working_set_t *data_set, xmlNode **xml); +int update_scheduler_input(pcmk_scheduler_t *scheduler, xmlNode **xml); int wait_till_stable(pcmk__output_t *out, int timeout_ms, cib_t * cib); -bool resource_is_running_on(pe_resource_t *rsc, const char *host); +bool resource_is_running_on(pcmk_resource_t *rsc, const char *host); void crm_resource_register_messages(pcmk__output_t *out); |