diff options
author | Alejandro Sirgo Rica <asirgo@soleta.eu> | 2024-02-29 12:33:59 +0100 |
---|---|---|
committer | Alejandro Sirgo Rica <asirgo@soleta.eu> | 2024-02-29 12:33:59 +0100 |
commit | 9f78cc5acee3e974e1c30bfdeac740e895e2dab1 (patch) | |
tree | 618a0029bc63ecc2fc07bcc562a0c221f2ff30a4 /cli/cli.py | |
parent | 48f596436c06ddb36329ec7422259dbbb5fb27bc (diff) |
add 'send session' to request the boot from a client's partition
example to boot OS from 10.141.10.22 disk 1 partition 2
send session --client-ip 10.141.10.22 --disk 1 --part 2
Diffstat (limited to 'cli/cli.py')
-rw-r--r-- | cli/cli.py | 5 |
1 files changed, 4 insertions, 1 deletions
@@ -19,6 +19,7 @@ from cli.objects.live import OgLive from cli.objects.center import OgCenter from cli.objects.room import OgRoom from cli.objects.folder import OgFolder +from cli.objects.session import OgSession import argparse import requests import sys @@ -124,7 +125,7 @@ class OgCLI(): OgServer.set_server(self.rest, args[1:]) def send(self, args): - choices = ['reboot', 'refresh', 'poweroff', 'wol'] + choices = ['reboot', 'refresh', 'poweroff', 'wol', 'session'] parser = argparse.ArgumentParser(prog='ogcli send') parser.add_argument('send_obj', choices=choices) @@ -142,6 +143,8 @@ class OgCLI(): 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:]) def restore(self, args): choices = ['image'] |