[lxc-devel] [lxd/master] Drop invalid `Managed` field from NetworksPost

stgraber on Github lxc-bot at linuxcontainers.org
Sat Apr 11 03:24:39 UTC 2020


A non-text attachment was scrubbed...
Name: not available
Type: text/x-mailbox
Size: 430 bytes
Desc: not available
URL: <http://lists.linuxcontainers.org/pipermail/lxc-devel/attachments/20200410/846e03f9/attachment.bin>
-------------- next part --------------
From dbd77c6058aebb9cf6a484887a4d6a3684525bf0 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?St=C3=A9phane=20Graber?= <stgraber at 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 <stgraber at 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?= <stgraber at 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 <stgraber at 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
 


More information about the lxc-devel mailing list