summaryrefslogtreecommitdiffstats
path: root/src/json.h
diff options
context:
space:
mode:
authorJose M. Guisado <jguisado@soleta.eu>2021-10-19 07:54:35 +0000
committerJose M. Guisado <jguisado@soleta.eu>2021-10-19 07:54:35 +0000
commite16f36cdef55d6a2598e25144f583dfad0c9c793 (patch)
tree8d9d70e21c40a588ca7db4ef7025b56dc2189473 /src/json.h
parent36f02324e05fc06ad9ce566c3b79c5d5bdfa0dd1 (diff)
#915 Fix create image payload parsing
Commit 141b0797e17f616d6 introduced command scheduling rest api to ogserver. Part of this changeset included og_json_parse_create_image as a utility funtion to parse the json payload of a "create image" command. og_json_parse_create_image did not include the parsing of optional parameters "description", "center_id" and "group_id". New components like ogCP or ogCLI use these parameters. Fix this by adding a struct og_image member to the struct og_msg_params and assigning it when processing a "create image" command. This could be extended to further payload parsing for image related commands in the future.
Diffstat (limited to 'src/json.h')
-rw-r--r--src/json.h1
1 files changed, 1 insertions, 0 deletions
diff --git a/src/json.h b/src/json.h
index 0d00679..8ed50e0 100644
--- a/src/json.h
+++ b/src/json.h
@@ -88,6 +88,7 @@ struct og_msg_params {
struct og_partition partition_setup[OG_PARTITION_MAX];
struct og_sync_params sync_setup;
struct og_schedule_time time;
+ struct og_image image;
const char *task_id;
uint64_t flags;
};