| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
| |
This improves style and fixes some memleaks.
Co-authored-by: OpenGnSys Support Team <soporte-og@soleta.eu>
|
|
|
|
| |
Missing closedir() call.
|
|
|
|
|
| |
If either root or children_root fail to be created but the other one does not,
then reserved memory for the successful one would not be freed.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This patch implements HTTP GET /modes request which returns all modes available
for clients:
Request: GET /modes HTTP/1.0
Response: 200 OK
{
"modes": [
"pxe",
"10",
"13",
"00unknown",
"11",
"19pxeADMIN",
"12"
]
}
|
|
|
|
| |
Use the same folder as in ogClient.
|
|
|
|
| |
if open() fails it returns a negative value.
|
|
|
|
| |
Check for ogserver.json file first, then fall back to legacy.
|
|
|
|
| |
New configuration file at /opt/opengnsys/cfg/ogserver.json
|
|
|
|
|
| |
Since version 1.2.0, OpenGnsys supports ogVDI hypervisor OS. This commit
a new status which indicates that clients are running ogVDI.
|
| |
|
| |
|
|
|
|
| |
Extract socket core and main from ogAdmServer file.
|
|
|
|
|
| |
* Curly braces after function definition
* use _dbi_ infix for function name
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This patch implements HTTP GET /scopes request which returns the scopes
hierarchy:
Request: HTTP GET /scopes
Response: 200 OK
{
"scope": [
{
"name": "Center 1",
"type": "center",
"id": 1,
"scope": [
{
"name": "Room 1",
"type": "room",
"id": 1,
"scope": [
{
"name": "Computer 1",
"type": "computer",
"id": 1,
"scope": []
},
{
"name": "Computer 3",
"type": "computer",
"id": 2,
"scope": []
}
]
}
]
}
]
}
|
|
|
|
|
| |
This parameter is actually a database related parameter so now it is renamed to
OG_DB_COMPUTER_NAME_MAXLEN.
|
|
|
|
| |
Step forward to rename all ogAdmServer references to ogServer
|
| |
|
| |
|
|
|
|
|
|
|
|
| |
Split ogAdmServer into several files:
* sources/rest.c that implements the server REST API.
* sources/client.c that implements the client REST API.
* sources/json.c that provides a few JSON helpers.
|
| |
|
| |
|
|
|
|
|
| |
This commit is a step in the direction to remove the old unit file. It
also allow us to move ogAdmServer to its own repo.
|
|
|
|
| |
Move remaining ogAdmLib code to ogAdmServer
|
|
|
|
| |
Add new utils.c file and replace old StrToUpper().
|
|
|
|
| |
ogAdmServer uses syslog for logging.
|
| |
|
| |
|
| |
|
|
|
|
|
|
|
|
|
|
| |
These cases are different from a basic WoL command because they all use
the queue. The queue standard behaviour waits for the client to be ON
to send orders, but in WoL commands the client is going to be OFF. The
behaviour of WoL must be different.
This commit implements WoL for queued commands, procedures and tasks.
The queue now sends Wol commands without waiting to the client to be ON.
|
|
|
|
|
|
|
| |
Users can configure clients to execute a procedure at start.
This commit adapt this functionality to new functions and behaviour
of the ogAdmServer.
|
|
|
|
|
|
|
|
|
| |
New versions of ogAdmServer handle pending commands in a different way.
Instant procedures uses the old way, now unsupported, so we need to
adapt instant procedures.
This commit adapts instant procedures to work with the new pending
commands implementation.
|
| |
|
|
|
|
| |
Pass idcomando as task_id.
|
| |
|
|
|
|
| |
Moreover, add og_task_schedule_create() function.
|
| |
|
| |
|
| |
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
| |
OpenGnsys tasks can contain other tasks. To know if a element of the
task is another task, we need to check if it has the parameter tareaid
(Task ID). The code had a bug and the check was done on an non-existent
parameter
This commit fix this bug changing the non-existent parameter for
tareaid.
Signed-off-by: OpenGnSys Support Team <soporte-og@soleta.eu>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
OpenGnsys has a hierarchical scope system to organize clients:
+------+
|Center|
+------+
| |
| |
v v
+--------------------+ +----------+
+-->+Groups of classrooms+----->+Classrooms|
| +-+------------------+ +----------+
| | | |
+-----+ | |
v v
+-----------------+ +-------+
+-->+Groups of clients+--------->+Clients|
| +-+---------------+ +-------+
| |
+-----+
OpenGnsys can send commands and tasks to several clients simultaneously
selecting a scope. For example: send poweroff to center Faculty of
Pharmacy. We had a waterfall process to loop through all members of the
scope and obtain the clients.
This commit simplifies the process with queries that save us to loop
through the members.
Co-authored-by: Irina Gómez <irinagomez@us.es>
|
|
|
|
|
|
|
|
|
|
| |
We have observed that an initial refresh is needed when the ogClient (in
ogLive mode) connects with the ogAdmServer, to generate the HTML menu.
This commit changes the probe command that was done at the beginning of
the connection to a refresh command. This way the client first generates
his HTML menu and the show to the user the browser with all the correct
information.
|
|
|
|
|
|
| |
* add og_schedule_create_weekdays()
* add og_schedule_create_weeks()
* add og_schedule_create_days()
|
| |
|
| |
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This field needs to be at least 31 bits long to store all days in a month.
Other fields are also set to 32 bits because unsigned int length can change
depending on the system.
We also need to support the three ways that the ogAdmAgent and the WebConsole
have to create an schedule. At first, we only supported the easiest
method:
* Hour, day, month and year -> 10:00, 28, february, 2020
This commit adds these two ways to create an schedule:
* Hour, week day, month and year -> 10:00, Monday, february,
2020
* Hour, week, month and year -> 10:00, first week, february,
2020
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This patch adds a new command to the REST API to run tasks.
A task (tarea) is composed of procedures (procedimientos), each procedure is
composed of commands (acciones) that are represented through legacy sockHidra
parameters in the database.
This results in iterating over the task (tareas_acciones) table in the
database to fetch the list of procedures (procedimientos).
Then, this iterates over the list commands that compose a procedures
represented through procedimientos_acciones table.
Finally, this builds and sends the sockHidra legacy message for the client.
This patch includes an implementation of the Linux linked list.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
To build and to install ogAdmServer:
autoreconf -fi
./configure
make
make install
Default prefix is /opt/opengnsys/ as usual.
ogAdmServer uses autotools for compilation, so this patch adapts OpenGnsys
updater and installer to use autotools for compilation.
|