From fcbaf80d67dca3b1eb5ee80be0888c882eaf1e90 Mon Sep 17 00:00:00 2001 From: Christian Kellner Date: Thu, 24 Feb 2022 15:49:39 +0100 Subject: [PATCH] osbuild2: add org.osbuild.waagent.config stage Add the necessary structs for the `org.osbuild.waagent.config` stage. --- internal/osbuild2/waagent_conf.go | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) create mode 100644 internal/osbuild2/waagent_conf.go diff --git a/internal/osbuild2/waagent_conf.go b/internal/osbuild2/waagent_conf.go new file mode 100644 index 000000000..d1e5d0c56 --- /dev/null +++ b/internal/osbuild2/waagent_conf.go @@ -0,0 +1,19 @@ +package osbuild2 + +type WAAgentConfig struct { + RDFormat *bool `json:"ResourceDisk.Format"` + RDEnableSwap *bool `json:"ResourceDisk.EnableSwap"` +} + +type WAAgentConfStageOptions struct { + Config WAAgentConfig `json:"config"` +} + +func (WAAgentConfStageOptions) isStageOptions() {} + +func NewWAAgentConfStage(options *WAAgentConfStageOptions) *Stage { + return &Stage{ + Type: "org.osbuild.waagent.conf", + Options: options, + } +}