Commit Graph

4194 Commits (ce6fe2e749fd704467db368fbe08d99d9bcba545)
 

Author SHA1 Message Date
Ramón M. Gómez 73f9a33e4f #915: Installing a new ogAdmServer compilation dependency, if needed. 2019-06-05 09:17:03 +02:00
Irina Gomez a90a05128f Merge branch 'devel' into uefi
Fast foward with devel branch
2019-06-05 09:03:22 +02:00
Ramón M. Gómez 1d3959b1b6 #915: Merge branch devel-ogadmserver-rest-api into devel 2019-06-04 18:28:27 +02:00
Irina Gomez 292982df96 For UEFI the format of PXE filename is '01-'. Where is written in lowercase and split up with colon. 2019-06-04 13:51:13 +02:00
Ramón M. Gómez 41974617ed #914: Update list of closed tickets. 2019-06-04 13:26:47 +02:00
Ramón M. Gómez 2adfccd002 #917: Fixed bug when compiling {{{ms-sys}}} command on ogLive. 2019-06-04 13:23:01 +02:00
Ramón M. Gómez 60c06d743c #917: Fixed bug when installing 32-bit libraries used by the Browser. 2019-06-04 13:20:56 +02:00
Ramón M. Gómez dbc61ba226 #917: Fixed bug when ogLive mounts a Samba share from a server based on Ubuntu 18.04 2019-06-04 13:13:38 +02:00
Ramón M. Gómez 8ca0cc95b0 #916: Instalation script does not display characters when the user enters a password and asks for password confirmation. 2019-06-04 12:59:33 +02:00
Ramón M. Gómez fb148e6dda #872: Download correct OGAgent version. 2019-06-03 10:22:35 +02:00
Javier Sánchez Parra c691949093 #915 add test for POST /session REST API 2019-05-31 11:39:43 +02:00
Javier Sánchez Parra 7a276ba019 #915 add test for POST /shell/output REST API 2019-05-31 11:39:29 +02:00
Javier Sánchez Parra 1e88c02e1e #915 add test for POST /shell/run REST API 2019-05-31 11:39:06 +02:00
Javier Sánchez Parra 78236f8abf #915 add test for POST /wol REST API 2019-05-31 11:39:01 +02:00
Javier Sánchez Parra a4ec92b791 #915 add test for POST /clients REST API 2019-05-31 11:38:57 +02:00
Javier Sánchez Parra 7137439d0b #915 add test for GET /clients REST API 2019-05-31 11:38:52 +02:00
Javier Sánchez Parra 58ac5495f7 #915 add unit test infrastructure for REST API
This python script creates a database and starts ogAdmServer to run the
tests.  This requires root to be launched:

	# ./run-tests.py

From the 'tests' folder.
2019-05-31 11:35:42 +02:00
Irina Gomez 3f4a9b7f23 #802 #890 {{{grubInstallXx}}} install correctly the grub first stage with secureBoot. {{{ogBoot}}} uses NVRAM functions. 2019-05-31 11:11:31 +02:00
OpenGnSys Support Team b3467f7ddb #915 validate message length based on announced Content-Length field
Otherwise, TCP segmentation leads to handle an incomplete payload, this
problems manifests with errors when parsing the json body.
2019-05-31 00:20:05 +02:00
Javier Sánchez Parra c9cfd44a96 #915 adapt web console to use new refresh command in REST API
SocketHidra "actualizar" has been replaced by POST /refresh.
2019-05-30 17:17:39 +02:00
Javier Sánchez Parra dc82754604 #915 adapt web console to use new stop command in REST API
SocketHidra "purgar" has been replaced by POST /stop.
2019-05-30 17:17:39 +02:00
Javier Sánchez Parra da462c8634 #915 adapt web console to use new reboot command in REST API
SocketHidra reboot has been replaced by POST /reboot.
2019-05-30 17:17:39 +02:00
Javier Sánchez Parra 251bb977c4 #915 adapt web console to use new poweroff command in REST API
SocketHidra poweroff has been replaced by POST /poweroff.
2019-05-30 17:17:39 +02:00
Javier Sánchez Parra 34ba8687b7 #915 rename IDCOMAND* to OG_CMD_ID_* 2019-05-30 17:17:39 +02:00
OpenGnSys Support Team 174c223117 #915 remove Actualizar(), Purgar(), Reiniciar() and IniciarSesion()
The new REST API obsoletes the following commands:

