[lxc-devel] [lxd/master] Fix default protocol in image download
stgraber on Github
lxc-bot at linuxcontainers.org
Fri Mar 4 17:53:33 UTC 2016
A non-text attachment was scrubbed...
Name: not available
Type: text/x-mailbox
Size: 370 bytes
Desc: not available
URL: <http://lists.linuxcontainers.org/pipermail/lxc-devel/attachments/20160304/7540f539/attachment.bin>
-------------- next part --------------
From c1257ed5bfc337ad910f030b7001b236b9313a30 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?St=C3=A9phane=20Graber?= <stgraber at ubuntu.com>
Date: Fri, 4 Mar 2016 12:51:19 -0500
Subject: [PATCH] Fix default protocol in image download
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Closes #1697
Signed-off-by: Stéphane Graber <stgraber at ubuntu.com>
---
lxd/daemon_images.go | 5 +++++
1 file changed, 5 insertions(+)
diff --git a/lxd/daemon_images.go b/lxd/daemon_images.go
index 43efa77..af3a6aa 100644
--- a/lxd/daemon_images.go
+++ b/lxd/daemon_images.go
@@ -20,6 +20,11 @@ import (
func (d *Daemon) ImageDownload(op *operation, server string, protocol string, certificate string, secret string, alias string, forContainer bool, autoUpdate bool) (string, error) {
var err error
var ss *shared.SimpleStreams
+
+ if protocol == "" {
+ protocol = "lxd"
+ }
+
fp := alias
// Expand aliases
More information about the lxc-devel
mailing list