Go to file
Jose M. Guisado 5c1137662e Fix --help
Non-method attributes are shown using dir() when listing available
commands.

	usage: ogcli [-h] [{create,list,restore,rest,send,set,setup}]

'rest' is a class instance of OgRest and must not be
shown when listing available commands.

Method members of OgCLI class are the available commands that ogcli can
execute.
Use inspect module in order to get class members (getmembers) and filter
only those that are a method (ismethod).

	usage: ogcli [-h] [{create,list,restore,send,set,setup}]

Fixes: 0f2d1f1dba ("Show all valid commands when running ogcli --help")
2022-05-10 16:19:17 +02:00
cfg Add ip and port parameters to config 2020-06-19 12:49:49 +02:00
cli ogCLI is AGPLv3+ 2021-05-14 00:26:33 +02:00
.gitignore add .gitignore 2020-06-18 16:53:41 +02:00
COPYING First commit 2020-06-18 16:44:08 +02:00
README.md Add README.md 2021-03-03 11:17:05 +01:00
ogcli Fix --help 2022-05-10 16:19:17 +02:00

README.md

ogCLI

Manage your OpenGnsys environment from your command line. A CLI for the ogServer REST API.

Installation

This tool is expected to be executed from the OpenGnsys installation environment.

Before running any command copy ogcli.json inside /opt/opengnsys/etc/

Usage

ogcli {command} {object} [{command object options}]

Commands

list

You can list currently connected clients, managed scopes, boot modes, hardware profiles and specific client information.

usage: ogcli list [-h] {clients,scopes,modes,hardware,client}

positional arguments:
  {clients,scopes,modes,hardware,client}

optional arguments:
  -h, --help            show this help message and exit

set

Set properties of the managed computers.

You can modify boot mode using set.

usage: ogcli set [-h] {modes}

positional arguments:
  {modes}

positional arguments:
  {modes}

optional arguments:
  -h, --help  show this help message and exit

Objects

They are subject to the specified command.

  • clients: Currently connected clients to the ogServer
  • client: Any specific client
  • modes: Network boot modes
  • hardware: Hardware profiles
  • scopes: Managed computers, rooms and centers.

Examples

Changing the boot mode of computers in a particular classroom

Fetching a classroom id
ogcli list scopes

{'scope': [{'name': 'Unidad Organizativa (Default)', 'type': 'center', 'id': 1, 'scope': [{'name': 'Aula virtual', 'type': 'room', 'id': 1, ...
Fetching net boot modes
ogcli list modes

{'modes': ['11', 'pxe', '00unknown', '19pxeADMIN', '13', '10', '12']}
Changing boot mode of the classroom
ogcli set modes --room-id 1 --mode pxe

License

ogCLI is released under the GNU Affero Public License v3

Authors

Soleta Networks