• Subject: [libvirt] [PATCH go-xml] Add bootp option to NetworkDHCP
  • Author: Michal Rostecki
  • Date: Oct. 24, 2017, 12:41 p.m.
  • Patches: 1 / 1
Changeset
network.go      | 6 ++++++
network_test.go | 7 +++++++
2 files changed, 13 insertions(+)
Git apply log
Switched to a new branch '20171024124142.19689-1-michal@kinvolk.io'
Applying: Add bootp option to NetworkDHCP
error: sha1 information is lacking or useless (network.go).
error: could not build fake ancestor
Patch failed at 0001 Add bootp option to NetworkDHCP
The copy of the patch that failed is found in: .git/rebase-apply/patch
When you have resolved this problem, run "git am --continue".
If you prefer to skip this patch, run "git am --skip" instead.
To restore the original branch and stop patching, run "git am --abort".
Failed to apply patch:
[libvirt] [PATCH go-xml] Add bootp option to NetworkDHCP
[libvirt] [PATCH go-xml] Add bootp option to NetworkDHCP
Posted by Michal Rostecki, 12 weeks ago
From: Michal Rostecki <michal.rostecki@gmail.com>

Support specyfing concrete file and TFTP server
for PXE boot.

Signed-off-by: Michal Rostecki <michal.rostecki@gmail.com>
---
 network.go      | 6 ++++++
 network_test.go | 7 +++++++
 2 files changed, 13 insertions(+)

diff --git a/network.go b/network.go
index 32f125a..10c4dfc 100644
--- a/network.go
+++ b/network.go
@@ -78,9 +78,15 @@ type NetworkDHCPHost struct {
 	IP   string `xml:"ip,attr,omitempty"`
 }
 
+type NetworkBootp struct {
+	File   string `xml:"file,attr,omitempty"`
+	Server string `xml:"server,attr,omitempty"`
+}
+
 type NetworkDHCP struct {
 	Ranges []NetworkDHCPRange `xml:"range"`
 	Hosts  []NetworkDHCPHost  `xml:"host"`
+	Bootp  []NetworkBootp     `xml:"bootp"`
 }
 
 type NetworkIP struct {
diff --git a/network_test.go b/network_test.go
index b1bd168..3efb278 100644
--- a/network_test.go
+++ b/network_test.go
@@ -100,6 +100,12 @@ var networkTestData = []struct {
 								IP:   "192.168.122.10",
 							},
 						},
+						Bootp: []NetworkBootp{
+							NetworkBootp{
+								File:   "pxelinux.0",
+								Server: "192.168.122.1",
+							},
+						},
 					},
 				},
 				NetworkIP{
@@ -179,6 +185,7 @@ var networkTestData = []struct {
 			`    <dhcp>`,
 			`      <range start="192.168.122.2" end="192.168.122.254"></range>`,
 			`      <host mac="00:16:3e:77:e2:ed" name="foo.example.com" ip="192.168.122.10"></host>`,
+			`      <bootp file="pxelinux.0" server="192.168.122.1"></bootp>`,
 			`    </dhcp>`,
 			`  </ip>`,
 			`  <ip address="2001:db8:ca2:2::1" family="ipv6" prefix="64">`,
-- 
2.13.6

--
libvir-list mailing list
libvir-list@redhat.com
https://www.redhat.com/mailman/listinfo/libvir-list