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

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



---
 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@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/libvir-list



[Index of Archives]     [Virt Tools]     [Libvirt Users]     [Lib OS Info]     [Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [KDE Users]     [Fedora Tools]
  Powered by Linux