OpenGnSys Support Team
0a09c5b09c
#1022 increase maximum API REST request size
...
Software inventory generates a request larger that 64 Kbytes.
Rise the maximum API REST request size to 128 Kbytes.
2021-02-04 13:29:24 +01:00
Isabel Arrans
1472ff276f
#915 add test POST /client/delete
2020-12-17 19:18:54 +01:00
Diego Crespo Quinta
1ed772ba80
#915 Fix GET /software test
2020-12-15 20:03:46 +01:00
Isabel Arrans
10b07ba2b9
#915 Fix test POST /client/add
2020-12-15 20:02:46 +01:00
Isabel Arrans
646355d3c7
#915 Fix GET /client/info test
2020-12-15 20:01:51 +01:00
Diego Crespo Quinta
be9816eb4e
#915 Add GET /software test
2020-12-12 19:32:39 +01:00
Diego Crespo Quinta
ca633e62fe
#915 Add GET /hardware test
2020-12-12 19:32:11 +01:00
Isabel Arrans
6386d37bf9
#915 Test for GET /client/info and POST /client/add
2020-12-11 23:16:43 +01:00
Diego Crespo Quinta
a043fca7f8
#915 Add POST /mode test
2020-12-02 09:50:03 +01:00
Diego Crespo Quinta
5b42e34b59
#915 Fix POST /setup test
...
Add new type field to json.
2020-12-02 09:48:13 +01:00
Diego Crespo Quinta
aeb53bd351
#915 Test GET /scopes
...
And fix ogserver, report error if GET /scopes have a JSON body.
2020-12-01 19:29:37 +01:00
Diego Crespo Quinta
727f31a88b
#915 add GET /session test
2020-11-17 00:33:23 +01:00
Isabel Arrans
8bb855344c
#915 test malformed body in GET /client/setup
2020-11-10 14:47:47 +01:00
Isabel Arrans
09a064c3ff
#915 fix POST /hardware test
2020-10-27 17:05:01 +01:00
Isabel Arrans
b11608152e
#915 restore more tests
2020-10-24 12:53:11 +02:00
OpenGnSys Support Team
b0d18cd887
#915 remove old REST API from run-test.sh
2020-10-23 13:27:36 +02:00
Diego Crespo Quinta
45711db04f
#915 Fix expected returned codes in GET /session and GET /software tests
...
Fix incorrect status code.
2020-10-22 22:37:36 +02:00
Diego Crespo Quinta
1d451acff5
#915 Fix several test errors
...
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.
2020-10-22 18:58:56 +02:00
Roberto Hueso Gómez
068c0f2794
#915 Use string for tests config port
...
This adapts the test configuration to the changes made in the commit
fe1ce97c50
2020-10-07 16:56:26 +02:00
Roberto Hueso Gómez
4a06c7a391
#915 Update run-tests.py to the latest changes
...
This handles changes in:
- The host of the DB.
- New json config file.
2020-10-07 14:05:56 +02:00
Roberto Hueso Gómez
5b1efd0b53
#915 Add default SQL schema for tests
...
This schema is now adapted to work on this repository instead of the
"OpenGnsys" general repository.
2020-10-07 14:05:02 +02:00
OpenGnSys Support Team
333abbe160
#986 rename to ogserver
2020-06-19 11:19:55 +02:00
Roberto Hueso Gómez
d1fc76c6b4
#942 Add REST API /schedule get function
2020-06-02 12:32:36 +02:00
OpenGnSys Support Team
83b242ce58
#942 Add support for scheduled tasks and commands
...
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
2020-06-02 12:32:36 +02:00
OpenGnSys Support Team
96b9bb865c
#942 Add /run/task to API REST
...
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.
2020-06-02 12:32:36 +02:00
Roberto Hueso Gómez
abd2b913d8
#915 Test malformed payload for POST commands
...
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.
2019-11-14 14:51:13 +01:00
Roberto Hueso Gómez
1cdbc5facf
#915 Test malformed payload for POST /shell/run
...
This test covers requests that do not contain 1 of the parameters in their
payloads.
2019-11-13 14:16:02 +01:00
Roberto Hueso Gómez
682d3b6b17
#915 Test malformed payload for POST /wol
...
This test covers requests that do not contain 1 of the parameters in their
payloads.
2019-11-13 14:16:01 +01:00
Roberto Hueso Gómez
4d98bdf5f6
#915 Test malformed payload for POST /clients
...
This test covers requests that do not contain 1 of the parameters in their
payloads.
2019-11-13 14:15:58 +01:00
Roberto Hueso Gómez
65cc7c17e2
#915 Extend REST API POST no payload tests to all remaining tests.
...
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
2019-11-13 14:15:56 +01:00
Roberto Hueso Gómez
6c91d147c1
#915 Rename POST /image/setup for /setup in REST API
...
This patch renames the setup command to avoid semantic confusion.
2019-11-13 14:15:43 +01:00
Roberto Hueso Gómez
ee2e16ac96
#915 Adapt POST /shell/run test to the 'echo' parameter
2019-11-12 21:37:11 +01:00
Roberto Hueso Gómez
64b470514b
#915 Fix ogAdmServer POST /software test parameters
...
This patch adds missing parameters to the test JSON.
2019-11-06 11:16:22 +01:00
Roberto Hueso Gómez
2bc2490d00
#915 Add test for POST /run/schedule REST API
...
This test covers 3 scenarios:
1. Correct usage.
2. Incorrect usage, without payload.
3. Incorrect usage, use this command with GET.
2019-10-31 13:18:48 +01:00
Roberto Hueso Gómez
1f55beb8f5
#915 Add test for POST /image/restore/incremental REST API
...
This test covers 3 scenarios:
1. Correct usage.
2. Incorrect usage, without payload.
3. Incorrect usage, use this command with GET.
2019-10-31 13:18:48 +01:00
Roberto Hueso Gómez
20f935bb65
#915 Add test for POST /image/restore/basic REST API
...
This test covers 3 scenarios:
1. Correct usage.
2. Incorrect usage, without payload.
3. Incorrect usage, use this command with GET.
2019-10-31 13:18:48 +01:00
Roberto Hueso Gómez
b5722de3fb
#915 Add test for POST /image/create/incremental REST API
...
This test covers 3 scenarios:
1. Correct usage.
2. Incorrect usage, without payload.
3. Incorrect usage, use this command with GET.
2019-10-31 13:18:48 +01:00
Roberto Hueso Gómez
713070ab10
#915 Add test for POST /image/create/basic REST API
...
This test covers 3 scenarios:
1. Correct usage.
2. Incorrect usage, without payload.
3. Incorrect usage, use this command with GET.
2019-10-31 13:18:48 +01:00
Roberto Hueso Gómez
1436d44cc6
#915 Add test for POST /image/setup REST API
...
This test covers 3 scenarios:
1. Correct usage.
2. Incorrect usage, without payload.
3. Incorrect usage, use this command with GET.
2019-10-31 13:18:48 +01:00
Roberto Hueso Gómez
ba3b1ad543
#915 Add test for POST /image/restore REST API
...
This test covers 3 scenarios:
1. Correct usage.
2. Incorrect usage, without payload.
3. Incorrect usage, use this command with GET.
2019-10-31 13:18:48 +01:00
Roberto Hueso Gómez
b4d2890460
#915 Add test for POST /image/create REST API
...
This test covers 3 scenarios:
1. Correct usage.
2. Incorrect usage, without payload.
3. Incorrect usage, use this command with GET.
2019-10-31 13:18:48 +01:00
Roberto Hueso Gómez
2f7e9da5ab
#915 Add POST "run/schedule" command to REST API in ogAdmServer
...
This patch implements the command "run/schedule" that kicks in pending commands
execution.
Request:
POST /run/schedule
{
"clients": ["192.168.56.11"]
}
Reply:
200 OK
This patch also adds a simple test to cover correction of the command.
2019-10-25 14:12:09 +02:00
Javier Sánchez Parra
90672e4a25
#915 Add test for POST /image/restore/incremental command
...
This test covers correction of the command.
2019-10-11 11:57:08 +02:00
Roberto Hueso Gómez
45f414e32c
#915 Add test for POST "image/create/incremental" command
...
This test covers correction of the command.
2019-10-11 11:57:08 +02:00
Javier Sánchez Parra
17eeac1284
#915 Add test for POST /image/restore/basic command
...
This test covers correction of the command.
2019-10-09 15:27:59 +02:00
Javier Sánchez Parra
74061887ee
#915 Add test for POST /image/create/basic command
...
This test covers correction of the command.
2019-10-08 14:01:14 +02:00
Roberto Hueso Gómez
ad4d4bdbbe
Add test for POST /image/create command
...
This test covers correction of the command.
2019-10-07 11:15:28 +02:00
OpenGnSys Support Team
e5cfdd6406
#915 : adapt test to use id and profile fields
...
Update restore_image.json to use id and profile fields.
2019-10-01 12:59:50 +02:00
Roberto Hueso Gómez
1dde02e1ab
#915 : Add POST /image/restore command to REST API in ogAdmServer
...
This patch implements the command "image/create" that creates an image
in a client.
Request:
POST /image/restore
{ "clients" : [ "192.168.56.11" ], "disk" : "1", "partition" : "1", "name" : "test", "repository" : "192.168.56.10", "type" : "UNICAST", "filesystem": "1", "image_id": "1"}
Reply:
200 OK
2019-10-01 12:56:10 +02:00
Roberto Hueso Gómez
1a8ada191f
#915 : Add POST /image/create command to REST API in ogAdmServer
...
This patch implements the command "image/create" that creates an image
in a client.
Request:
POST /image/create
{ "clients" : [ "192.168.2.1" ], "disk" : "1", "partition" : "1", "code" : "1", "id" : "1", "name" : "test", "repository" : "192.168.2.2" }
Reply:
200 OK
2019-10-01 12:56:10 +02:00