diff options
Diffstat (limited to 'cli/cli.py')
-rw-r--r-- | cli/cli.py | 28 |
1 files changed, 14 insertions, 14 deletions
@@ -124,27 +124,27 @@ class OgCLI(): elif parsed_args.item == 'server': OgServer.set_server(self.rest, args[1:]) - def send(self, args): + def request(self, args): choices = ['reboot', 'refresh', 'poweroff', 'wol', 'session'] - parser = argparse.ArgumentParser(prog='ogcli send') - parser.add_argument('send_obj', choices=choices) + parser = argparse.ArgumentParser(prog='ogcli request') + parser.add_argument('request_obj', choices=choices) if not args: - print('Missing send subcommand', file=sys.stderr) + print('Missing request subcommand', file=sys.stderr) parser.print_help(file=sys.stderr) sys.exit(1) parsed_args = parser.parse_args([args[0]]) - if parsed_args.send_obj == 'wol': - OgWol.send_wol(self.rest, args[1:]) - elif parsed_args.send_obj == 'poweroff': - OgPoweroff.send_poweroff(self.rest, args[1:]) - elif parsed_args.send_obj == 'refresh': - OgClient.send_refresh(self.rest, args[1:]) - elif parsed_args.send_obj == 'reboot': - OgReboot.send_reboot(self.rest, args[1:]) - elif parsed_args.send_obj == 'session': - OgSession.send_session(self.rest, args[1:]) + if parsed_args.request_obj == 'wol': + OgWol.request_wol(self.rest, args[1:]) + elif parsed_args.request_obj == 'poweroff': + OgPoweroff.request_poweroff(self.rest, args[1:]) + elif parsed_args.request_obj == 'refresh': + OgClient.request_refresh(self.rest, args[1:]) + elif parsed_args.request_obj == 'reboot': + OgReboot.request_reboot(self.rest, args[1:]) + elif parsed_args.request_obj == 'session': + OgSession.request_session(self.rest, args[1:]) def restore(self, args): choices = ['image'] |