From nobody Sun Apr 28 13:00:06 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zoho.com: domain of redhat.com designates 209.132.183.28 as permitted sender) client-ip=209.132.183.28; envelope-from=libvir-list-bounces@redhat.com; helo=mx1.redhat.com; Authentication-Results: mx.zohomail.com; spf=pass (zoho.com: domain of redhat.com designates 209.132.183.28 as permitted sender) smtp.mailfrom=libvir-list-bounces@redhat.com Return-Path: Received: from mx1.redhat.com (mx1.redhat.com [209.132.183.28]) by mx.zohomail.com with SMTPS id 1499657744101469.09987597784277; Sun, 9 Jul 2017 20:35:44 -0700 (PDT) Received: from smtp.corp.redhat.com (int-mx05.intmail.prod.int.phx2.redhat.com [10.5.11.15]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 6071661D0F; Mon, 10 Jul 2017 03:35:42 +0000 (UTC) Received: from colo-mx.corp.redhat.com (colo-mx02.intmail.prod.int.phx2.redhat.com [10.5.11.21]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 08A99182CA; Mon, 10 Jul 2017 03:35:42 +0000 (UTC) Received: from lists01.pubmisc.prod.ext.phx2.redhat.com (lists01.pubmisc.prod.ext.phx2.redhat.com [10.5.19.33]) by colo-mx.corp.redhat.com (Postfix) with ESMTP id A42C241F76; Mon, 10 Jul 2017 03:35:41 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx02.intmail.prod.int.phx2.redhat.com [10.5.11.12]) by lists01.pubmisc.prod.ext.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id v6A3ZYRR001937 for ; Sun, 9 Jul 2017 23:35:34 -0400 Received: by smtp.corp.redhat.com (Postfix) id 1613177DC4; Mon, 10 Jul 2017 03:35:34 +0000 (UTC) Received: from mx1.redhat.com (ext-mx04.extmail.prod.ext.phx2.redhat.com [10.5.110.28]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 0C1DA60BE4 for ; Mon, 10 Jul 2017 03:35:32 +0000 (UTC) Received: from out28-147.mail.aliyun.com (out28-147.mail.aliyun.com [115.124.28.147]) by mx1.redhat.com (Postfix) with ESMTP id 0E0F980461 for ; Mon, 10 Jul 2017 03:35:30 +0000 (UTC) Received: from localhost.localdomain(mailfrom:zhenwei.pi@youruncloud.com ip:112.95.153.98) by smtp.aliyun-inc.com(10.147.44.118); Mon, 10 Jul 2017 11:35:27 +0800 DMARC-Filter: OpenDMARC Filter v1.3.2 mx1.redhat.com 6071661D0F Authentication-Results: ext-mx10.extmail.prod.ext.phx2.redhat.com; dmarc=none (p=none dis=none) header.from=youruncloud.com Authentication-Results: ext-mx10.extmail.prod.ext.phx2.redhat.com; spf=pass smtp.mailfrom=libvir-list-bounces@redhat.com DKIM-Filter: OpenDKIM Filter v2.11.0 mx1.redhat.com 6071661D0F DMARC-Filter: OpenDMARC Filter v1.3.2 mx1.redhat.com 0E0F980461 Authentication-Results: ext-mx04.extmail.prod.ext.phx2.redhat.com; dmarc=none (p=none dis=none) header.from=youruncloud.com Authentication-Results: ext-mx04.extmail.prod.ext.phx2.redhat.com; spf=none smtp.mailfrom=zhenwei.pi@youruncloud.com DKIM-Filter: OpenDKIM Filter v2.11.0 mx1.redhat.com 0E0F980461 X-Alimail-AntiSpam: AC=CONTINUE; BC=0.1397136|-1; FP=0|0|0|0|0|-1|-1|-1; HT=e02c03292; MF=zhenwei.pi@youruncloud.com; NM=1; PH=DS; RN=2; RT=2; SR=0; TI=SMTPD_---.8NjAp5N_1499657726; From: "zhenwei.pi" To: libvir-list@redhat.com Date: Mon, 10 Jul 2017 11:35:23 +0800 Message-Id: <1499657723-31795-1-git-send-email-zhenwei.pi@youruncloud.com> X-Greylist: Sender passed SPF test, Sender IP whitelisted by DNSRBL, ACL 203 matched, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.28]); Mon, 10 Jul 2017 03:35:31 +0000 (UTC) X-Greylist: inspected by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.28]); Mon, 10 Jul 2017 03:35:31 +0000 (UTC) for IP:'115.124.28.147' DOMAIN:'out28-147.mail.aliyun.com' HELO:'out28-147.mail.aliyun.com' FROM:'zhenwei.pi@youruncloud.com' RCPT:'' X-RedHat-Spam-Score: -2.409 (BAYES_50, DCC_REPUT_00_12, RCVD_IN_DNSWL_NONE, RCVD_IN_MSPIKE_H2, UNPARSEABLE_RELAY) 115.124.28.147 out28-147.mail.aliyun.com 115.124.28.147 out28-147.mail.aliyun.com X-Scanned-By: MIMEDefang 2.78 on 10.5.110.28 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.12 X-loop: libvir-list@redhat.com Cc: zhenwei.pi@youruncloud.com Subject: [libvirt] [PATCH go-xml] Add support for domain clock and test code X-BeenThere: libvir-list@redhat.com X-Mailman-Version: 2.1.12 Precedence: junk List-Id: Development discussions about the libvirt library & tools List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Sender: libvir-list-bounces@redhat.com Errors-To: libvir-list-bounces@redhat.com X-Scanned-By: MIMEDefang 2.79 on 10.5.11.15 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.39]); Mon, 10 Jul 2017 03:35:43 +0000 (UTC) X-ZohoMail: RSF_0 Z_629925259 SPT_0 Content-Type: text/plain; charset="utf-8" Signed-off-by: zhenwei.pi --- 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"` } =20 +type DomainClock struct { + Offset string `xml:"offset,attr,omitempty"` + Basic string `xml:"basic,attr,omitempty"` + Adjustment int `xml:"adjustment,attr,omitempty"` +} + type DomainFeature struct { } =20 @@ -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 =3D []struct { }, }, }, + Clock: &DomainClock{ + Offset: "variable", + Basic: "utc", + Adjustment: 28794, + }, }, Expected: []string{ ``, @@ -524,6 +529,7 @@ var domainTestData =3D []struct { ` --unit`, ` emergency.service`, ` `, + ` `, ``, }, }, --=20 2.7.4 -- libvir-list mailing list libvir-list@redhat.com https://www.redhat.com/mailman/listinfo/libvir-list