summaryrefslogtreecommitdiffstats
path: root/cli/objects/poweroff.py
Commit message (Collapse)AuthorAgeFilesLines
* cli: ensure the program returns 0 on success and 1 on errorAlejandro Sirgo Rica8 days1-4/+7
| | | | | | | | | | propagate a returncode in each operation and make it the returncode of the program. Prevent sys.exit calls in post(), get() and delete() request handlers to enable cleanup code and error handling. Keep a basic error log inside the request functions if the connection can't be established or if the response contains an error code.
* improve missing clients error reporting in multiple commandsAlejandro Sirgo Rica2024-03-041-1/+1
| | | | | All the commands that need target clients now have a more descriptive error message when the clients of the command are missing.
* change 'ogcli send' command into 'ogcli request'Alejandro Sirgo Rica2024-03-041-2/+2
| | | | | | By using the word 'request' the command becomes more semantic and represents the 'best effort' nature of the communication with ogserver.
* src: update copyright statementOpenGnSys Support Team2024-01-021-1/+1
| | | | use opengnsys@soleta.eu email instead of info@soleta.eu
* objects: add missing prog parameter in subcommandsJose M. Guisado2023-10-051-1/+1
| | | | | | | | | | | | | The specific subcommand name is missing in some of the subcommands help message. For example: $ ogcli list hardware usage: ogcli [-h] --client-ip CLIENT_IP ogcli: error: the following arguments are required: --client-ip Fix this by adding the missing prog= parameter so argparse use this instead of argv[0]. If no prog parameter is specified then argv[0] is printed (i.e: "ogcli").
* format: use autopep8Jose M. Guisado2022-05-201-42/+44
| | | | | | | | | | | | | | Use autopep8 for coding format, and only for whitespace changes. This change drops use of tabs in favor of spaces. Doesn't use autopep8 --aggresive option. Format command: $ autopep8 --inline --recursive . When using git-blame, use --ignore-rev in order to ignore this reformatting commit.
* ogCLI is AGPLv3+OpenGnSys Support Team2021-05-141-4/+3
| | | | Update license header in files.
* Add 'send poweroff' commandJose M. Guisado2021-04-061-0/+56
Enables sending poweroff commands to clients. Only arguments required are the usual client selection like: --client-ip --room-id --center-id