diff --git a/include/ocppi/runtime/state/types/State.hpp b/include/ocppi/runtime/state/types/State.hpp index 5dbe9f1..33d78c1 100644 --- a/include/ocppi/runtime/state/types/State.hpp +++ b/include/ocppi/runtime/state/types/State.hpp @@ -41,7 +41,7 @@ using nlohmann::json; * Open Container Runtime State Schema */ struct State { -std::optional> annotations; +std::optional> annotations; std::string bundle; /** * the container's ID diff --git a/tools/codegen/fix.patch b/tools/codegen/fix.patch index c9d2a7d..6f96cee 100644 --- a/tools/codegen/fix.patch +++ b/tools/codegen/fix.patch @@ -1,6 +1,6 @@ diff -ruN include.orig/ocppi/runtime/config/types/Config.hpp include/ocppi/runtime/config/types/Config.hpp ---- include.orig/ocppi/runtime/config/types/Config.hpp 2024-01-16 15:08:31.502905487 +0800 -+++ include/ocppi/runtime/config/types/Config.hpp 2024-01-16 15:08:35.994572514 +0800 +--- include.orig/ocppi/runtime/config/types/Config.hpp 2024-01-23 10:37:56.412999328 +0800 ++++ include/ocppi/runtime/config/types/Config.hpp 2024-01-23 10:38:03.075817469 +0800 @@ -41,11 +41,11 @@ * Open Container Initiative Runtime Specification Container Configuration Schema */ @@ -16,8 +16,8 @@ diff -ruN include.orig/ocppi/runtime/config/types/Config.hpp include/ocppi/runti std::string ociVersion; std::optional process; diff -ruN include.orig/ocppi/runtime/config/types/Generators.hpp include/ocppi/runtime/config/types/Generators.hpp ---- include.orig/ocppi/runtime/config/types/Generators.hpp 2024-01-16 15:08:31.502905487 +0800 -+++ include/ocppi/runtime/config/types/Generators.hpp 2024-01-16 15:08:36.374544447 +0800 +--- include.orig/ocppi/runtime/config/types/Generators.hpp 2024-01-23 10:37:56.412999328 +0800 ++++ include/ocppi/runtime/config/types/Generators.hpp 2024-01-23 10:38:03.075817469 +0800 @@ -683,7 +683,7 @@ x.network = get_stack_optional(j, "network"); x.pids = get_stack_optional(j, "pids"); @@ -25,7 +25,7 @@ diff -ruN include.orig/ocppi/runtime/config/types/Generators.hpp include/ocppi/r -x.unified = get_stack_optional>(j, "unified"); +x.unified = get_stack_optional>(j, "unified"); } - + inline void to_json(json & j, const LinuxResources & x) { @@ -829,7 +829,7 @@ x.resources = get_stack_optional(j, "resources"); @@ -62,8 +62,8 @@ diff -ruN include.orig/ocppi/runtime/config/types/Generators.hpp include/ocppi/r if (x.mounts) { j["mounts"] = x.mounts; diff -ruN include.orig/ocppi/runtime/config/types/Linux.hpp include/ocppi/runtime/config/types/Linux.hpp ---- include.orig/ocppi/runtime/config/types/Linux.hpp 2024-01-16 15:08:31.502905487 +0800 -+++ include/ocppi/runtime/config/types/Linux.hpp 2024-01-16 15:08:36.730518153 +0800 +--- include.orig/ocppi/runtime/config/types/Linux.hpp 2024-01-23 10:37:56.412999328 +0800 ++++ include/ocppi/runtime/config/types/Linux.hpp 2024-01-23 10:38:03.079816775 +0800 @@ -62,7 +62,7 @@ std::optional resources; std::optional rootfsPropagation; @@ -74,8 +74,8 @@ diff -ruN include.orig/ocppi/runtime/config/types/Linux.hpp include/ocppi/runtim std::optional> uidMappings; }; diff -ruN include.orig/ocppi/runtime/config/types/LinuxResources.hpp include/ocppi/runtime/config/types/LinuxResources.hpp ---- include.orig/ocppi/runtime/config/types/LinuxResources.hpp 2024-01-16 15:08:31.502905487 +0800 -+++ include/ocppi/runtime/config/types/LinuxResources.hpp 2024-01-16 15:08:37.150487146 +0800 +--- include.orig/ocppi/runtime/config/types/LinuxResources.hpp 2024-01-23 10:37:56.412999328 +0800 ++++ include/ocppi/runtime/config/types/LinuxResources.hpp 2024-01-23 10:38:03.083816080 +0800 @@ -41,7 +41,7 @@ std::optional network; std::optional pids; @@ -86,8 +86,8 @@ diff -ruN include.orig/ocppi/runtime/config/types/LinuxResources.hpp include/ocp } } diff -ruN include.orig/ocppi/runtime/features/types/Features.hpp include/ocppi/runtime/features/types/Features.hpp ---- include.orig/ocppi/runtime/features/types/Features.hpp 2024-01-16 15:08:31.502905487 +0800 -+++ include/ocppi/runtime/features/types/Features.hpp 2024-01-16 15:08:38.022422824 +0800 +--- include.orig/ocppi/runtime/features/types/Features.hpp 2024-01-23 10:37:56.412999328 +0800 ++++ include/ocppi/runtime/features/types/Features.hpp 2024-01-23 10:38:03.083816080 +0800 @@ -35,7 +35,7 @@ struct Features { std::optional> annotations; @@ -98,8 +98,8 @@ diff -ruN include.orig/ocppi/runtime/features/types/Features.hpp include/ocppi/r std::string ociVersionMax; std::string ociVersionMin; diff -ruN include.orig/ocppi/runtime/features/types/Generators.hpp include/ocppi/runtime/features/types/Generators.hpp ---- include.orig/ocppi/runtime/features/types/Generators.hpp 2024-01-16 15:08:31.502905487 +0800 -+++ include/ocppi/runtime/features/types/Generators.hpp 2024-01-16 15:08:38.026422530 +0800 +--- include.orig/ocppi/runtime/features/types/Generators.hpp 2024-01-23 10:37:56.412999328 +0800 ++++ include/ocppi/runtime/features/types/Generators.hpp 2024-01-23 10:38:03.087815385 +0800 @@ -199,7 +199,7 @@ inline void from_json(const json & j, Features& x) { x.annotations = get_stack_optional>(j, "annotations"); @@ -120,9 +120,21 @@ diff -ruN include.orig/ocppi/runtime/features/types/Generators.hpp include/ocppi } if (x.mountOptions) { j["mountOptions"] = x.mountOptions; +diff -ruN include.orig/ocppi/runtime/state/types/State.hpp include/ocppi/runtime/state/types/State.hpp +--- include.orig/ocppi/runtime/state/types/State.hpp 2024-01-23 10:37:56.412999328 +0800 ++++ include/ocppi/runtime/state/types/State.hpp 2024-01-23 10:38:28.883597787 +0800 +@@ -41,7 +41,7 @@ + * Open Container Runtime State Schema + */ + struct State { +-std::optional> annotations; ++std::optional> annotations; + std::string bundle; + /** + * the container's ID diff -ruN include.orig/ocppi/types/Generators.hpp include/ocppi/types/Generators.hpp ---- include.orig/ocppi/types/Generators.hpp 2024-01-16 15:08:31.502905487 +0800 -+++ include/ocppi/types/Generators.hpp 2024-01-16 15:08:44.601939814 +0800 +--- include.orig/ocppi/types/Generators.hpp 2024-01-23 10:37:56.412999328 +0800 ++++ include/ocppi/types/Generators.hpp 2024-01-23 10:38:03.087815385 +0800 @@ -17,7 +17,6 @@ #include #include "ocppi/types/helper.hpp" @@ -159,7 +171,7 @@ diff -ruN include.orig/ocppi/types/Generators.hpp include/ocppi/types/Generators } diff -ruN include.orig/ocppi/types/Types.hpp include/ocppi/types/Types.hpp ---- include.orig/ocppi/types/Types.hpp 2024-01-16 15:08:31.502905487 +0800 +--- include.orig/ocppi/types/Types.hpp 2024-01-23 10:37:56.412999328 +0800 +++ include/ocppi/types/Types.hpp 1970-01-01 08:00:00.000000000 +0800 @@ -1,39 +0,0 @@ -// Thish file is generated by /tools/codegen