summaryrefslogtreecommitdiffstats
path: root/admin/WebConsole/comandos/gestores/gestor_Comandos.php
Commit message (Collapse)AuthorAgeFilesLines
* #990 restfunctions: wol: require clients and wol_type params onlyJose M. Guisado2021-02-151-5/+2
| | | | | | | | | | | | Webconsole is directly querying the database to build the payload for requesting the ogServer a Wake On Lan. ogServer is expected to query the database for the netmask and mac parameters. Do not require the client request to have such parameters. Adjust calls to the wol php method by other OpenGnsys components. Fixes: a35b7c4 ("#990 Use client broadcast address on WoL")
* #1019 Fix decoding of shell command parameters in queue modeJavier Sánchez Parra2021-02-081-1/+14
| | | | | | | | | | UMA report that "delete cached image" and "partition asistant" commands in queue mode do not work (non-queue mode works fine). WebConsole decodes and handles quirks of shell command parameters only when it is not queued. See shell() at restfunctions.php. Add shell command parameters decoding and handling when queued.
* #990 Use client broadcast address on WoLJavier Sánchez Parra2020-07-031-2/+5
| | | | | | | | | | | | | | | | Some universities have computers in a different subnet where the ogServer is, but ogServer WoL functionality only supported to send packet to its own subnets. This commit solves this. Now ogServer sends two WoL packets per client, one with the broadcast address of the interface indicated in the config file, the other with the broadcast address calculated with the address and netmask of the client. To ensure that the second WoL works correctly you must configure correctly the IP and netmask of the clients. Also, you have to configure the network of your organization to route WoL packet to the correct subnet.
* #942 add WoL on commands, procedures and tasks (web)Javier Sánchez Parra2020-06-021-2/+1
|
* #942 add immediate commands on the queue (web)Javier Sánchez Parra2020-06-021-4/+13
| | | | | | | | Users can launch immediate commands on the queue to keep an history and to watch the status and the properties. This commit adapt this functionality to new functions and behaviour of the ogAdmServer.
* #942 schedule commands (web)Javier Sánchez Parra2020-06-021-1/+8
|
* #915 Add new case to command shell/run (web)Javier Sánchez Parra2020-06-021-1/+3
| | | | | | | | | | | | | | | I tried to delete a cache image but the character "*" of the command was missing so the command fails. Command received: "rm -r /opt/opengnsys/cache/opt/opengnsys/images/test." Command expected: "rm -r /opt/opengnsys/cache/opt/opengnsys/images/test.*" This command adds a new case to the call shell/run. This new case is needed because in the case of deleting a image from the cache the web only has to delete the last character of the string instead of last two characters.
* #942 Fix run script tasks encoding (web)Roberto Hueso Gómez2020-06-021-1/+4
|
* #915 Fix EliminarImagenCache command on the WebConsoleJavier Sánchez Parra2019-12-131-0/+2
| | | | | | | | | | | | | Carmelo reports that EliminarImagenCache (Delete image from cache) command does not work. The image remains in place after the execution of the command. This command is actually a wrapper of the command EjecutarScript (POST /shell) with a different ID. Since gestor_Comandos.php did not expect a different ID, EliminarImagenCache did not work. This commit changes the behaviour of gestor_Comandos.php to handle the EliminarImagenCache ID and treat it as EjecutarScript.
* #915 Fix WoL command support in queued commandsJavier Sánchez Parra2019-12-031-1/+2
| | | | | | | | | | | | | Irina reports that the Wake on Lan command does not work in queued commands. This bug appeared when we fixed duplicated command execution when added to the queue (ccb862b). It is caused because the client needs to be ON to ask itself for the queued command, but the WoL command can not work this way because the client is OFF. This commit changes the behaviour of gestor_Comandos.php to always send the WoL command immediately.
* #915 #932: Fix lost variable in Wake-On-Lan function.Ramón M. Gómez2019-11-201-0/+1
|
* #915 Fix error: run_command needs parameter 'cadenamac' for WOL.Irina Gómez2019-11-201-2/+2
|
* #915 Fix duplicated command execution when added to the queueRoberto Hueso Gómez2019-11-151-45/+52
| | | | | | | | This patch fixes duplicated command execution by running queue scheduler instead of directly calling the command's REST API function. If command is already queued, then execute pending commands. Otherwise, invoke the OgAdmServer REST API.
* #915 Fix run script commandRoberto Hueso Gómez2019-10-301-0/+3
| | | | | This patch fixes run script command as it now uses REST API instead of SocketHidra.
* #915 Remove all references to SocketHidraRoberto Hueso Gómez2019-10-291-1/+0
| | | | | This patch removes all remaining references to SocketHidra. The existing code uses the REST API ogAdmServer.
* #915 Remove dead code that uses SocketHidraRoberto Hueso Gómez2019-10-291-1/+0
| | | | This patch removes files that are dead code and that also use SocketHidra.
* #915 Adapt gestor_Comandos.php to use the REST APIRoberto Hueso Gómez2019-10-291-78/+44
| | | | | | | | This patch removes the possibility of commands being executed using SocketHidra and replaces it by the calls to the REST API. It also prevents commands from being executed when they are intended to be added to a task or scheduled.
* #915 Fix POST "software" cmd in ogAdmServer and webJavier Sánchez Parra2019-10-111-1/+1
| | | | | | | | | | | | | | | | | | This patch adds the parameters "disk" and "partition" to POST "software" command. This way the client can create a software profile without failure. New request: POST /software { "clients":[ "192.168.56.12" ], "disk":"1", "partition":"1" } Reply: 200 OK
* #915 Adapt web to use new image/restore/incremental cmd in REST APIJavier Sánchez Parra2019-10-111-0/+5
| | | | SocketHidra command has been replaced by POST image/restore/incremental.
* #915 Adapt web to use new REST API "image/create/incremental" commandRoberto Hueso Gómez2019-10-111-0/+5
| | | | SocketHidra command has been replaced by POST "image/create/incremental".
* #915 Adapt web to use new image/restore/basic cmd in REST APIJavier Sánchez Parra2019-10-091-0/+5
| | | | SocketHidra command has been replaced by POST image/restore/basic.
* #915 Adapt web to use new image/create/basic cmd in REST APIJavier Sánchez Parra2019-10-081-0/+5
| | | | SocketHidra command has been replaced by POST image/create/basic.
* Adapt web to use new image/setup cmd in REST APIRoberto Hueso Gómez2019-10-071-0/+5
| | | | SocketHidra configurar has been replaced by POST image/setup.
* #915: Adapt web to use new image/restore cmd in REST APIRoberto Hueso Gómez2019-10-011-0/+5
| | | | SocketHidra restaurar imagen has been replaced by POST image/restore.
* #915: Adapt web to use new image/create cmd in REST APIRoberto Hueso Gómez2019-10-011-0/+5
| | | | SocketHidra crear imagen has been replaced by POST /imagen/create.
* #915 adapt web to use new software cmd in REST APIJavier Sánchez Parra2019-07-031-0/+5
| | | | | SocketHidra software (inventario software) has been replaced by POST /software.
* #915 adapt web to use new hardware cmd in REST APIJavier Sánchez Parra2019-07-031-0/+5
| | | | | SocketHidra hardware (inventario hardware) has been replaced by POST /hardware.
* #915: Merge branch devel-ogadmserver-rest-api into develRamón M. Gómez2019-06-041-12/+28
|\
| * #915 adapt web console to use new reboot command in REST APIJavier Sánchez Parra2019-05-301-1/+6
| | | | | | | | SocketHidra reboot has been replaced by POST /reboot.
| * #915 adapt web console to use new poweroff command in REST APIJavier Sánchez Parra2019-05-301-7/+14
| | | | | | | | SocketHidra poweroff has been replaced by POST /poweroff.
| * #915 rename IDCOMAND* to OG_CMD_ID_*Javier Sánchez Parra2019-05-301-3/+4
| |
| * #915 adapt web console to use new REST API in OgAdmServerOpenGnSys Support Team2019-05-271-1/+5
| | | | | | | | | | | | Use new REST API in ogAdmServer. This allows us to start removing the old SockHidra code.
* | #891: Boot (wake) command is sent by both server and client repository.Ramón M. Gómez2019-05-301-8/+10
|/
* #834: Fix some HTML tags, remove trailing tabs and convert newlines to Unix ↵Ramón M. Gómez2019-02-251-5/+5
| | | | format.
* #892: Use ogAdmServer Wake on LanJavier Sánchez Parra2019-01-291-2/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | * gestor_Comando.php only execute wakeonlan_repo.php when wake up command is called. * wakeonlan_repo.php send new needed parameters for ogAdmServer WoL. * repository.php use ogAdmServer WoL instead of wakeonlan perl script. * opengnsys_installer.sh and opengnsys_update.sh don't have wakeonlan perl script dependency anymore. # Please enter the commit message for your changes. Lines starting # with '#' will be kept; you may remove them yourself if you want to. # An empty message aborts the commit. # # Date: Mon Jan 28 10:22:57 2019 +0100 # # On branch devel # Your branch is ahead of 'origin/devel' by 1 commit. # (use "git push" to publish your local commits) # # Changes to be committed: # modified: admin/WebConsole/comandos/gestores/gestor_Comandos.php # modified: admin/WebConsole/comandos/gestores/wakeonlan_repo.php # modified: admin/WebConsole/rest/repository.php # modified: installer/opengnsys_installer.sh # modified: installer/opengnsys_update.sh # # Untracked files: # 0001-892-Use-ogAdmServer-Wake-on-Lan.patch # 0001-892-Use-ogAdmServer-Wake-on-Lan.zip #
* #804: Sustituir funciones para compatibilidad con PHP 7 ({{{split}}} por ↵ramon2018-02-271-2/+2
| | | | | | {{{explode}}} y {{{ereg...}}} por {{{preg_...}}}). git-svn-id: https://opengnsys.es/svn/branches/version1.1@5619 a21b9725-9963-47de-94b9-378ad31fedc9
* #743: Mejoras en petición Wake-On-Lan a repositorio:ramon2017-12-141-1/+6
| | | | | | | | | * documentar API REST, * hacer una única llamada múltiple a todos los repositorios afectados, * mostrar aviso si ha habido algún problema de conexión con un repo, * incluir dependencias de instalación/actualización. git-svn-id: https://opengnsys.es/svn/branches/version1.1@5534 a21b9725-9963-47de-94b9-378ad31fedc9
* #743: Usar formato JSON en entrada a ruta REST {{{POST /repository/poweron}}}.ramon2017-12-141-0/+5
| | | | git-svn-id: https://opengnsys.es/svn/branches/version1.1@5533 a21b9725-9963-47de-94b9-378ad31fedc9
* #814: Sustituir las etiquetas cortas de php por el formato largopablombg2017-11-081-1/+1
| | | | git-svn-id: https://opengnsys.es/svn/branches/version1.1@5502 a21b9725-9963-47de-94b9-378ad31fedc9
* #779 Consola Web: Se crea comando 'enviar mensaje'irina2017-04-071-7/+18
| | | | git-svn-id: https://opengnsys.es/svn/branches/version1.1@5258 a21b9725-9963-47de-94b9-378ad31fedc9
* #718 Consola: el comando ejecutar script permite seleccionar el modo de ↵irina2017-03-271-1/+2
| | | | | | ejecución de los agentes nuevos· git-svn-id: https://opengnsys.es/svn/branches/version1.1@5247 a21b9725-9963-47de-94b9-378ad31fedc9
* #708: Nueva ruta {{{GET /ous/:ouid/labs/:labid/clients//status}}} para ↵ramon2017-03-101-1/+0
| | | | | | obtener el estado de todos los clientes de un aula; actualizar definición de la API REST y definir parámetros para evitar duplicados. git-svn-id: https://opengnsys.es/svn/branches/version1.1@5227 a21b9725-9963-47de-94b9-378ad31fedc9
* #718: Actualizar instrucciones y preparar postconfiguración para OGAgent de ↵ramon2017-02-221-1/+1
| | | | | | macOS. git-svn-id: https://opengnsys.es/svn/branches/version1.1@5212 a21b9725-9963-47de-94b9-378ad31fedc9
* #718: OGAgent para macOS soporta apagado, reinicio y preparado para otras ↵ramon2017-02-201-2/+2
| | | | | | operaciones; corrección de erratas en el envío de comandos REST desde la consola web. git-svn-id: https://opengnsys.es/svn/branches/version1.1@5208 a21b9725-9963-47de-94b9-378ad31fedc9
* #708: Obtener datos y código HTTP en llamadas {{{curl_multi}}} de PHP; usar ↵ramon2017-02-101-7/+5
| | | | | | fecha en formato ISO 8601 y quitar líneas en blanco al final de ficheros. git-svn-id: https://opengnsys.es/svn/branches/version1.1@5185 a21b9725-9963-47de-94b9-378ad31fedc9
* #718: Servidor OpenGnsys envía token de seguridad a OGAgent en cabecera HTTP.ramon2017-01-091-5/+4
| | | | git-svn-id: https://opengnsys.es/svn/branches/version1.1@5138 a21b9725-9963-47de-94b9-378ad31fedc9
* #718: Paso de parámetros POST en llamadas REST a agente OGAgent.ramon2017-01-051-1/+5
| | | | git-svn-id: https://opengnsys.es/svn/branches/version1.1@5135 a21b9725-9963-47de-94b9-378ad31fedc9
* #718: Soportar comando Ejecutar Script en agente de sistema operativo.ramon2017-01-051-0/+8
| | | | git-svn-id: https://opengnsys.es/svn/branches/version1.1@5134 a21b9725-9963-47de-94b9-378ad31fedc9
* #718: Usar clave de acceso a OGAgent en peticiones del servidor (por el ↵ramon2016-10-131-3/+8
| | | | | | momento usando método GET); soportar cabeceras y simplificar las llamadas a cURL. git-svn-id: https://opengnsys.es/svn/branches/version1.1@5033 a21b9725-9963-47de-94b9-378ad31fedc9
* #718 Consola - gestor de comandos: Se envían las acciones Apagar y ↵irina2016-04-071-2/+56
| | | | | | Reiniciar a OGAgent y se registra el resultado en la cola de acciones git-svn-id: https://opengnsys.es/svn/branches/version1.1@4864 a21b9725-9963-47de-94b9-378ad31fedc9