from pcs import ( pcsd, usage, ) from pcs.cli.common.errors import raise_command_replaced from pcs.cli.common.routing import create_router pcsd_cmd = create_router( { "help": lambda lib, argv, modifiers: usage.pcsd(argv), "accept_token": pcsd.accept_token_cmd, "deauth": pcsd.pcsd_deauth, "certkey": pcsd.pcsd_certkey, "sync-certificates": pcsd.pcsd_sync_certs, # removed commands # These print error messages which point users to the changes section in # pcs manpage. # To be removed in the next significant version. "clear-auth": lambda lib, argv, modifiers: raise_command_replaced( "pcs host deauth", "pcs pcsd deauth"), }, ["pcsd"], )
"corosync": status.corosync_status, "cluster": status.cluster_status, "nodes": status.nodes_status, "pcsd": status.cluster_pcsd_status, "qdevice": qdevice_status_cmd, "quorum": quorum_status_cmd, "resources": resource_status, "xml": status.xml_status, "status": status.full_status, # removed commands # These print error messages which point users to the changes section in # pcs manpage. # To be removed in the next significant version. "groups": lambda lib, argv, modifiers: raise_command_replaced( "pcs resource group list"), }, ["status"], default_cmd="status", )
"dry-run": resource.resource_relocate_dry_run_cmd, "run": resource.resource_relocate_run_cmd, "clear": resource.resource_relocate_clear_cmd, }, ["resource", "relocate"] ), "utilization": resource.resource_utilization_cmd, "bundle": create_router( { "create": resource.resource_bundle_create_cmd, "reset": resource.resource_bundle_reset_cmd, "update": resource.resource_bundle_update_cmd, }, ["resource", "bundle"] ), # internal use only "get_resource_agent_info": resource.get_resource_agent_info, # removed commands # These print error messages which point users to the changes section in # pcs manpage. # To be removed in the next significant version. "master": lambda lib, argv, modifiers: raise_command_replaced( "pcs resource promotable" ), "relations": show_resource_relations_cmd, }, ["resource"], default_cmd="status" )
"reload": cluster.cluster_reload, "destroy": cluster.cluster_destroy, "verify": cluster.cluster_verify, "report": cluster.cluster_report, "remove_nodes_from_cib": cluster.remove_nodes_from_cib, # removed commands # These print error messages which point users to the changes section in # pcs manpage. # To be removed in the next significant version. "quorum": lambda lib, argv, modifiers: raise_command_replaced("pcs quorum"), "remote-node": create_router( { "add": lambda lib, argv, modifiers: raise_command_replaced( "pcs cluster node add-guest", ), "remove": lambda lib, argv, modifiers: raise_command_replaced( "pcs cluster node delete-guest", "pcs cluster node remove-guest", ), }, ["cluster", "node"], ), "standby":