Support the WWN (World Wide Name) tag in disks, and add test code.
Signed-off-by: Thomas Hipp <thipp(a)suse.de>
---
domain.go | 1 +
domain_test.go | 2 ++
2 files changed, 3 insertions(+)
diff --git a/domain.go b/domain.go
index b9b0f77..93e2b56 100644
--- a/domain.go
+++ b/domain.go
@@ -124,6 +124,7 @@ type DomainDisk struct {
Shareable *DomainDiskShareable `xml:"shareable"`
Address *DomainAddress `xml:"address"`
Boot *DomainDeviceBoot `xml:"boot"`
+ WWN string `xml:"wwn,omitempty"`
}
type DomainFilesystemDriver struct {
diff --git a/domain_test.go b/domain_test.go
index 47e5e26..9568f9e 100644
--- a/domain_test.go
+++ b/domain_test.go
@@ -1178,6 +1178,7 @@ var domainTestData = []struct {
Bus: "virtio",
},
Serial: "fishfood",
+ WWN: "0123456789abcdef",
},
Expected: []string{
`<disk type="file" device="cdrom">`,
@@ -1185,6 +1186,7 @@ var domainTestData = []struct {
` <source
file="/var/lib/libvirt/images/demo.qcow2"></source>`,
` <target dev="vda" bus="virtio"></target>`,
` <serial>fishfood</serial>`,
+ ` <wwn>0123456789abcdef</wwn>`,
`</disk>`,
},
},
--
2.13.2