def pcsd_status(lib: Any, argv: Sequence[str], modifiers: InputModifiers) -> None: warn("This command is deprecated and will be removed. " "Please use 'pcs pcsd status' or 'pcs status pcsd' instead.") try: return pcsd.pcsd_status_cmd(lib, argv, modifiers) except CmdLineInputError as e: return exit_on_cmdline_input_errror(e, "pcsd", ["status"])
def print_pcsd_daemon_status(lib, modifiers): """ Commandline options: * --request-timeout - HTTP timeout for node authorization check or when not running under root to call local pcsd """ print("PCSD Status:") if os.getuid() == 0: pcsd_status_cmd(lib, [], modifiers.get_subset("--request-timeout"), dont_exit=True) else: err_msgs, exitcode, std_out, dummy_std_err = utils.call_local_pcsd( ["status", "pcsd"]) if err_msgs: for msg in err_msgs: print(msg) if exitcode == 0: print(std_out) else: print("Unable to get PCSD status")