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

[libvirt] [PATCH go-xml] add emulator supported



---
 domain.go      | 1 +
 domain_test.go | 6 ++++++
 2 files changed, 7 insertions(+)

diff --git a/domain.go b/domain.go
index dcb8f65..723e761 100644
--- a/domain.go
+++ b/domain.go
@@ -307,6 +307,7 @@ type DomainDeviceList struct {
 	Channels    []DomainChardev    `xml:"channel"`
 	MemBalloon  *DomainMemBalloon  `xml:"memballoon"`
 	Sounds      []DomainSound      `xml:"sound"`
+	Emulator    string             `xml:"emulator,omitempty"`
 }
 
 type DomainMemory struct {
diff --git a/domain_test.go b/domain_test.go
index 632b714..9efbd6b 100644
--- a/domain_test.go
+++ b/domain_test.go
@@ -572,6 +572,9 @@ var domainTestData = []struct {
 					DomainCPUFeature{Policy: "disable", Name: "lahf_lm"},
 				},
 			},
+			Devices: &DomainDeviceList{
+				Emulator: "/bin/qemu-kvm",
+			},
 		},
 		Expected: []string{
 			`<domain type="kvm">`,
@@ -582,6 +585,9 @@ var domainTestData = []struct {
 			`    <topology sockets="1" cores="2" threads="1"></topology>`,
 			`    <feature policy="disable" name="lahf_lm"></feature>`,
 			`  </cpu>`,
+			`  <devices>`,
+			`    <emulator>/bin/qemu-kvm</emulator>`,
+			`  </devices>`,
 			`</domain>`,
 		},
 	},
-- 
2.7.4


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