HomeClusterLabs Projects

Low: tools: Fix argument validation for crm_attribute update.

Description

Low: tools: Fix argument validation for crm_attribute update.

Previously (perhaps as far back as when crm_attribute was introduced) we
haven't done any validation on whether an attribute name was given along
with the -v option specifying the new attribute value. Instead we just
asserted.

Instead, check that a name or pattern was given and if not, display an
error message. The other two asserts can go, as well. options.type
will always be set by the call to set_type(), and options.attr_value
will be set if -v was given on the command line.

Fixes T765