HomeClusterLabs Projects

Refactor: tools: New crm_rsc_requires_resource flag

Description

Refactor: tools: New crm_rsc_requires_resource flag

Should be set for all commands except the following, to match existing
is_resource_required() behavior:

cmd_cleanup
cmd_cts
cmd_list_active_ops
cmd_list_agents
cmd_list_all_ops
cmd_list_alternatives
cmd_list_instances
cmd_list_options
cmd_list_providers
cmd_list_resources
cmd_list_standards
cmd_metadata
cmd_refresh
cmd_wait
cmd_why

Also drop is_resource_required(). It depends on global state, which can
be confusing. And by the time we call it, we've already ensured that if
options.clear_expired is set, the command is cmd_clear.

The logic is simple enough that it seems clearer to check it directly in
main().

Signed-off-by: Reid Wahl <nrwahl@protonmail.com>

Details

Provenance
nrwahl2Authored on Sat, Mar 8, 7:20 PM
Parents
rP194f68f6b087: Refactor: tools: New crm_rsc_requires_node flag
Branches
Unknown
Tags
Unknown