HomeClusterLabs Projects

Refactor: tools: New crm_rsc_requires_resource flag
7ad66d85fa75Unpublished

Unpublished Commit ยท Learn More

Not On Permanent Ref: This commit is not an ancestor of any permanent ref.
This commit no longer exists in the repository. It may have been part of a branch which was deleted.This commit has been deleted in the repository: it is no longer reachable from any branch, tag, or ref.

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 Mar 8 2025, 7:20 PM

Event Timeline

Commit No Longer Exists

This commit no longer exists in the repository.