summaryrefslogtreecommitdiffstats
path: root/cli/objects/room.py
Commit message (Collapse)AuthorAgeFilesLines
* cli: ensure the program returns 0 on success and 1 on errorAlejandro Sirgo Rica11 days1-5/+14
| | | | | | | | | | 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.
* ogcli: add update command for folder, room and centerAlejandro Sirgo Rica2024-02-131-0/+43
| | | | | Expand of the update command to be able to modify the values of previous folder, room and center configurations.
* room: use room_id field in jsonJavier Hernandez2024-01-111-1/+1
| | | | instead of group, which is not used by the ogserver anymore.
* src: update copyright statementOpenGnSys Support Team2024-01-021-0/+7
| | | | use opengnsys@soleta.eu email instead of info@soleta.eu
* cli: objects: use --desc and --folderJose M. Guisado2023-10-191-6/+8
| | | | | | | | | | | | | | | | Try to reduce the usage of different parameter names due to the OpenGnsys database using different column names for similar purposes. Any database field regarding a description of some sort will use the parameter --desc, even if the DB uses another column name (for example, comment column in center table). Use --folder parameter when requiring a folder id. The database uses "grupo" as table name but present this to the user as folder, so use --folder instead of --group. Also, add 'location' field in the payload of "add room" command, it was missing the addition of 'location' field in the JSON payload.
* cli: add roomJavier Hernandez2023-10-191-0/+88
add functionality to add and remove a room to add a new room use the command: ogcli add room --name <name> --netmask <netmask> --center <center> --gateway <gateway> [--location <location>] [--ntp <ntp>] [--dns <dns>] [--group <group>] for instance, to create a room with name 'dummyroom', netmask '255.255.255.0' and gateway 10.141.10.1 that is inside the center with id 1, use: $ ogcli add room --name dummyroom --netmask 255.255.255.0 --gateway 10.141.10.1 --center 1 Optionally, it is possible to provide additional information such as location (--location <location>), ntp server (--ntp <ntp>), dns server (--dns <dns>), and a group to contain the room (--group <group>). to delete a room use: ogcli delete room --id <id> for instance, to delete room with id 4 use: $ ogcli delete room --id 4