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

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) ===
This should never have been there in the first place.
`Managed` is a read-only property, you can't create an un-managed network.
From dbd77c6058aebb9cf6a484887a4d6a3684525bf0 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?St=C3=A9phane=20Graber?= <stgra...@ubuntu.com>
Date: Fri, 10 Apr 2020 23:22:49 -0400
Subject: [PATCH 1/2] shared/api: Drop invalid Managed key in NetworksPost
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit

Closes #7172

Signed-off-by: Stéphane Graber <stgra...@ubuntu.com>
---
 shared/api/network.go | 1 -
 1 file changed, 1 deletion(-)

diff --git a/shared/api/network.go b/shared/api/network.go
index 00478d26d7..fe1f5ea5c6 100644
--- a/shared/api/network.go
+++ b/shared/api/network.go
@@ -6,7 +6,6 @@ package api
 type NetworksPost struct {
        NetworkPut `yaml:",inline"`
 
-       Managed bool   `json:"managed" yaml:"managed"`
        Name    string `json:"name" yaml:"name"`
        Type    string `json:"type" yaml:"type"`
 }

From f22da7836b206a0f26852788008e5a4baa93e4ab Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?St=C3=A9phane=20Graber?= <stgra...@ubuntu.com>
Date: Fri, 10 Apr 2020 23:23:17 -0400
Subject: [PATCH 2/2] lxd: Drop invalid use of Managed property
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/api_cluster.go    | 1 -
 lxd/main_init_dump.go | 1 -
 2 files changed, 2 deletions(-)

diff --git a/lxd/api_cluster.go b/lxd/api_cluster.go
index 5a812856e5..2e98cc5b74 100644
--- a/lxd/api_cluster.go
+++ b/lxd/api_cluster.go
@@ -784,7 +784,6 @@ func clusterInitMember(d, client lxd.InstanceServer, 
memberConfig []api.ClusterM
 
                post := api.NetworksPost{
                        NetworkPut: network.NetworkPut,
-                       Managed:    true,
                        Name:       network.Name,
                        Type:       network.Type,
                }
diff --git a/lxd/main_init_dump.go b/lxd/main_init_dump.go
index 087d123fa8..cf3e636095 100644
--- a/lxd/main_init_dump.go
+++ b/lxd/main_init_dump.go
@@ -32,7 +32,6 @@ func (c *cmdInit) RunDump(d lxd.InstanceServer) error {
                networksPost := api.NetworksPost{}
                networksPost.Config = network.Config
                networksPost.Description = network.Description
-               networksPost.Managed = network.Managed
                networksPost.Name = network.Name
                networksPost.Type = network.Type
 
_______________________________________________
lxc-devel mailing list
lxc-devel@lists.linuxcontainers.org
http://lists.linuxcontainers.org/listinfo/lxc-devel

Reply via email to