Commit Graph

67 Commits (e7c2ad0ee156188a331a84186075453ae38ac096)
 

Author SHA1 Message Date
Roberto Hueso Gómez adb2e9ffba Rework ogcli set mode command
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.
2020-07-30 10:16:56 +02:00
Roberto Hueso Gómez 513308fe81 Add ogcli list client command
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.
2020-07-14 11:21:16 +02:00
Roberto Hueso Gómez f4e1bb767b Add ogcli list hardware command
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.
2020-07-08 13:38:50 +02:00
Roberto Hueso Gómez e3d30d23ff Add payload option on GET requests
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
2020-07-08 11:43:49 +02:00
Roberto Hueso Gómez 8961937329 Add ogcli set mode command
This requests POST /modes and changes a scope mode by calling something like:
ogcli set modes --scope-id=1 --scope-type=computer --mode=pxe
2020-07-06 13:32:02 +02:00
Roberto Hueso Gómez 4dddd359e7 Add post() to OgREST
This is a wrapper that provides HTTP POST requests.
2020-07-03 14:25:22 +02:00
Roberto Hueso Gómez 53ed3933d9 Fix ogcli shebang
This uses python3 and improves portability by using '/usr/bin/env'.
2020-07-01 14:14:31 +02:00
OpenGnSys Support Team 14b7729a71 add license header to source code files 2020-07-01 12:34:46 +02:00
Roberto Hueso Gómez dbf0f00650 Rename files to remove 'og' prefix
This prefix is redundant on almost every file, so the prefix is removed from
filenames and imports.
2020-06-30 12:51:51 +02:00
Roberto Hueso Gómez f41b5f8f9d Add list modes command
This is consistent with HTTP GET /modes
2020-06-30 12:43:51 +02:00
Roberto Hueso Gómez 7483cb76a2 Check required config params are in config file
In case a required config param is not in ogcli.json config file, this exits
the program with an error code.
2020-06-25 10:52:27 +02:00
Roberto Hueso Gómez be18d619e6 Add list scopes command
This is consistent with HTTP GET /scopes
2020-06-19 13:10:14 +02:00
Roberto Hueso Gómez 36c6115855 Add ip and port parameters to config
These are the ip and port of the ogServer.
2020-06-19 12:49:49 +02:00
Roberto Hueso Gómez dbdfc106bf Rewrite basic structure
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.).
2020-06-19 12:23:59 +02:00
OpenGnSys Support Team d7b54d08bb add .gitignore 2020-06-18 16:53:41 +02:00
OpenGnSys Support Team 8edcc0dd27 add cfg directory
Add configuration file template.
2020-06-18 16:50:50 +02:00
OpenGnSys Support Team 2120ef6f78 First commit
Add basic OgCLI structure.
2020-06-18 16:44:08 +02:00