[lxc-devel] [distrobuilder/master] shared: Set default variant

monstermunchkin on Github lxc-bot at linuxcontainers.org
Thu Mar 8 08:42:53 UTC 2018


A non-text attachment was scrubbed...
Name: not available
Type: text/x-mailbox
Size: 363 bytes
Desc: not available
URL: <http://lists.linuxcontainers.org/pipermail/lxc-devel/attachments/20180308/f42b269a/attachment.bin>
-------------- next part --------------
From beaf55f0dbd855ca05fa0d247a75934acfcb6c37 Mon Sep 17 00:00:00 2001
From: Thomas Hipp <thomas.hipp at canonical.com>
Date: Thu, 8 Mar 2018 09:42:14 +0100
Subject: [PATCH] shared: Set default variant

Signed-off-by: Thomas Hipp <thomas.hipp at canonical.com>
---
 shared/definition.go | 5 +++++
 1 file changed, 5 insertions(+)

diff --git a/shared/definition.go b/shared/definition.go
index 1888e80..e47c4af 100644
--- a/shared/definition.go
+++ b/shared/definition.go
@@ -105,6 +105,11 @@ func SetDefinitionDefaults(def *Definition) {
 		def.Image.Expiry = "30d"
 	}
 
+	// Set default variant
+	if def.Image.Variant == "" {
+		def.Image.Variant = "default"
+	}
+
 	if def.Source.Keyserver == "" {
 		def.Source.Keyserver = "hkps.pool.sks-keyservers.net"
 	}


More information about the lxc-devel mailing list