[libvirt] [PATCH go-xml] 1,rename DomainInterfaceBoot to DomainDeviceBoot; 2,support disk boot order

zhenwei.pi posted 1 patch 6 years, 10 months ago
Failed in applying to current master (apply log)
domain.go      | 5 +++--
domain_test.go | 6 +++++-
2 files changed, 8 insertions(+), 3 deletions(-)
[libvirt] [PATCH go-xml] 1,rename DomainInterfaceBoot to DomainDeviceBoot; 2,support disk boot order
Posted by zhenwei.pi 6 years, 10 months ago
---
 domain.go      | 5 +++--
 domain_test.go | 6 +++++-
 2 files changed, 8 insertions(+), 3 deletions(-)

diff --git a/domain.go b/domain.go
index 1d91dc3..7d8f6d6 100644
--- a/domain.go
+++ b/domain.go
@@ -98,6 +98,7 @@ type DomainDisk struct {
 	ReadOnly  *DomainDiskReadOnly  `xml:"readonly"`
 	Shareable *DomainDiskShareable `xml:"shareable"`
 	Address   *DomainAddress       `xml:"address"`
+	Boot      *DomainDeviceBoot    `xml:"boot"`
 }
 
 type DomainFilesystemDriver struct {
@@ -171,7 +172,7 @@ type DomainInterfaceLink struct {
 	State string `xml:"state,attr"`
 }
 
-type DomainInterfaceBoot struct {
+type DomainDeviceBoot struct {
 	Order uint `xml:"order,attr"`
 }
 
@@ -193,7 +194,7 @@ type DomainInterface struct {
 	Target  *DomainInterfaceTarget `xml:"target"`
 	Alias   *DomainInterfaceAlias  `xml:"alias"`
 	Link    *DomainInterfaceLink   `xml:"link"`
-	Boot    *DomainInterfaceBoot   `xml:"boot"`
+	Boot    *DomainDeviceBoot      `xml:"boot"`
 	Script  *DomainInterfaceScript `xml:"script"`
 	Driver  *DomainInterfaceDriver `xml:"driver"`
 	Address *DomainAddress         `xml:"address"`
diff --git a/domain_test.go b/domain_test.go
index b83d4ae..3d015c7 100644
--- a/domain_test.go
+++ b/domain_test.go
@@ -87,6 +87,9 @@ var domainTestData = []struct {
 							Bus: "virtio",
 						},
 						Serial: "fishfood",
+						Boot: &DomainDeviceBoot{
+							Order: 1,
+						},
 					},
 					DomainDisk{
 						Type:   "block",
@@ -189,6 +192,7 @@ var domainTestData = []struct {
 			`      <source file="/var/lib/libvirt/images/demo.qcow2"></source>`,
 			`      <target dev="vda" bus="virtio"></target>`,
 			`      <serial>fishfood</serial>`,
+			`      <boot order="1"></boot>`,
 			`    </disk>`,
 			`    <disk type="block" device="disk">`,
 			`      <driver name="qemu" type="raw"></driver>`,
@@ -710,7 +714,7 @@ var domainTestData = []struct {
 						Link: &DomainInterfaceLink{
 							State: "up",
 						},
-						Boot: &DomainInterfaceBoot{
+						Boot: &DomainDeviceBoot{
 							Order: 1,
 						},
 						Driver: &DomainInterfaceDriver{
-- 
2.7.4

--
libvir-list mailing list
libvir-list@redhat.com
https://www.redhat.com/mailman/listinfo/libvir-list
Re: [libvirt] [PATCH go-xml] 1,rename DomainInterfaceBoot to DomainDeviceBoot; 2,support disk boot order
Posted by Daniel P. Berrange 6 years, 10 months ago
On Tue, Jun 06, 2017 at 01:51:30PM +0800, zhenwei.pi wrote:
> ---
>  domain.go      | 5 +++--
>  domain_test.go | 6 +++++-
>  2 files changed, 8 insertions(+), 3 deletions(-)

ACK and pushed with some changes to the commit message text.

Regards,
Daniel
-- 
|: https://berrange.com      -o-    https://www.flickr.com/photos/dberrange :|
|: https://libvirt.org         -o-            https://fstop138.berrange.com :|
|: https://entangle-photo.org    -o-    https://www.instagram.com/dberrange :|

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