[lxc-devel] [lxd/master] lxd/init: Use new network syntax
stgraber on Github
lxc-bot at linuxcontainers.org
Sat Feb 22 00:53:17 UTC 2020
A non-text attachment was scrubbed...
Name: not available
Type: text/x-mailbox
Size: 354 bytes
Desc: not available
URL: <http://lists.linuxcontainers.org/pipermail/lxc-devel/attachments/20200221/0ab9f205/attachment.bin>
-------------- next part --------------
From 0c5873b6b47ee1e2706b790648597c3e1cb2dfbc Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?St=C3=A9phane=20Graber?= <stgraber at ubuntu.com>
Date: Fri, 21 Feb 2020 19:51:29 -0500
Subject: [PATCH] lxd/init: Use new network syntax
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/main_init_auto.go | 6 ++----
lxd/main_init_interactive.go | 6 ++----
2 files changed, 4 insertions(+), 8 deletions(-)
diff --git a/lxd/main_init_auto.go b/lxd/main_init_auto.go
index 4022c91f30..5f38ed7116 100644
--- a/lxd/main_init_auto.go
+++ b/lxd/main_init_auto.go
@@ -163,8 +163,7 @@ func (c *cmdInit) RunAuto(cmd *cobra.Command, args []string, d lxd.InstanceServe
Devices: map[string]map[string]string{
"eth0": {
"type": "nic",
- "nictype": "bridged",
- "parent": network.Name,
+ "network": network.Name,
"name": "eth0",
},
},
@@ -173,8 +172,7 @@ func (c *cmdInit) RunAuto(cmd *cobra.Command, args []string, d lxd.InstanceServe
} else {
config.Profiles[0].Devices["eth0"] = map[string]string{
"type": "nic",
- "nictype": "bridged",
- "parent": network.Name,
+ "network": network.Name,
"name": "eth0",
}
}
diff --git a/lxd/main_init_interactive.go b/lxd/main_init_interactive.go
index 28e4ee4967..110c823913 100644
--- a/lxd/main_init_interactive.go
+++ b/lxd/main_init_interactive.go
@@ -331,9 +331,8 @@ func (c *cmdInit) askNetworking(config *cmdInitData, d lxd.InstanceServer) error
// Add to the default profile
config.Node.Profiles[0].Devices["eth0"] = map[string]string{
"type": "nic",
- "nictype": "bridged",
"name": "eth0",
- "parent": "lxdfan0",
+ "network": "lxdfan0",
}
}
@@ -356,9 +355,8 @@ func (c *cmdInit) askNetworking(config *cmdInitData, d lxd.InstanceServer) error
// Add to the default profile
config.Node.Profiles[0].Devices["eth0"] = map[string]string{
"type": "nic",
- "nictype": "bridged",
"name": "eth0",
- "parent": network.Name,
+ "network": network.Name,
}
// IPv4
More information about the lxc-devel
mailing list