The following pull request was submitted through Github.
It can be accessed and reviewed at: https://github.com/lxc/lxd/pull/6711

This e-mail was sent by the LXC bot, direct replies will not reach the author
unless they happen to be subscribed to this list.

=== Description (from pull-request) ===
Signed-off-by: Stéphane Graber <stgra...@ubuntu.com>
From 36bcb01247c85ae95362dfddc1e7fb6fc989b5ad Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?St=C3=A9phane=20Graber?= <stgra...@ubuntu.com>
Date: Tue, 14 Jan 2020 15:58:28 -0500
Subject: [PATCH] lxd/instances: Fix creation from simplestreams
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit

Signed-off-by: Stéphane Graber <stgra...@ubuntu.com>
---
 lxd/instance/instance_utils.go | 10 ++++++++++
 1 file changed, 10 insertions(+)

diff --git a/lxd/instance/instance_utils.go b/lxd/instance/instance_utils.go
index 80e7a57d37..fa5709106f 100644
--- a/lxd/instance/instance_utils.go
+++ b/lxd/instance/instance_utils.go
@@ -765,6 +765,16 @@ func SuitableArchitectures(s *state.State, project string, 
req api.InstancesPost
                                }
                        } else if req.Source.Protocol == "simplestreams" {
                                // Remote simplestreams image server.
+                               remote, err = 
lxd.ConnectSimpleStreams(req.Source.Server, &lxd.ConnectionArgs{
+                                       TLSServerCert: req.Source.Certificate,
+                                       UserAgent:     version.UserAgent,
+                                       Proxy:         s.Proxy,
+                                       CachePath:     s.OS.CacheDir,
+                                       CacheExpiry:   time.Hour,
+                               })
+                               if err != nil {
+                                       return nil, err
+                               }
                        } else {
                                return nil, fmt.Errorf("Unsupported remote 
image server protocol: %s", req.Source.Protocol)
                        }
_______________________________________________
lxc-devel mailing list
lxc-devel@lists.linuxcontainers.org
http://lists.linuxcontainers.org/listinfo/lxc-devel

Reply via email to