summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* 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-064-69/+93
| | | | 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-2623-11/+11
| | | | Use the same folder as in ogClient.
* #988 fix json file open error checkOpenGnSys Support Team2020-06-261-1/+1
| | | | if open() fails it returns a negative value.
* #988 use ogserver.json fallback to legacy configuration fileOpenGnSys Support Team2020-06-261-5/+6
| | | | Check for ogserver.json file first, then fall back to legacy.
* #988 add json configuration fileRoberto Hueso Gómez2020-06-268-9/+230
| | | | New configuration file at /opt/opengnsys/cfg/ogserver.json
* #980 Add Virtual statusJavier Sánchez Parra2020-06-263-0/+5
| | | | | Since version 1.2.0, OpenGnsys supports ogVDI hypervisor OS. This commit a new status which indicates that clients are running ogVDI.
* #971 syslog on error from the initialization pathOpenGnSys Support Team2020-06-241-3/+9
|
* #971 rename ogAdmServer to ogserver in syslogOpenGnSys Support Team2020-06-241-1/+1
|
* #971 split socket core logic and main filesOpenGnSys Support Team2020-06-249-473/+536
| | | | Extract socket core and main from ogAdmServer file.
* #980 coding style cleanupOpenGnSys Support Team2020-06-241-10/+11
| | | | | * Curly braces after function definition * use _dbi_ infix for function name
* #980 Add GET /scopes REST requestRoberto Hueso Gómez2020-06-242-0/+192
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This patch implements HTTP GET /scopes request which returns the scopes hierarchy: Request: HTTP GET /scopes Response: 200 OK { "scope": [ { "name": "Center 1", "type": "center", "id": 1, "scope": [ { "name": "Room 1", "type": "room", "id": 1, "scope": [ { "name": "Computer 1", "type": "computer", "id": 1, "scope": [] }, { "name": "Computer 3", "type": "computer", "id": 2, "scope": [] } ] } ] } ] }
* #941 Move OG_COMPUTER_NAME_MAXLEN to dbi.hRoberto Hueso Gómez2020-06-242-4/+3
| | | | | This parameter is actually a database related parameter so now it is renamed to OG_DB_COMPUTER_NAME_MAXLEN.
* #986 Rename configuration and systemd to ogserverJavier Sánchez Parra2020-06-192-0/+0
| | | | Step forward to rename all ogAdmServer references to ogServer
* #986 rename to ogserverOpenGnSys Support Team2020-06-196-18/+18
|
* #971 move configuration file to cfg folderOpenGnSys Support Team2020-06-182-0/+0
|
* #971 split into smaller fileOpenGnSys Support Team2020-06-1811-3997/+4118
| | | | | | | | Split ogAdmServer into several files: * sources/rest.c that implements the server REST API. * sources/client.c that implements the client REST API. * sources/json.c that provides a few JSON helpers.
* #985 add COPYING fileOpenGnSys Support Team2020-06-181-0/+661
|
* #985 add .gitignore fileOpenGnSys Support Team2020-06-171-0/+11
|
* #981 Add ogAdmServer own systemd unit fileJavier Sánchez Parra2020-06-161-0/+13
| | | | | This commit is a step in the direction to remove the old unit file. It also allow us to move ogAdmServer to its own repo.
* #971 move ogAdmLib to ogAdmServerOpenGnSys Support Team2020-06-094-3/+482
| | | | Move remaining ogAdmLib code to ogAdmServer
* #971 add str_toupper()OpenGnSys Support Team2020-06-084-9/+31
| | | | Add new utils.c file and replace old StrToUpper().
* #971 do not use og_log()OpenGnSys Support Team2020-06-081-5/+0
| | | | ogAdmServer uses syslog for logging.
* #971 replace og_info() by syslog()OpenGnSys Support Team2020-06-081-9/+16
|
* #971 replace reservaMemoria() by calloc()OpenGnSys Support Team2020-06-081-3/+3
|
* #971 replace liberaMemoria() by free()OpenGnSys Support Team2020-06-081-11/+11
|
* #942 add WoL on commands, procedures and tasksJavier Sánchez Parra2020-06-021-64/+68
| | | | | | | | | | These cases are different from a basic WoL command because they all use the queue. The queue standard behaviour waits for the client to be ON to send orders, but in WoL commands the client is going to be OFF. The behaviour of WoL must be different. This commit implements WoL for queued commands, procedures and tasks. The queue now sends Wol commands without waiting to the client to be ON.
* #980 add procedure auto executionJavier Sánchez Parra2020-06-021-1/+36
| | | | | | | Users can configure clients to execute a procedure at start. This commit adapt this functionality to new functions and behaviour of the ogAdmServer.
* #942 Fix immediate proceduresJavier Sánchez Parra2020-06-023-6/+7
| | | | | | | | | New versions of ogAdmServer handle pending commands in a different way. Instant procedures uses the old way, now unsupported, so we need to adapt instant procedures. This commit adapts instant procedures to work with the new pending commands implementation.
* #942 ignore stale schedules on startOpenGnSys Support Team2020-06-023-23/+55
|
* #942 add command type to POST /schedule/createOpenGnSys Support Team2020-06-023-17/+94
| | | | Pass idcomando as task_id.
* #942 add enum og_schedule_typeOpenGnSys Support Team2020-06-023-9/+27
|
* #942 add type to POST /schedule/createOpenGnSys Support Team2020-06-021-19/+30
| | | | Moreover, add og_task_schedule_create() function.
* #890 handle 202 AcceptedOpenGnSys Support Team2020-06-021-1/+8
|
* #941 missing og_dbi_closeOpenGnSys Support Team2020-06-021-0/+5
|
* #980 Add action completionJavier Sánchez Parra2020-06-021-1/+52
|
* #942 Add tasks to queueJavier Sánchez Parra2020-06-023-9/+70
|
* #942 Fix task break downJavier Sánchez Parra2020-06-021-1/+1
| | | | | | | | | | | | OpenGnsys tasks can contain other tasks. To know if a element of the task is another task, we need to check if it has the parameter tareaid (Task ID). The code had a bug and the check was done on an non-existent parameter This commit fix this bug changing the non-existent parameter for tareaid. Signed-off-by: OpenGnSys Support Team <soporte-og@soleta.eu>
* #942 Improve scope break down processJavier Sánchez Parra2020-06-021-70/+31
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | OpenGnsys has a hierarchical scope system to organize clients: +------+ |Center| +------+ | | | | v v +--------------------+ +----------+ +-->+Groups of classrooms+----->+Classrooms| | +-+------------------+ +----------+ | | | | +-----+ | | v v +-----------------+ +-------+ +-->+Groups of clients+--------->+Clients| | +-+---------------+ +-------+ | | +-----+ OpenGnsys can send commands and tasks to several clients simultaneously selecting a scope. For example: send poweroff to center Faculty of Pharmacy. We had a waterfall process to loop through all members of the scope and obtain the clients. This commit simplifies the process with queries that save us to loop through the members. Co-authored-by: Irina Gómez <irinagomez@us.es>
* #980 Change initial probe to refreshJavier Sánchez Parra2020-06-021-25/+7
| | | | | | | | | | We have observed that an initial refresh is needed when the ogClient (in ogLive mode) connects with the ogAdmServer, to generate the HTML menu. This commit changes the probe command that was done at the beginning of the connection to a refresh command. This way the client first generates his HTML menu and the show to the user the browser with all the correct information.
* #942 Add weeks and week days to the schedule APIJavier Sánchez Parra2020-06-022-118/+174
| | | | | | * add og_schedule_create_weekdays() * add og_schedule_create_weeks() * add og_schedule_create_days()
* #980 Complete API REST for ogClientRoberto Hueso Gómez2020-06-021-150/+591
|
* #971 remove obsolete codeOpenGnSys Support Team2020-06-022-1560/+8
|