summaryrefslogtreecommitdiffstats
path: root/src/json.c
Commit message (Collapse)AuthorAgeFilesLines
* constify json parse helper functionOpenGnSys Support Team2021-06-101-5/+5
| | | | | json_t * parameter is not modified, constify to allow compiler to spew warnings in case the function tries to modify it.
* #915 Add commands and procedures to procedure creationJavier Sánchez Parra2021-06-101-0/+72
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Adds the possibility to create a procedure with commands and other procedures integrated as steps. Note: "steps" parameter is optional and "steps" array object order defines execution order. Request: POST /procedure/add { "center": "1", "name": "procedure", "description": "My procedure", "steps": [ { "command": "wol", "params": { "type": "broadcast" } }, { "procedure": 22 }, { "command": "poweroff", "params": {} } ] } Response: 200 OK This commit also updates unit tests for /procedure/add POST method to include steps.
* #1037 Add disk typeJavier Sánchez Parra2021-05-261-0/+3
| | | | | | | Add ogServer support for parsing and storing in the DB disk type data from ogClient refresh response. See also commits with #1037 in ogClient and WebConsole repo.
* #1037 Make partition parameter validation permissiveJavier Sánchez Parra2021-05-261-1/+1
| | | | | Otherwise, ogServer rejects the response if ogClient sends more parameters than required.
* ogServer is AGPLv3+OpenGnSys Support Team2021-05-041-2/+3
| | | | Update license header in files.
* #941 Add og_json_parse_string_copy(...) functionRoberto Hueso Gómez2020-10-061-0/+15
| | | | | This function provides an easy way to copy the content of a json string into a regular C string.
* #1004 Handle new fields in /image/create responseJavier Sánchez Parra2020-09-101-0/+9
| | | | | | | | | | | | | | | | | | | | | | | | ogClient now includes more information regarding the new image. This patch modifies ogServer to support new elements sent in ogClient /image/create response and store them in the database. Example of new /image/create response: { "disk": "1", "partition": "1", "code": "131", "id": "1", "name": "ubuntu", "repository": "192.168.56.10", "software": "Ubuntu 18.04.5 LTS \naccountsservice 0.6.45\n...", "clonator": "PARTCLONE", "compressor": "LZOP", "filesystem": "EXTFS", "datasize": 2100000 } New fields are "clonator", "compressor", "filesystem" and "datasize".
* Add POST /modes REST requestRoberto Hueso Gómez2020-07-061-0/+29
| | | | | | | | | | | | | 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 rename sources folder to srcOpenGnSys Support Team2020-06-261-0/+85
Use the same folder as in ogClient.