Commit Graph

3627 Commits (a0df5af7248f31bab8a799268e35373936d5911c)
 

Author SHA1 Message Date
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
Ramón M. Gómez b6641ee130 #914: Changes to generate a new ogLive client based on Linux 5.0 2019-05-23 10:04:30 +02:00
Ramón M. Gómez cdbf1fcfe0 #872: Update list of closed tickets. 2019-05-23 07:44:59 +02:00
Ramón M. Gómez 6a60a24f9c #872: Fix a little bug when a client launch its browser. 2019-05-23 07:44:59 +02:00
Irina Gomez 588d1eb2b5 #802 #889 cloneRemoteFromMaster script in master, when computer has Efi active and operating system is Windows, copies boot loader folder from ESP to system partition. 2019-05-22 14:19:55 +02:00
Irina Gomez ff5e572cf3 #802 #888 ogRefindInstall used wrong parameter when calling ogNvramGetOrder. ogNvramSetOrder use uppercase in hexadecimal number because efibootmgr need it. 2019-05-22 13:27:57 +02:00
Ramón M. Gómez 1ee5a76ca2 #913: OGAgent uses decorator to check autorization header and cleaning the Python code. 2019-05-22 11:20:56 +02:00
Irina Gomez 093ebcd461 #802 #889 createImage script don't use 'ogSaveImageInfo' for Windows. 'ogSaveImageInfo' function is removed. 2019-05-22 10:24:20 +02:00
Irina Gomez d7d1ec812e #802 #888 refind: options parameter cannot include string 'initrd', to start ogLive we exclude option 'ogupdateinitrd' 2019-05-22 10:04:01 +02:00
Ramón M. Gómez 184aa06b5c Refs #913: Adding loop to connect to the server when OGAgent is activated. 2019-05-20 18:06:42 +02:00
Antonio Doblas Viso f1bc9d85ad #909 updateCache in assistant.js identifies the REPO with its IP address 2019-05-16 12:04:04 +02:00
Ramón M. Gómez 4f64fa1837 #912: Fix bugs in update script: generating a new repository access token and uncompressing downloaded code; update closed tickets list. 2019-05-16 11:43:48 +02:00
Irina Gomez 97b8472e4a #895 Fix initCache: if the size of the cache changes, it always formats the cache. ogCheckFs includes the CACHE file system type 2019-05-15 14:13:17 +02:00
Irina Gomez f097c21f1d Fix initCache: if the size of the cache changes, it always formats the cache. ogCheckFs includes the CACHE file system type 2019-05-15 11:16:31 +02:00
Irina Gomez 04b15943a1 Merge branch 'devel' into uefi (fast-forward) 2019-05-13 10:14:38 +02:00
Javier Sánchez Parra fec3e4f551 #834: Revert one !JavaScript strict comparisons
Undoes some strict comparisons added in the commit a7406f2 because it
is necessary to compare different data types. Related with a1d39fe
2019-05-07 13:45:41 +02:00
Javier Sánchez Parra a1d39fe944 #834: Revert some JavaScript strict comparisons
Undoes some strict comparisons added in the commit a7406f2 because it
is necessary to compare different data types
2019-05-03 09:21:10 +02:00
Irina Gomez b845aabe00 #802 #888 PXE UEFI: In grub.cfg if computer config file doesn't exist load default config. 1hd template replaces rEFInd template. 2019-04-25 14:13:04 +02:00