Commit Graph

7 Commits (be84b0a15ce5d0ada0ac1613085420b8af206efb)

Author SHA1 Message Date
Jose M. Guisado 565e798ef9 Print json instead of python dict in responses
r.json() decodes the responses json and passes it to json.loads() which
will convert the content into a python dictionary.

Print the literal JSON text so that output can be further manipulated by
other tools like jq.
2021-03-18 15:40:35 +01:00
Jose M. Guisado c80f27c98c Make client and center params more specific
Non specific parameter names like '--center' or '--client' should not be
used to specify an ip or id, only a literal name.

Rename --client to --client-ip and --center to --center-id to leave
unspecific parameters free to later implement --center or --client using
names.
2021-03-03 11:17:05 +01:00
Jose M. Guisado f6fa795803 Bring clients.py up to date with ogServer API
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.
2021-02-26 15:34:02 +01: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
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