Commit Graph

10 Commits (6a96a130b5637625917b469a2376ad022df26867)

Author SHA1 Message Date
Alejandro Sirgo Rica 6a96a130b5 repo: fix repo update command prefix
Use the correct command prefix in the command function.
2024-09-11 15:12:51 +02:00
OpenGnSys Support Team d0e853e9d1 repo: remove --center
legacy option, never used, remove it
2024-09-02 15:19:51 +02:00
Alejandro Sirgo Rica 28ec68df42 repo: sync repo with new API
Add repo update.
Example command:
  update repo --id 20 --address 192.168.1.189 192.168.1.191 --name test --center 1

Use addr instead of ip to pass a list of addresses.
2024-09-02 14:30:15 +02:00
Alejandro Sirgo Rica 48f596436c remove duplicated parse_args in repo.py and server.py
Remove the line 'parsed_args = parser.parse_args(args)' parsing the
command line arguments a second time when it is not needed.
2024-02-29 11:26:10 +01:00
Alejandro Sirgo Rica 569b0107c1 ogcli: validate integer type in every --id argument
missing validation of --id, user needs to supply an integer
2024-02-05 13:29:57 +01:00
OpenGnSys Support Team c1aae6e35e src: update copyright statement
use opengnsys@soleta.eu email instead of info@soleta.eu
2024-01-02 14:00:53 +01:00
OpenGnSys Support Team 27f632e3ed repository: fix incorrect help
# ogcli delete repo -h
 [...]
     --id [ID]   room id in scopes

this is not the room id, it should be the repo id.
2023-12-01 10:38:40 +01:00
OpenGnSys Support Team 6b4a7a64ee repository: delete command
Allow to delete a repository with:

 $ ogcli delete repo --id 10
2023-11-30 22:22:45 +01:00
Jose M. Guisado a4bf35ef28 repo: add add_repo function
User can add a new repository to the database using "ogcli add repo":

$ ogcli add repo --name ogcli --address 10.10.10.10
{
    "center": 1,
    "id": 13,
    "ip": "10.10.10.10",
    "name": "ogcli"
}

The --center optional parameter is used to set the center column of
"repositorios" table in the database to the specified value. If this
parameter is missing ogServer API will default to center with id 1 (the
default center). This is to not break the repository in the legacy
webconsole users.
2023-10-11 17:50:47 +02:00
Jose M. Guisado 4e89fe44d0 cli: add repo.py object
A user can list repos using "ogcli list repos":

$ ogcli list repos
{
    "repositories": [
        {
            "id": 1,
            "ip": "10.141.10.1",
            "name": "Repositorio (Default)"
        },
        {
            "id": 3,
            "ip": "127.0.0.1",
            "name": "dummy"
        },
        {
            "id": 4,
            "ip": "192.168.21.21",
            "name": "helloworld"
        }
    ]
}

The repository of a client or group of clients in a room is configured
using "ogcli set repo --id <id> [--client-ip <ip address>, --room-id
<room id>]:

$ ogcli set repo --id 4 --room-id 1
2023-10-11 17:29:49 +02:00