ogcli/cli/objects
Javier Hernandez 4bf4f91f54 client: support for adding clients
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.
2023-10-27 11:57:25 +02:00
..
__init__.py Rename files to remove 'og' prefix 2020-06-30 12:51:51 +02:00
center.py cli: objects: use --desc and --folder 2023-10-19 13:36:00 +02:00
client.py client: support for adding clients 2023-10-27 11:57:25 +02:00
disks.py disks: remove --format parameter in setup disk 2023-10-09 12:45:07 +02:00
images.py images: change --repo help message 2023-10-12 09:48:15 +02:00
modes.py list modes: use print_json 2022-05-20 10:28:40 +02:00
poweroff.py objects: add missing prog parameter in subcommands 2023-10-05 11:21:19 +02:00
reboot.py objects: add missing prog parameter in subcommands 2023-10-05 11:21:19 +02:00
repo.py repo: add add_repo function 2023-10-11 17:50:47 +02:00
room.py cli: objects: use --desc and --folder 2023-10-19 13:36:00 +02:00
scopes.py format: use autopep8 2022-05-20 10:22:42 +02:00
server.py objects: add missing prog parameter in subcommands 2023-10-05 11:21:19 +02:00
wol.py objects: add missing prog parameter in subcommands 2023-10-05 11:21:19 +02:00