|
pacemaker
2.1.7-0f7f88312f
Scalable High-Availability cluster resource manager
|
Resource object methods. More...
#include <include/crm/common/resources.h>

Data Fields | |
| gboolean(* | unpack )(pcmk_resource_t *rsc, pcmk_scheduler_t *scheduler) |
| Parse variant-specific resource XML from CIB into struct members. More... | |
| pcmk_resource_t *(* | find_rsc )(pcmk_resource_t *rsc, const char *search, const pcmk_node_t *node, int flags) |
| Search for a resource ID in a resource and its children. More... | |
| char *(* | parameter )(pcmk_resource_t *rsc, pcmk_node_t *node, gboolean create, const char *name, pcmk_scheduler_t *scheduler) |
| Get value of a resource instance attribute. More... | |
| void(* | print )(pcmk_resource_t *rsc, const char *pre_text, long options, void *print_data) |
| gboolean(* | active )(pcmk_resource_t *rsc, gboolean all) |
| Check whether a resource is active. More... | |
| enum rsc_role_e(* | state )(const pcmk_resource_t *rsc, gboolean current) |
| Get resource's current or assigned role. More... | |
| pcmk_node_t *(* | location )(const pcmk_resource_t *rsc, GList **list, int current) |
| List nodes where a resource (or any of its children) is. More... | |
| void(* | free )(pcmk_resource_t *rsc) |
| Free all memory used by a resource. More... | |
| void(* | count )(pcmk_resource_t *rsc) |
| Increment cluster's instance counts for a resource. More... | |
| gboolean(* | is_filtered )(const pcmk_resource_t *rsc, GList *only_rsc, gboolean check_parent) |
| Check whether a given resource is in a list of resources. More... | |
| pcmk_node_t *(* | active_node )(const pcmk_resource_t *rsc, unsigned int *count_all, unsigned int *count_clean) |
| Find a node (and optionally count all) where resource is active. More... | |
| unsigned int(* | max_per_node )(const pcmk_resource_t *rsc) |
| Get maximum resource instances per node. More... | |
Resource object methods.
Definition at line 266 of file resources.h.
| gboolean(* resource_object_functions_s::active) (pcmk_resource_t *rsc, gboolean all) |
Check whether a resource is active.
| [in] | rsc | Resource to check |
| [in] | all | If rsc is collective, all instances must be active |
rsc is active, otherwise FALSE Definition at line 317 of file resources.h.
| pcmk_node_t*(* resource_object_functions_s::active_node) (const pcmk_resource_t *rsc, unsigned int *count_all, unsigned int *count_clean) |
Find a node (and optionally count all) where resource is active.
| [in] | rsc | Resource to check |
| [out] | count_all | If not NULL, set this to count of active nodes |
| [out] | count_clean | If not NULL, set this to count of clean nodes |
Definition at line 384 of file resources.h.
| void(* resource_object_functions_s::count) (pcmk_resource_t *rsc) |
Increment cluster's instance counts for a resource.
Given a resource, increment its cluster's ninstances, disabled_resources, and blocked_resources counts for the resource and its descendants.
| [in,out] | rsc | Resource to count |
Definition at line 357 of file resources.h.
| pcmk_resource_t*(* resource_object_functions_s::find_rsc) (pcmk_resource_t *rsc, const char *search, const pcmk_node_t *node, int flags) |
Search for a resource ID in a resource and its children.
| [in] | rsc | Search this resource and its children |
| [in] | id | Search for this resource ID |
| [in] | on_node | If not NULL, limit search to resources on this node |
| [in] | flags | Group of enum pe_find flags |
Definition at line 287 of file resources.h.
| void(* resource_object_functions_s::free) (pcmk_resource_t *rsc) |
Free all memory used by a resource.
| [in,out] | rsc | Resource to free |
Definition at line 347 of file resources.h.
| gboolean(* resource_object_functions_s::is_filtered) (const pcmk_resource_t *rsc, GList *only_rsc, gboolean check_parent) |
Check whether a given resource is in a list of resources.
| [in] | rsc | Resource ID to check for |
| [in] | only_rsc | List of resource IDs to check |
| [in] | check_parent | If TRUE, check top ancestor as well |
rsc, its top parent if requested, or '*' is in only_rsc, otherwise FALSE Definition at line 369 of file resources.h.
| pcmk_node_t*(* resource_object_functions_s::location) (const pcmk_resource_t *rsc, GList **list, int current) |
List nodes where a resource (or any of its children) is.
| [in] | rsc | Resource to check |
| [out] | list | List to add result to |
| [in] | current | If 0, list nodes where rsc is assigned; if 1, where active; if 2, where active or pending |
Definition at line 339 of file resources.h.
| unsigned int(* resource_object_functions_s::max_per_node) (const pcmk_resource_t *rsc) |
Get maximum resource instances per node.
| [in] | rsc | Resource to check |
rsc instances that can be active on one node Definition at line 395 of file resources.h.
| char*(* resource_object_functions_s::parameter) (pcmk_resource_t *rsc, pcmk_node_t *node, gboolean create, const char *name, pcmk_scheduler_t *scheduler) |
Get value of a resource instance attribute.
| [in,out] | rsc | Resource to check |
| [in] | node | Node to use to evaluate rules |
| [in] | create | Ignored |
| [in] | name | Name of instance attribute to check |
| [in,out] | scheduler | Scheduler data |
Definition at line 302 of file resources.h.
| void(* resource_object_functions_s::print) (pcmk_resource_t *rsc, const char *pre_text, long options, void *print_data) |
Definition at line 306 of file resources.h.
| enum rsc_role_e(* resource_object_functions_s::state) (const pcmk_resource_t *rsc, gboolean current) |
Get resource's current or assigned role.
| [in] | rsc | Resource to check |
| [in] | current | If TRUE, check current role, otherwise assigned role |
rsc Definition at line 327 of file resources.h.
| gboolean(* resource_object_functions_s::unpack) (pcmk_resource_t *rsc, pcmk_scheduler_t *scheduler) |
Parse variant-specific resource XML from CIB into struct members.
| [in,out] | rsc | Partially unpacked resource |
| [in,out] | scheduler | Scheduler data |
Definition at line 275 of file resources.h.
1.8.14