- Actualizar() has been replaced by POST /refresh.
- Purgar() has been replaced by POST /stop.
- Reiniciar() has been replaced by POST /reboot.
- IniciarSesion() has been replaced by POST /session.
2019-05-30 15:32:26 +02:00
OpenGnSys Support Team b317d24d05 #915 add POST refresh command to REST API in ogAdmServer
Forces client to fetch and run any pending command from the server,
reload its local configuration file and re-start its selection menu.

curl -X POST http://127.0.0.1:8888/refresh -d @refresh.json

    Request
            POST /refresh
            {"clients": [ "192.168.2.1" ] }
    Reply:
            200 OK
2019-05-30 15:32:24 +02:00
OpenGnSys Support Team 55134355b9 #915 add POST stop command to REST API in ogAdmServer
Stop the menu selection on client (through POST method):

curl -X POST http://127.0.0.1:8888/stop -d @stop.json

Request
	POST /stop
	{"clients": [ "192.168.2.1" ] }
Reply:
	200 OK
2019-05-30 15:32:22 +02:00
OpenGnSys Support Team 68270b3ced #915 add POST reboot command to REST API in ogAdmServer
Reboot a client (through POST method):

        curl -X POST http://127.0.0.1:8888/reboot -d @reboot.json

Request
        POST /reboot
        {"clients": [ "192.168.2.1" ] }
Reply:
        200 OK
2019-05-30 15:32:18 +02:00
OpenGnSys Support Team b231a5a576 #915 add POST poweroff command to REST API in ogAdmServer
Power off a client (through POST method):

        curl -X POST http://127.0.0.1:8888/poweroff -d @poweroff.json

Request
        POST /poweroff
        {"clients": [ "192.168.2.1" ] }
Reply:
        200 OK
2019-05-30 15:32:01 +02:00
Ramón M. Gómez e57b608e4e #891: Boot (wake) command is sent by both server and client repository. 2019-05-30 10:49:13 +02:00
OpenGnSys Support Team 8411d3ba4f #915 add og_cmd_legacy_send()
Add function to send legacy command to clients.
2019-05-29 12:45:28 +02:00
Ramón M. Gómez d4e02b28f5 #872: Fix bug in symbolic links. 2019-05-27 14:11:49 +02:00
OpenGnSys Support Team 560455a8c9 #915 adapt web console to use new REST API in OgAdmServer
Use new REST API in ogAdmServer.

This allows us to start removing the old SockHidra code.
2019-05-27 13:05:58 +02:00
OpenGnSys Support Team b9d5756a29 #915 remove Sondeo(), respuestaSondeo(), ConsolaRemota(), Arrancar() and EcoConsola()
The new REST API obsoletes the following commands:

- Sondeo() has been replaced by GET /clients.
- respuestaSondeo() has been replaced by POST /clients.
- ConsolaRemota() has been replaced by POST /shell/run.
- EcoConsola() has been replaced by POST /shell/output.
- Arrancar() has been replaced by POST /wol.
2019-05-27 13:03:14 +02:00
OpenGnSys Support Team 22ab637be2 #915 add POST session command to REST API in ogAdmServer
Start a session on client (through POST method):

        curl -X POST http://127.0.0.1:8888/session -d @session.json

Request
        POST /session
        {"clients": [ "192.168.2.1" ] }
Reply:
        200 OK
2019-05-27 13:03:05 +02:00
OpenGnSys Support Team 165cea3d7e #915 add POST shell/output command to REST API in ogAdmServer
Fetching result from run command on client (through GET method):

        curl -X POST http://127.0.0.1:8888/shell/output -d @post_shell_output.json

