| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
|
|
|
|
| |
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.
|
|
|
|
|
|
| |
By using the word 'request' the command becomes more semantic and
represents the 'best effort' nature of the communication with
ogserver.
|
|
|
|
| |
use opengnsys@soleta.eu email instead of info@soleta.eu
|
|
|
|
| |
This set from the room --netmask, this is obsolete, remove it.
|
|
|
|
|
|
| |
Delete a client with command:
$ ogcli delete client --ip 1.2.3.4
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Add a new client with command:
$ ogcli add client --repo-id <repo id>
--netmask <netmask>
--room-id <room id>
--hostname <hostname>
--mac <mac address>
--ip <ip address>
--boot-mode <boot mode>
For example: To add a new client with hostname "javipc", netmask
255.255.255.0, mac address a2:54:00:2e:05:7a, ip address 192.168.56.101,
assign it to repo id 1, room id 1 and set its boot mode to oglive
use:
$ ogcli add client --hostname javipc --netmask 255.255.255.0 --mac
a2:54:00:2e:05:7a --ip 192.168.56.101 --repo-id 1 --room-id 1
--boot-mode oglive
Notes:
- ogserver API REST json payload does not allow to specify a server
(table 'entorno') for the client. It will automatically assign
client to server with id 1
- ogserver API REST json payload specifies mac address without ':'.
- payload must contain 'netiface', ogcli specifies 'eth0' is specified
which is the default value in netiface column in db (table 'ordenadores')
- netdriver column uses "generic" as default, this field is not used
anymore, but it is set to "generic" by now.
- ogserver should validate that boot mode set is correct.
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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").
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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.
|
|
|
|
|
|
| |
Send refresh to a given client.
$ ogcli send refresh --client-ip 192.168.56.11
|
|
|
|
|
|
|
|
|
| |
Adds a pretty printing function for JSON data.
Replaces print for print_json in corresponding cli objects.
Follows commit 828d6c0ce7d4a6b4bcd95e97155460fd59856bdd
("list scopes: pretty print scope tree")
|
|
|
|
| |
Update license header in files.
|
|
|
|
|
|
|
|
| |
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.
|
|
|
|
|
|
|
|
|
| |
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.
|
|
|
|
|
|
|
|
|
|
| |
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.
|
|
|
|
|
|
|
|
| |
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.
|
|
|
|
|
|
|
| |
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.
|
| |
|
|
This prefix is redundant on almost every file, so the prefix is removed from
filenames and imports.
|