summaryrefslogtreecommitdiffstats
path: root/src
Commit message (Collapse)AuthorAgeFilesLines
* #980 Change GET and POST /modes URI to /modeRoberto Hueso Gómez2020-08-031-2/+2
| | | | | This patch changes the URI since it is semantically more correct to use the singular.
* #980 Fix POST /modes to use 'setclientmode' scriptRoberto Hueso Gómez2020-07-291-35/+140
| | | | | | | | | | | Now POST /modes does not only write to the database, it also uses the external bash script 'setclientmode' to generate configured PXE templates for each machine. NOTE: This fix requires that room and computer names are unique in the OpenGnsys DB. This behaviour is inherited from the previous 'setclientmode' script but, eventually, it should be replaced for an actual scope selector.
* #988 Check DB port size is in [0, UINT16_MAX]Roberto Hueso Gómez2020-07-151-1/+2
| | | | | Max port number is UINT16_MAX, so this checks whether this config parameter is in the correct range.
* #988 Add DB port option to ogserver.json config fileRoberto Hueso Gómez2020-07-106-0/+13
| | | | | This patch provides functionality to select a database port. It also adds a default IP for the database.
* Add GET /hardware REST requestRoberto Hueso Gómez2020-07-081-2/+110
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This patch implements HTTP GET /hardware request which returns a list of the hardware associated with a particular computer. Request: GET /hardware { "scope": { "id": 6, "type": "computer" } } Response: 200 OK { "hardware": [ { "type": "Microprocesadores", "description": "CPU arch:x86 target:x86_64 cores:4" }, { "type": "Memorias", "description": "QEMU 4096MiB" }, { "type": "Tarjetas gráficas", "description": "Red Hat, Inc Virtio GPU" }, { "type": "Tarjetas de Red", "description": "Intel Corporation 82540EM Gigabit Ethernet Controller QEMU Virtual Machine" }, { "type": "Controladores IDE", "description": "Intel Corporation 82371SB PIIX3 IDE [Natoma/Triton II] Qemu virtual machine" } ] }
* Add POST /modes REST requestRoberto Hueso Gómez2020-07-063-2/+136
| | | | | | | | | | | | | This patch implements HTTP POST /modes request which can change the mode of any particular scope. Request: POST /modes { "scope": {"id": 1, "type": "computer"}, "mode": "pxe" } Response: 200 OK
* #971 split wake on lan codeOpenGnSys Support Team2020-07-063-68/+91
| | | | Add wol.c and wol.h that implements WakeOnLan.
* #990 Use client broadcast address on WoLJavier Sánchez Parra2020-07-034-12/+35
| | | | | | | | | | | | | | | | 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.
* #971 linkage error after splitOpenGnSys Support Team2020-07-025-26/+27
| | | | | | | | | /usr/bin/ld: src/cfg.o:/home/opengnsys/ogServer/src/ogAdmServer.h:25: multiple definition of `servidoradm'; src/ogAdmServer.o:/home/javi/trabajo/soleta/opengnsys/ogServer/src/ogAdmServer.h:25: first defined here /usr/bin/ld: src/cfg.o:/home/opengnsys/ogServer/src/ogAdmServer.h:26: multiple definition of `puerto'; src/ogAdmServer.o:/home/javi/trabajo/soleta/opengnsys/ogServer/src/ogAdmServer.h:26: first defined here /usr/bin/ld: src/cfg.o:/home/opengnsys/ogServer/src/ogAdmServer.h:35: multiple definition of `tbsockets'; src/ogAdmServer.o:/home/javi/trabajo/soleta/opengnsys/ogServer/src/ogAdmServer.h:35: first defined here /usr/bin/ld: src/cfg.o:/home/opengnsys/ogServer/src/ogAdmLib.h:81: multiple definition of `ndebug'; src/ogAdmServer.o:/home/javi/trabajo/soleta/opengnsys/ogServer/src/ogAdmLib.h:81: first defined here /usr/bin/ld: src/cfg.o:/home/opengnsys/ogServer/src/ogAdmLib.h:80: multiple definition of `szPathFileLog'; src/ogAdmServer.o:/home/javi/trabajo/soleta/opengnsys/ogServer/src/ogAdmLib.h:80: first defined here /usr/bin/ld: src/cfg.o:/home/opengnsys/ogServer/src/ogAdmLib.h:80: multiple definition of `szPathFileCfg'; src/ogAdmServer.o:/home/javi/trabajo/soleta/opengnsys/ogServer/src/ogAdmLib.h:80: first defined here
* #980 Refactor GET /scopes backendRoberto Hueso Gómez2020-07-021-64/+68
| | | | | | This improves style and fixes some memleaks. Co-authored-by: OpenGnSys Support Team <soporte-og@soleta.eu>
* #980 Fix memleak in og_cmd_get_modes()OpenGnSys Support Team2020-06-301-0/+1
| | | | Missing closedir() call.
* #980 Fix memleak in og_cmd_scope_getRoberto Hueso Gómez2020-06-301-1/+6
| | | | | If either root or children_root fail to be created but the other one does not, then reserved memory for the successful one would not be freed.
* #980 Add GET /modes REST requestRoberto Hueso Gómez2020-06-301-0/+54
| | | | | | | | | | | | | | | | | | | This patch implements HTTP GET /modes request which returns all modes available for clients: Request: GET /modes HTTP/1.0 Response: 200 OK { "modes": [ "pxe", "10", "13", "00unknown", "11", "19pxeADMIN", "12" ] }
* #971 rename sources folder to srcOpenGnSys Support Team2020-06-2622-0/+7638
Use the same folder as in ogClient.