summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* Add client, room and center args to set_modesJose M. Guisado2021-02-261-17/+32
| | | | | | | | | | | | | | | | | | New arguments to make specifying the target machines more flexible when changing their boot mode (known as "set client mode"). These argument are optional although any of them must be used to specify some target. --client IP --room id --center id The arguments can be specified several times like "--client ip --client ip --room id --room id --room id", etc. Center or room id can be obtained via /scopes. As of this patch, set_modes does iterate through the whole /scopes output and then filters ips with those that were specified by user.
* Bring clients.py up to date with ogServer APIJose M. Guisado2021-02-261-9/+8
| | | | | | | | | | get_client_properties is not using a valid API resource to fetch computer details. Use /client/info. list_client_hardware is not building a valid payload. Drop payload building using 'scope' as key and updates o that its uses "{ client : ip }" scheme for specifying a client. This is the standard way of specifying a client in ogServer.
* Rework set mode commandRoberto Hueso Gómez2020-08-121-4/+39
| | | | | | | | | This reworks the POST /mode command to the new API: POST /mode { 'clients': ['192.168.1.5', '192.168.1.6'] 'mode': 'pxe' }
* Change GET and POST /modes URI to /modeRoberto Hueso Gómez2020-08-031-2/+2
| | | | This adapts to the ogServer.
* Rework ogcli set mode commandRoberto Hueso Gómez2020-07-301-8/+3
| | | | | | | | | | This patch adapts the command to the fixed POST /modes request. It can now be called with something like: ogcli set modes --scope-name=pc12 --mode=pxe NOTE: This inherits from the legacy setclientmode script and requires scope names to be unique. This should be fixed in the future in case it's convenient to have duplicated scope names.
* Add ogcli list client commandRoberto Hueso Gómez2020-07-142-1/+18
| | | | | | | | This requests GET /client/properties by calling something like: ogcli list client --id=6 It is important to notice that 'id' must be a "computer" type scope id.
* Add ogcli list hardware commandRoberto Hueso Gómez2020-07-082-5/+23
| | | | | | | This requests GET /hardware by calling something like: ogcli list hardware --scope-id=6 It is important to notice that 'scope-id' must be a "computer" type scope id.
* Add payload option on GET requestsRoberto Hueso Gómez2020-07-081-2/+3
| | | | | | | Instead of using query strings we use a json body for GET HTTP requests. This is allowed under RFCs 7230-7237. https://stackoverflow.com/questions/978061/http-get-with-request-body
* Add ogcli set mode commandRoberto Hueso Gómez2020-07-062-0/+33
| | | | | This requests POST /modes and changes a scope mode by calling something like: ogcli set modes --scope-id=1 --scope-type=computer --mode=pxe
* Add post() to OgRESTRoberto Hueso Gómez2020-07-031-0/+13
| | | | This is a wrapper that provides HTTP POST requests.
* Fix ogcli shebangRoberto Hueso Gómez2020-07-011-1/+1
| | | | This uses python3 and improves portability by using '/usr/bin/env'.
* add license header to source code filesOpenGnSys Support Team2020-07-015-0/+40
|
* Rename files to remove 'og' prefixRoberto Hueso Gómez2020-06-307-4/+4
| | | | | This prefix is redundant on almost every file, so the prefix is removed from filenames and imports.
* Add list modes commandRoberto Hueso Gómez2020-06-302-1/+10
| | | | This is consistent with HTTP GET /modes
* Check required config params are in config fileRoberto Hueso Gómez2020-06-251-0/+6
| | | | | In case a required config param is not in ogcli.json config file, this exits the program with an error code.
* Add list scopes commandRoberto Hueso Gómez2020-06-192-2/+12
| | | | This is consistent with HTTP GET /scopes
* Add ip and port parameters to configRoberto Hueso Gómez2020-06-191-1/+3
| | | | These are the ip and port of the ogServer.
* Rewrite basic structureRoberto Hueso Gómez2020-06-194-20/+32
| | | | | | | This commit: - Adds OgREST class as a wrapper for HTTP REST requests. - Adds objects folder which will contain available functions for each object in the OpenGnsys ecosystem (e.g. client, image, etc.).
* add .gitignoreOpenGnSys Support Team2020-06-181-0/+1
|
* add cfg directoryOpenGnSys Support Team2020-06-181-0/+3
| | | | Add configuration file template.
* First commitOpenGnSys Support Team2020-06-184-0/+723
Add basic OgCLI structure.