1 | |
---|
2 | # ogCLI |
---|
3 | |
---|
4 | Manage your OpenGnsys environment from your command line. A CLI for the ogServer |
---|
5 | REST API. |
---|
6 | |
---|
7 | ## Installation |
---|
8 | |
---|
9 | This tool is expected to be executed from the OpenGnsys installation environment. |
---|
10 | |
---|
11 | **Before running any command copy `ogcli.json` inside `/opt/opengnsys/etc/`** |
---|
12 | |
---|
13 | ## Usage |
---|
14 | |
---|
15 | `ogcli {command} {object} [{command object options}]` |
---|
16 | |
---|
17 | ### Commands |
---|
18 | |
---|
19 | #### `list` |
---|
20 | |
---|
21 | You can list currently connected clients, managed scopes, |
---|
22 | boot modes, hardware profiles and specific client information. |
---|
23 | |
---|
24 | ``` |
---|
25 | usage: ogcli list [-h] {clients,scopes,modes,hardware,client} |
---|
26 | |
---|
27 | positional arguments: |
---|
28 | {clients,scopes,modes,hardware,client} |
---|
29 | |
---|
30 | optional arguments: |
---|
31 | -h, --help show this help message and exit |
---|
32 | ``` |
---|
33 | |
---|
34 | #### `set` |
---|
35 | |
---|
36 | Set properties of the managed computers. |
---|
37 | |
---|
38 | You can modify boot mode using `set`. |
---|
39 | |
---|
40 | ``` |
---|
41 | usage: ogcli set [-h] {modes} |
---|
42 | |
---|
43 | positional arguments: |
---|
44 | {modes} |
---|
45 | |
---|
46 | positional arguments: |
---|
47 | {modes} |
---|
48 | |
---|
49 | optional arguments: |
---|
50 | -h, --help show this help message and exit |
---|
51 | ``` |
---|
52 | |
---|
53 | ### Objects |
---|
54 | |
---|
55 | They are subject to the specified command. |
---|
56 | |
---|
57 | * `clients`: Currently connected clients to the ogServer |
---|
58 | * `client`: Any specific client |
---|
59 | * `modes`: Network boot modes |
---|
60 | * `hardware`: Hardware profiles |
---|
61 | * `scopes`: Managed computers, rooms and centers. |
---|
62 | |
---|
63 | ### Examples |
---|
64 | |
---|
65 | #### Changing the boot mode of computers in a particular classroom |
---|
66 | |
---|
67 | ##### Fetching a classroom id |
---|
68 | |
---|
69 | ``` |
---|
70 | ogcli list scopes |
---|
71 | |
---|
72 | {'scope': [{'name': 'Unidad Organizativa (Default)', 'type': 'center', 'id': 1, 'scope': [{'name': 'Aula virtual', 'type': 'room', 'id': 1, ... |
---|
73 | ``` |
---|
74 | |
---|
75 | ##### Fetching net boot modes |
---|
76 | |
---|
77 | ``` |
---|
78 | ogcli list modes |
---|
79 | |
---|
80 | {'modes': ['11', 'pxe', '00unknown', '19pxeADMIN', '13', '10', '12']} |
---|
81 | ``` |
---|
82 | |
---|
83 | ##### Changing boot mode of the classroom |
---|
84 | |
---|
85 | ``` |
---|
86 | ogcli set modes --room-id 1 --mode pxe |
---|
87 | ``` |
---|
88 | |
---|
89 | ## License |
---|
90 | |
---|
91 | ogCLI is released under the GNU Affero Public License v3 |
---|
92 | |
---|
93 | ## Authors |
---|
94 | |
---|
95 | [Soleta Networks](https://opengnsys.soleta.eu) |
---|