| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Adds the possibility to create a procedure with commands and other
procedures integrated as steps.
Note: "steps" parameter is optional and "steps" array object order
defines execution order.
Request:
POST /procedure/add
{
"center": "1",
"name": "procedure",
"description": "My procedure",
"steps": [
{
"command": "wol",
"params": { "type": "broadcast" }
},
{
"procedure": 22
},
{
"command": "poweroff",
"params": {}
}
]
}
Response:
200 OK
This commit also updates unit tests for /procedure/add POST method to
include steps.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This method adds a procedure associated with a center to the database.
Required payload parameters are center and name, description is
optional.
Note: ogServer does not allow to add more than one procedure with the
same name and center.
Request:
POST /procedure/add
{
"center": "1"
"name": "procedure1"
"description": "My procedure"
}
Response:
200 OK
This commit also adds unit tests for /procedure/add POST method.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Adds POST method to add rooms (labs), required payload parameters are
name, netmask and center; any additional attributes are optional.
Required JSON:
{ "center": 0,
"name": "classroom10",
"netmask": "255.255.255.0" }
Full JSON:
{ "center": 0,
"name": "classroom11",
"netmask": "255.255.255.0",
"group": 0,
"location": "First floor",
"gateway": "192.168.56.1",
"ntp": "hora.cica.es",
"dns": "1.1.1.1",
"remote": True }
This commit also adds unit tests for /room/add POST method.
|
|
|
|
|
|
|
|
| |
This commit adds a test for HTTP responses that are too large to fit in
ogServer response buffer.
It also moves the basic sql data used for the other tests to its own
file, easing its reuse in several files.
|
|
|
|
|
|
|
|
|
|
| |
Python test script launches its own ogServer to run tests. If there is
another ogServer running at the same time, it interferes with tests.
Installing ogServer in a machine results in an enabled ogServer service.
Stop ogServer service before tests just in case the user installed
ogServer in the machine.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This function returns the installed and available ogLiveS in the server
to be booted from.
Request:
GET /oglive/list
NO BODY
Response
200 OK
{
"oglive": [
{
"distribution": "bionic",
"kernel": "5.4.0-40-generic",
"architecture": "amd64",
"revision": "r20200629",
"directory": "ogLive-5.4.0-r20200629",
"iso": "ogLive-bionic-5.4.0-40-generic-amd64-r20200629.85eceaf.iso"
},
{
"distribution": "bionic",
"kernel": "5.0.0-27-generic",
"architecture": "amd64",
"revision": "r20190830",
"directory": "ogLive-5.0.0-r20190830",
"iso": "ogLive-bionic-5.0.0-27-generic-amd64-r20190830.7208cc9.iso"
}
],
"default": 0
}
This commit also adds tests for GET /oglive/test.
|
|
|
|
| |
Fix incorrect error if json is missing.
|
| |
|
|
|
|
|
| |
ogServer now responses with "413 Payload Too Large" when the payload is
too large.
|
|
|
|
|
| |
ogServer has some memory bugs we want to solve and avoid in the future.
Run ogServer with Valgrind to help us find those errors.
|
|
|
|
|
|
|
| |
Commit e4cb91b changed MAC and netmask retrieving, now ogServer take these
addresses from the database instead of from the JSON.
Remove MAC and netmask from the JSON body.
|
|
|
|
|
| |
Software inventory generates a request larger that 64 Kbytes.
Rise the maximum API REST request size to 128 Kbytes.
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
|
|
|
| |
Add new type field to json.
|
|
|
|
| |
And fix ogserver, report error if GET /scopes have a JSON body.
|
| |
|
| |
|
| |
|
| |
|
| |
|
|
|
|
| |
Fix incorrect status code.
|
|
|
|
|
|
|
|
|
|
| |
Test 0006: add json to GET /session and update expected return code.
Test 0012: add json to GET /software and update expected return code (200),
in this case json fields are integer, not string.
Test 0020: remove it, /image/create/incremental does not exist anymore.
Test 0021: same as before for /image/restore/basic
Test 0022: same as before for /image/restore/incremental
Test 0023: rename to test_0020.
|
|
|
|
|
| |
This adapts the test configuration to the changes made in the commit
fe1ce97c50e575201fe47d7587251e228edf8fdf
|
|
|
|
|
|
| |
This handles changes in:
- The host of the DB.
- New json config file.
|
|
|
|
|
| |
This schema is now adapted to work on this repository instead of the
"OpenGnsys" general repository.
|
| |
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This patch includes tests for the remaining REST API commands:
POST /shell/output
POST /session
POST /poweroff
POST /reboot
POST /stop
POST /refresh
POST /hardware
POST /software
POST /image/create
POST /image/restore
POST /setup
POST /image/create/basic
POST /image/create/incremental
POST /image/restore/basic
POST /image/restore/incremental
POST /run/schedule
This test covers requests that are missing one of the parameters in its
payload.
|
|
|
|
|
| |
This test covers requests that do not contain 1 of the parameters in their
payloads.
|
|
|
|
|
| |
This test covers requests that do not contain 1 of the parameters in their
payloads.
|
|
|
|
|
| |
This test covers requests that do not contain 1 of the parameters in their
payloads.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This patch extends tests for requests without any payload in the following REST
API POST functions:
- /clients
- /wol
- /shell/run
- /shell/output
- /session
- /poweroff
- /reboot
- /stop
- /refresh
- /hardware
- /software
|
|
|
|
| |
This patch renames the setup command to avoid semantic confusion.
|
| |
|
|
|
|
| |
This patch adds missing parameters to the test JSON.
|
|
|
|
|
|
|
|
| |
This test covers 3 scenarios:
1. Correct usage.
2. Incorrect usage, without payload.
3. Incorrect usage, use this command with GET.
|
|
|
|
|
|
|
|
| |
This test covers 3 scenarios:
1. Correct usage.
2. Incorrect usage, without payload.
3. Incorrect usage, use this command with GET.
|
|
|
|
|
|
|
|
| |
This test covers 3 scenarios:
1. Correct usage.
2. Incorrect usage, without payload.
3. Incorrect usage, use this command with GET.
|
|
|
|
|
|
|
|
| |
This test covers 3 scenarios:
1. Correct usage.
2. Incorrect usage, without payload.
3. Incorrect usage, use this command with GET.
|
|
|
|
|
|
|
|
| |
This test covers 3 scenarios:
1. Correct usage.
2. Incorrect usage, without payload.
3. Incorrect usage, use this command with GET.
|
|
|
|
|
|
|
|
| |
This test covers 3 scenarios:
1. Correct usage.
2. Incorrect usage, without payload.
3. Incorrect usage, use this command with GET.
|