
On Fri, Sep 15, 2017 at 02:12:44PM +0800, zhenwei.pi wrote:
Signed-off-by: zhenwei.pi <zhenwei.pi@youruncloud.com> --- domain.go | 36 ++++++++++++++++++++++++++++++++++++ domain_test.go | 44 ++++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 80 insertions(+)
diff --git a/domain.go b/domain.go index bead49a..1bcc9cc 100644 --- a/domain.go +++ b/domain.go @@ -407,6 +407,29 @@ type DomainRNG struct { Backend *DomainRNGBackend `xml:"backend"` }
+type DomainHostdevAdapter struct { + Name string `xml:"name,attr,omitempty"` +} + +type DomainHostdevSource struct { + Protocol string `xml:"protocol,attr,omitempty"` + Name string `xml:"name,attr,omitempty"` + Wwpn string `xml:"wwpn,attr,omitempty"`
This should be WWPN
+ Adapter *DomainHostdevAdapter `xml:"adapter"` + Address *DomainAddress `xml:"address"` +} + +type DomainHostdev struct { + XMLName xml.Name `xml:"hostdev"` + Mode string `xml:"mode,attr"` + Type string `xml:"type,attr"` + Sgio string `xml:"sgio,attr,omitempty"`
SGIO
+ Rawio string `xml:"rawio,attr,omitempty"`
And RawIO
+ Managed string `xml:"managed,attr,omitempty"` + Source *DomainHostdevSource `xml:"source"` + Address *DomainAddress `xml:"address"` +}
diff --git a/domain_test.go b/domain_test.go index d1b107d..73dd47b 100644 --- a/domain_test.go +++ b/domain_test.go @@ -37,6 +37,13 @@ type Address struct { Function HexUint }
+type ScsiAddress struct {
Should be SCSI ACK, and I'll fix the capitalization when pushing 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 :|