pacemaker
2.1.9-49aab99839
Scalable High-Availability cluster resource manager
|
#include <crm_internal.h>
#include <crm/cib/internal.h>
#include <crm/pengine/internal.h>
#include <pacemaker.h>
#include <pacemaker-internal.h>
#include "libpacemaker_private.h"
Go to the source code of this file.
Functions | |
int | pcmk__get_ticket_state (cib_t *cib, const char *ticket_id, xmlNode **state) |
int | pcmk__ticket_constraints (pcmk__output_t *out, cib_t *cib, const char *ticket_id) |
int | pcmk_ticket_constraints (xmlNodePtr *xml, const char *ticket_id) |
Return constraints that apply to the given ticket. More... | |
int | pcmk__ticket_delete (pcmk__output_t *out, cib_t *cib, pcmk_scheduler_t *scheduler, const char *ticket_id, bool force) |
int | pcmk_ticket_delete (xmlNodePtr *xml, const char *ticket_id, bool force) |
Delete a ticket's state from the local cluster site. More... | |
int | pcmk__ticket_get_attr (pcmk__output_t *out, pcmk_scheduler_t *scheduler, const char *ticket_id, const char *attr_name, const char *attr_default) |
int | pcmk_ticket_get_attr (xmlNodePtr *xml, const char *ticket_id, const char *attr_name, const char *attr_default) |
Return the value of a ticket's attribute. More... | |
int | pcmk__ticket_info (pcmk__output_t *out, pcmk_scheduler_t *scheduler, const char *ticket_id, bool details, bool raw) |
Return information about the given ticket. More... | |
int | pcmk_ticket_info (xmlNodePtr *xml, const char *ticket_id) |
Return information about the given ticket. More... | |
int | pcmk__ticket_remove_attr (pcmk__output_t *out, cib_t *cib, pcmk_scheduler_t *scheduler, const char *ticket_id, GList *attr_delete, bool force) |
Remove the given attribute(s) from a ticket. More... | |
int | pcmk_ticket_remove_attr (xmlNodePtr *xml, const char *ticket_id, GList *attr_delete, bool force) |
Remove the given attribute(s) from a ticket. More... | |
int | pcmk__ticket_set_attr (pcmk__output_t *out, cib_t *cib, pcmk_scheduler_t *scheduler, const char *ticket_id, GHashTable *attr_set, bool force) |
Set the given attribute(s) on a ticket. More... | |
int | pcmk_ticket_set_attr (xmlNodePtr *xml, const char *ticket_id, GHashTable *attr_set, bool force) |
Set the given attribute(s) on a ticket. More... | |
int | pcmk__ticket_state (pcmk__output_t *out, cib_t *cib, const char *ticket_id) |
int | pcmk_ticket_state (xmlNodePtr *xml, const char *ticket_id) |
Return a ticket's state XML. More... | |
int pcmk__get_ticket_state | ( | cib_t * | cib, |
const char * | ticket_id, | ||
xmlNode ** | state | ||
) |
Definition at line 76 of file pcmk_ticket.c.
int pcmk__ticket_constraints | ( | pcmk__output_t * | out, |
cib_t * | cib, | ||
const char * | ticket_id | ||
) |
Definition at line 112 of file pcmk_ticket.c.
int pcmk__ticket_delete | ( | pcmk__output_t * | out, |
cib_t * | cib, | ||
pcmk_scheduler_t * | scheduler, | ||
const char * | ticket_id, | ||
bool | force | ||
) |
Definition at line 180 of file pcmk_ticket.c.
int pcmk__ticket_get_attr | ( | pcmk__output_t * | out, |
pcmk_scheduler_t * | scheduler, | ||
const char * | ticket_id, | ||
const char * | attr_name, | ||
const char * | attr_default | ||
) |
Definition at line 259 of file pcmk_ticket.c.
int pcmk__ticket_info | ( | pcmk__output_t * | out, |
pcmk_scheduler_t * | scheduler, | ||
const char * | ticket_id, | ||
bool | details, | ||
bool | raw | ||
) |
Return information about the given ticket.
[in,out] | out | Output object |
[in,out] | scheduler | Scheduler data |
[in] | ticket_id | Ticket to display info for, or NULL for all tickets |
[in] | details | If true (and out is not an XML format object), output any additional attributes set on a ticket beyond the basics |
[in] | raw | If true (and out is not an XML format object), simply list the IDs of all tickets. This does not make a lot of sense if ticket_id is not NULL, but that will not raise an error. |
Definition at line 312 of file pcmk_ticket.c.
int pcmk__ticket_remove_attr | ( | pcmk__output_t * | out, |
cib_t * | cib, | ||
pcmk_scheduler_t * | scheduler, | ||
const char * | ticket_id, | ||
GList * | attr_delete, | ||
bool | force | ||
) |
Remove the given attribute(s) from a ticket.
[in,out] | out | Output object |
[in] | cib | Open CIB connection |
[in,out] | scheduler | Scheduler data |
[in] | ticket_id | Ticket to remove attributes from |
[in] | attr_delete | A list of attribute names |
[in] | force | Attempting to remove the granted attribute of ticket_id will cause this function to return EACCES unless force is set to true |
Definition at line 369 of file pcmk_ticket.c.
int pcmk__ticket_set_attr | ( | pcmk__output_t * | out, |
cib_t * | cib, | ||
pcmk_scheduler_t * | scheduler, | ||
const char * | ticket_id, | ||
GHashTable * | attr_set, | ||
bool | force | ||
) |
Set the given attribute(s) on a ticket.
[in,out] | out | Output object |
[in] | cib | Open CIB connection |
[in,out] | scheduler | Scheduler data |
[in] | ticket_id | Ticket to set attributes on |
[in] | attr_set | A hash table of attributes, where keys are the attribute names and the values are the attribute values |
[in] | force | Attempting to change the granted status of ticket_id will cause this function to return EACCES unless force is set to true |
ticket_id
attribute exists but attr_set
is non-NULL, the ticket will be created with the given attributes. Definition at line 441 of file pcmk_ticket.c.
int pcmk__ticket_state | ( | pcmk__output_t * | out, |
cib_t * | cib, | ||
const char * | ticket_id | ||
) |
Definition at line 510 of file pcmk_ticket.c.
int pcmk_ticket_constraints | ( | xmlNodePtr * | xml, |
const char * | ticket_id | ||
) |
Return constraints that apply to the given ticket.
[in,out] | xml | The destination for the result, as an XML tree |
[in] | ticket_id | Ticket to find constraint for, or NULL for all ticket constraints |
Definition at line 145 of file pcmk_ticket.c.
int pcmk_ticket_delete | ( | xmlNodePtr * | xml, |
const char * | ticket_id, | ||
bool | force | ||
) |
Delete a ticket's state from the local cluster site.
[in,out] | xml | The destination for the result, as an XML tree |
[in] | ticket_id | Ticket to delete |
[in] | force | If true , delete the ticket even if it has been granted |
Definition at line 234 of file pcmk_ticket.c.
int pcmk_ticket_get_attr | ( | xmlNodePtr * | xml, |
const char * | ticket_id, | ||
const char * | attr_name, | ||
const char * | attr_default | ||
) |
Return the value of a ticket's attribute.
[in,out] | xml | The destination for the result, as an XML tree |
[in] | ticket_id | Ticket to find attribute value for |
[in] | attr_name | Attribute's name to find value for |
[in] | attr_default | If either the ticket or the attribute do not exist, use this as the value in xml |
Definition at line 291 of file pcmk_ticket.c.
int pcmk_ticket_info | ( | xmlNodePtr * | xml, |
const char * | ticket_id | ||
) |
Return information about the given ticket.
[in,out] | xml | The destination for the result, as an XML tree |
[in] | ticket_id | Ticket to find info value for, or NULL for all tickets |
Definition at line 343 of file pcmk_ticket.c.
int pcmk_ticket_remove_attr | ( | xmlNodePtr * | xml, |
const char * | ticket_id, | ||
GList * | attr_delete, | ||
bool | force | ||
) |
Remove the given attribute(s) from a ticket.
[in,out] | xml | The destination for the result, as an XML tree |
[in] | ticket_id | Ticket to remove attributes from |
[in] | attr_delete | A list of attribute names |
[in] | force | Attempting to remove the granted attribute of ticket_id will cause this function to return EACCES unless force is set to true |
Definition at line 416 of file pcmk_ticket.c.
int pcmk_ticket_set_attr | ( | xmlNodePtr * | xml, |
const char * | ticket_id, | ||
GHashTable * | attr_set, | ||
bool | force | ||
) |
Set the given attribute(s) on a ticket.
[in,out] | xml | The destination for the result, as an XML tree |
[in] | ticket_id | Ticket to set attributes on |
[in] | attr_set | A hash table of attributes, where keys are the attribute names and the values are the attribute values |
[in] | force | Attempting to change the granted status of ticket_id will cause this function to return EACCES unless force is set to true |
ticket_id
attribute exists but attr_set
is non-NULL, the ticket will be created with the given attributes. Definition at line 484 of file pcmk_ticket.c.
int pcmk_ticket_state | ( | xmlNodePtr * | xml, |
const char * | ticket_id | ||
) |
Return a ticket's state XML.
[in,out] | xml | The destination for the result, as an XML tree |
[in] | ticket_id | Ticket to find state for, or NULL for all tickets |
ticket_id
is not NULL
and more than one ticket exists with that ID, this function returns pcmk_rc_duplicate_id
. Definition at line 533 of file pcmk_ticket.c.