Request
        POST /shell/output
        {"clients": [ "192.168.2.1" ] }
Reply:
        200 OK
	{"clients": [ { "addr" : "192.168.2.1", "output" : "..." } ] }
2019-05-27 13:03:00 +02:00
OpenGnSys Support Team 775f6f0a16 #915 add run command to REST API in ogAdmServer
Run command on client (through POST method):

	curl -X POST http://127.0.0.1:8888/shell/run -d @post_run.json

Request
	POST /shell/run
	{"clients": [ "192.168.2.1", "192.168.2.2" ], "run" : "ls" }
Reply:
	200 OK
2019-05-27 13:02:57 +02:00
OpenGnSys Support Team 73c4bdffad #915 add wol command to REST API in ogAdmServer
Send Wake-On-Lan to clients (through POST method):

Request:
	curl -X POST http://127.0.0.1:8888/wol
	{ "type" : "unicast", "clients" : [ { "addr" : "192.168.2.1", "mac" : "00AABBCCDD01" } ] }
Reply:
	200 OK
2019-05-27 13:02:52 +02:00
OpenGnSys Support Team 62c056026f #915 Pass array of addresses to WakeUp()
To reuse this function to the REST API.
2019-05-27 13:02:49 +02:00
OpenGnSys Support Team ea03692869 #915 add clients command to REST API in ogAdmServer
Request for existing clients:

	curl -X GET http://127.0.0.1:8888/clients

Request:
	GET /clients
Reply:
	200 OK
	{"clients": [ { "addr" : "192.168.2.1", "state" : "OPG" }, { "addr" : "192.168.2.2", "state" : "OFF" }]}
2019-05-27 13:02:45 +02:00
OpenGnSys Support Team 1a08c06378 #915 add initial REST API for ogAdmServer
Add REST API for ogAdmServer, this API is exposed through port 8888 on
the system that runs the ogAdmServer. The body of the HTTP message is
expressed in JSON format.

This patch implements the command "clients" that maps to the existing
legacy "Sondeo" command, that is used by the web interface to poll
refresh the client state.

This patch also includes an initial test infrastructure using 'curl' to
send commands to the new REST API.

Request:
	POST /clients
	{"clients" : [ "192.168.2.1", "192.168.2.2" ]}
Reply:
	200 OK

This allows to refresh the status of the list of clients.
2019-05-27 13:02:37 +02:00
OpenGnSys Support Team 39737596c0 #915 add og_msg_alloc() and og_msg_free()
Add function to allocate and release the legacy message format.
2019-05-27 13:02:33 +02:00
OpenGnSys Support Team c8e415bc2f #915 add og_send_cmd()
Add new function to check and send commands to the clients. This new
function takes an array of IP addresses (string) and send commands to
the clients.
2019-05-27 13:02:20 +02:00
OpenGnSys Support Team 588052e2dc #915 add og_socket_server_init()
Move code to create a socket into a function.
2019-05-27 13:02:06 +02:00
OpenGnSys Support Team 07c51e222d #915 add og_client_state_process_payload()
Move code that handles the message payload into function.
2019-05-27 13:02:00 +02:00
OpenGnSys Support Team 39c3261a8c #915 add og_client_state_recv_hdr()
Move code that handles the receiving header state into function.
2019-05-27 13:01:35 +02:00
Irina Gomez 5b809ba345 #802 #890 ogGrubInstall includes option to secure boot. 2019-05-27 10:25:47 +02:00
Irina Gomez d6ff164517 #802 #889 ogSetPartitionActive shows message as warning 2019-05-23 13:04:58 +02:00
Ramón M. Gómez 75a17417ac #914: Updating changelog of OGAgent for Linux. 2019-05-23 12:38:53 +02:00
Irina Gomez 63eec7759f #802 #889 ogSetPartitionActive ends without change to UEFI computers. In this case to active a particion we must use ogNvramActiveEntry 2019-05-23 12:09:18 +02:00