{"update", 1, 0, 'U', "Update the attribute's value in attrd. If this causes the value to change, it will also be updated in the cluster configuration"},
{"update-both", 1, 0, 'B', "Update the attribute's value and time to wait (dampening) in attrd. If this causes the value or dampening to change, the attribute will also be written to the cluster configuration, so be aware that repeatedly changing the dampening reduces its effectiveness."},
#if HAVE_ATOMIC_ATTRD
{"update-delay", 0, 0, 'Y', "Update the attribute's dampening in attrd (requires -d/--delay). If this causes the dampening to change, the attribute will also be written to the cluster configuration, so be aware that repeatedly changing the dampening reduces its effectiveness."},
{"query", 0, 0, 'Q', "\tQuery the attribute's value from attrd"},
#endif
{"delete", 0, 0, 'D', "\tDelete the attribute in attrd. If a value was previously set, it will also be removed from the cluster configuration"},
{"refresh", 0, 0, 'R', "\t(Advanced) Force the attrd daemon to resend all current values to the CIB\n"},
{"-spacer-",1, 0, '-', "\nAdditional options:"},
{"delay", 1, 0, 'd', "The time to wait (dampening) in seconds for further changes before writing"},
{"set", 1, 0, 's', "(Advanced) The attribute set in which to place the value"},
{"node", 1, 0, 'N', "Set the attribute for the named node (instead of the local one)"},
#if HAVE_ATOMIC_ATTRD
{"all", 0, 0, 'A', "Show values of the attribute for all nodes (query only)"},
/* lifetime could be implemented for atomic attrd if there is sufficient user demand */
{"lifetime",1, 0, 'l', "(Deprecated) Lifetime of the node attribute (silently ignored by cluster)"},
{"private", 0, 0, 'p', "\tIf this creates a new attribute, never write the attribute to the CIB"},
#else
{"lifetime",1, 0, 'l', "Lifetime of the node attribute. Allowed values: forever, reboot"},
#endif
/* Legacy options */
{"quiet", 0, 0, 'q', NULL, pcmk_option_hidden},
{"update", 1, 0, 'v', NULL, pcmk_option_hidden},
{"section", 1, 0, 'S', NULL, pcmk_option_hidden},
{0, 0, 0, 0}
};
/* *INDENT-ON* */
#if HAVE_ATOMIC_ATTRD
static int do_query(const char *attr_name, const char *attr_node, gboolean query_all);
#endif
static int do_update(char command, const char *attr_node, const char *attr_name,
const char *attr_value, const char *attr_section,
const char *attr_set, const char *attr_dampen, int attr_options);