pacemaker  2.1.9-49aab99839
Scalable High-Availability cluster resource manager
Functions
pcmki_ticket.h File Reference
#include <crm/common/output_internal.h>
#include <crm/cib/cib_types.h>
Include dependency graph for pcmki_ticket.h:
This graph shows which files directly or indirectly include this file:

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_delete (pcmk__output_t *out, cib_t *cib, pcmk_scheduler_t *scheduler, const char *ticket_id, bool force)
 
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_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_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_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_state (pcmk__output_t *out, cib_t *cib, const char *ticket_id)
 

Function Documentation

◆ pcmk__get_ticket_state()

int pcmk__get_ticket_state ( cib_t cib,
const char *  ticket_id,
xmlNode **  state 
)

Definition at line 76 of file pcmk_ticket.c.

◆ pcmk__ticket_constraints()

int pcmk__ticket_constraints ( pcmk__output_t out,
cib_t cib,
const char *  ticket_id 
)

Definition at line 112 of file pcmk_ticket.c.

◆ pcmk__ticket_delete()

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.

◆ pcmk__ticket_get_attr()

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.

◆ pcmk__ticket_info()

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.

Parameters
[in,out]outOutput object
[in,out]schedulerScheduler data
[in]ticket_idTicket to display info for, or NULL for all tickets
[in]detailsIf true (and out is not an XML format object), output any additional attributes set on a ticket beyond the basics
[in]rawIf 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.
Returns
Standard Pacemaker return code

Definition at line 312 of file pcmk_ticket.c.

◆ pcmk__ticket_remove_attr()

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.

Parameters
[in,out]outOutput object
[in]cibOpen CIB connection
[in,out]schedulerScheduler data
[in]ticket_idTicket to remove attributes from
[in]attr_deleteA list of attribute names
[in]forceAttempting to remove the granted attribute of ticket_id will cause this function to return EACCES unless force is set to true
Returns
Standard Pacemaker return code

Definition at line 369 of file pcmk_ticket.c.

◆ pcmk__ticket_set_attr()

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.

Parameters
[in,out]outOutput object
[in]cibOpen CIB connection
[in,out]schedulerScheduler data
[in]ticket_idTicket to set attributes on
[in]attr_setA hash table of attributes, where keys are the attribute names and the values are the attribute values
[in]forceAttempting to change the granted status of ticket_id will cause this function to return EACCES unless force is set to true
Returns
Standard Pacemaker return code
Note
If no 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.

◆ pcmk__ticket_state()

int pcmk__ticket_state ( pcmk__output_t out,
cib_t cib,
const char *  ticket_id 
)

Definition at line 510 of file pcmk_ticket.c.