summaryrefslogtreecommitdiffstats
path: root/src/linux/ogOperations.py
Commit message (Collapse)AuthorAgeFilesLines
* Use 'bash' as the default shell for operations scriptsRoberto Hueso Gómez2020-02-091-12/+28
|
* Use python f-strings for commands compositionRoberto Hueso Gómez2020-02-051-14/+13
|
* Fix /session executionRoberto Hueso Gómez2020-02-051-1/+4
| | | | The script now reads arguments correctly.
* Fix /image/restore execution and responseRoberto Hueso Gómez2020-02-051-1/+5
|
* Fix /image/create execution and responseRoberto Hueso Gómez2020-02-051-2/+10
|
* (BUG) Rename OG_SCRIPT_PATH to OG_PATHAlvaro Neira Ayuso2020-02-041-2/+2
|
* Fix /setup execution and responseRoberto Hueso Gómez2020-02-031-8/+15
|
* Fix parseGetConf(...) configuration parsingRoberto Hueso Gómez2020-02-031-21/+22
| | | | This patch also reformats the response to the /refresh command.
* Change POST /refresh to GET /refreshRoberto Hueso Gómez2020-01-211-4/+4
| | | | | This patch changes the HTTP method for /refresh and cleans up the implementation of the /refresh Linux operator.
* Fix /software command Linux operationRoberto Hueso Gómez2020-01-211-1/+7
| | | | | This patch runs the script InventarioSoftware with the right arguments. This also increases the recv buffer size for the test server.
* Fix /shell/run commands splittingRoberto Hueso Gómez2020-01-211-1/+1
| | | | This patch splits shell commands either with ';' or '\n'.
* Fix /hardware command Linux operationRoberto Hueso Gómez2020-01-211-1/+4
| | | | This patch runs the script InventarioHardware with the right arguments.
* (Clean-Up) Rename all the functions in ogRest to new ones more clearsAlvaro Neira Ayuso2020-01-191-7/+7
|
* (Clean-Up) Rename HTTPParser to restRequestAlvaro Neira Ayuso2020-01-191-26/+26
|
* (Clean-Up) Rename cmd function/variables to use "run" syntaxAlvaro Neira Ayuso2020-01-191-1/+1
|
* Add Refresh commandAlvaro Neira Ayuso2020-01-191-16/+38
| | | | | | | | | | | | This patch allows us to execute refresh command using ogClient. This command gets all the configuration in our machine and send this information to the server. The format of the message that ogClient will send to the server will be: {"disk": "1", "partition_setup": [{"partition": "1", "code": "LINUX", "filesystem": "NTFS", "size": "498688", "format": "0"}, {"partition": "2", "code": "LINUX", "filesystem": "NTFS", "size": "498688", "format": "0"}, {"partition": "3", "code": "LINUX", "filesystem": "NTFS", "size": "498688", "format": "0"}]}
* Add image/create command for creating a new imageAlvaro Neira Ayuso2020-01-191-0/+23
| | | | | | | | | | | | | | | | This patch allows us to use a new support for creating images using ogClient. ogClient receives from the server a message which json body must be: {"disk" : "1", "partition" : "1", "code" : "1", "id" : "1", "name" : "test", "repository" : "192.168.2.4" } ogClient returns to the server the software inventory executed before create the image. The message for the server is: { "disk" : "0", "partition" : "1", "software" : "xyz" } "xyz" will be the output saved during the execution of InventarioSoftware in a specific path.
* Include License headerAlvaro Neira Ayuso2020-01-191-0/+8
|
* Add stop commandAlvaro Neira Ayuso2020-01-191-17/+26
| | | | | This patch includes a new support for stopping all the process running on the ogClient.
* Improve setup command responseAlvaro Neira Ayuso2020-01-191-1/+22
| | | | | | | | | | This patch adds a new response support. This way allows us to send a new response message with more information about the partitions already set up. The format of the response is: { "disk" : "1", "cache" : "1", "cache_size" : "0", "partition_setup": [{"partition": "1", "code": "LINUX", "filesystem": "EMPTY", "size": "498688", "format": "0"}...]
* Catch execution errors during restore image commandAlvaro Neira Ayuso2020-01-191-1/+5
| | | | | | This patch allows us to send feedback to the server in case of error during the execution of the command. In case of error, ogClient will send an "Internal Error" http message.
* Improve hardware command response behaviorAlvaro Neira Ayuso2020-01-191-1/+5
| | | | | | | | | | | This patch give us a better support in case of error or success execution. In error cases, the new behavior is to send an Internal Error http message (500). Otherwise, the server will receive a message with a json with this format: { "hardware" : "xyz" } "xyz" is the output saved in a specific path during the execution of InventarioHardware.
* Improve software command response behaviorAlvaro Neira Ayuso2020-01-191-1/+5
| | | | | | | | | | | | | | | During our tests, we found some limitation during the execution of the software command. We don't manage errors during the execution of this command. Moreover, the server needs some information in case that everything is OK. This patch modified the code for controlling the errors during the execution, returning an "Internal Error" http message (500). Moreover, in case that everything is OK, ogClient sends a message with this json body: { "disk" : "0", "partition" : "1", "software" : "xyz" } "xyz" will be the output saved during the execution of InventarioSoftware in a specific path.
* Catch execution errors during init session commandAlvaro Neira Ayuso2020-01-191-1/+5
| | | | | | This patch allows us to catch an exception when something wrong is happening executing the init session command. In error cases, ogClient sends an internal error http message to the server. Otherwise, an OK http message.
* Modify methods to use less argumentsAlvaro Neira Ayuso2020-01-191-5/+25
| | | | | | Now, all the arguments are received from httpparser. Those arguments convert the function in long lines of codes. Passing directly the httpparser, all the function will have less arguments and will be more clear the code.
* Add restore/image command for restoring images on the machineAlvaro Neira Ayuso2020-01-191-0/+4
| | | | | | | | | ogAdmClient has a support to restore image on the machine. This new command allows the new ogClient to execute the same script to restore the images on the machine. The json format sent from the server must be: { "disk" : "1", "partition" : "1", "name" : "test",\ "repository" : "192.168.56.10", "type" : "UNICAST", "profile": "1", "id": "1"}
* Add setup command for configuring the machineAlvaro Neira Ayuso2020-01-191-0/+5
| | | | | | | | | | ogAdmClient has a support to configure the machines. This new command allows the new ogClient to execute the same script to configure the machine. The json format sent from the server must be: { "disk" : "1", "cache" : "0", "cache_size" : "70000000",\ "partition_setup": [{"partition": "1", "code": "NTFS", "filesystem": "NTFS",\ "size": "11000000", "format": "0"}]}
* Add hardware command to inventory the machine hardwareAlvaro Neira Ayuso2020-01-191-0/+4
| | | | | | ogAdmClient has a support to inventory the hardware in a machine. This new command allows the new ogClient to execute the same script to inventory the hw. No arguments needed for executing the command
* Add software command to inventory the machine softwareAlvaro Neira Ayuso2020-01-191-0/+4
| | | | | | | | ogAdmClient has a support to inventory the software in a machine. This new command allows the new ogClient to execute the same script to inventory the sw. The arguments will be received from the server as a json message. Format: { "disk" : "0", "partition" : "1"}
* Add session command to init the opengnsys sessionAlvaro Neira Ayuso2020-01-191-0/+4
| | | | | | | | ogAdmClient has a support for initializing the session in the machine. This new command allows the new ogClient to execute the same script to init the session. The arguments will be received from the server as a json message. Format: { "disk" : "0", "partition" : "1"}
* (BUG) Handling command errorAlvaro Neira Ayuso2020-01-191-2/+6
| | | | | | This patch adds support for handling the error when the command is wrong formed. Now, if we send a shell/run command and the shell command is incomplete, the program crashes.
* Add shell run and output commandsAlvaro Neira Ayuso2020-01-191-0/+5
| | | | | | | | Opengnsys needs a support to execute commands on the machine. This patch adds the support for executing two new commands "shell/run" and "shell/output". The first one, give us the support for executing a command in the machine and keep save in a queue the output. The second one, give us the support for sending the output from the command executed.
* Add global variable to set up OpenGnsys pathAlvaro Neira Ayuso2020-01-191-2/+4
| | | | | | This variable allow us to modify the opengnsys path without modify several parts of the code. This change reduces the probability to add any bug forgetting to change any line.
* Include the reboot support in ogOperationAlvaro Neira Ayuso2020-01-191-2/+4
| | | | | This new patch allows us to reboot the linux machine using reboot binary or in OpenGnsys client case, use the specific script.
* Include the poweroff support in ogOperationAlvaro Neira Ayuso2020-01-191-1/+7
| | | | | This new patch allows us to turn off the linux machine using poweroff binary or in OpenGnsys client case, use the specific script.
* Add new process support for reboot messageAlvaro Neira Ayuso2020-01-191-0/+3
|
* Add ogProcess and ogOperation for linuxAlvaro Neira Ayuso2020-01-191-0/+3
Thoses new classes allows us to process and execute commands from server side sent using HTTP format.