Signed-off-by: zhenwei.pi <zhenwei.pi(a)youruncloud.com>
---
domain.go | 7 +++++++
domain_test.go | 6 ++++++
2 files changed, 13 insertions(+)
diff --git a/domain.go b/domain.go
index b9b0f77..1d020aa 100644
--- a/domain.go
+++ b/domain.go
@@ -532,6 +532,12 @@ type DomainCPU struct {
Features []DomainCPUFeature `xml:"feature"`
}
+type DomainClock struct {
+ Offset string `xml:"offset,attr,omitempty"`
+ Basic string `xml:"basic,attr,omitempty"`
This should be 'basis' not 'basic'. I'll change this when applying to
git so no need to resubmit.
+ Adjustment int `xml:"adjustment,attr,omitempty"`
+}
+
type DomainFeature struct {
}
@@ -607,6 +613,7 @@ type Domain struct {
OS *DomainOS `xml:"os"`
Features *DomainFeatureList `xml:"features"`
CPU *DomainCPU `xml:"cpu"`
+ Clock *DomainClock `xml:"clock,omitempty"`
OnPoweroff string `xml:"on_poweroff,omitempty"`
OnReboot string `xml:"on_reboot,omitempty"`
OnCrash string `xml:"on_crash,omitempty"`
diff --git a/domain_test.go b/domain_test.go
index 47e5e26..536b94c 100644
--- a/domain_test.go
+++ b/domain_test.go
@@ -491,6 +491,11 @@ var domainTestData = []struct {
},
},
},
+ Clock: &DomainClock{
+ Offset: "variable",
+ Basic: "utc",
+ Adjustment: 28794,
+ },
},
Expected: []string{
`<domain type="kvm">`,
@@ -524,6 +529,7 @@ var domainTestData = []struct {
` <initarg>--unit</initarg>`,
` <initarg>emergency.service</initarg>`,
` </os>`,
+ ` <clock offset="variable" basic="utc"
adjustment="28794"></clock>`,
`</domain>`,
},
},
--
2.7.4
--
libvir-list mailing list
libvir-list(a)redhat.com
https://www.redhat.com/mailman/listinfo/libvir-list