From nobody Thu May 2 06:09:13 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 1509332849661843.7902844372339; Sun, 29 Oct 2017 20:07:29 -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 CDE48285B1; Mon, 30 Oct 2017 03:07:27 +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 8FC315D6A3; Mon, 30 Oct 2017 03:07:27 +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 7FC5A3FCFD; Mon, 30 Oct 2017 03:07:26 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx03.intmail.prod.int.phx2.redhat.com [10.5.11.13]) by lists01.pubmisc.prod.ext.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id v9U37Pxu018992 for ; Sun, 29 Oct 2017 23:07:25 -0400 Received: by smtp.corp.redhat.com (Postfix) id 2AF3560603; Mon, 30 Oct 2017 03:07:25 +0000 (UTC) Received: from mx1.redhat.com (ext-mx06.extmail.prod.ext.phx2.redhat.com [10.5.110.30]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 6655860602; Mon, 30 Oct 2017 03:07:23 +0000 (UTC) Received: from out3140-146.mail.aliyun.com (out3140-146.mail.aliyun.com [42.120.140.146]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id D2E82369C9; Mon, 30 Oct 2017 03:07:18 +0000 (UTC) Received: from always-ubuntu64.lan(mailfrom:zhenwei.pi@youruncloud.com ip:112.95.153.98) by smtp.aliyun-inc.com(10.147.40.7); Mon, 30 Oct 2017 11:07:16 +0800 DMARC-Filter: OpenDMARC Filter v1.3.2 mx1.redhat.com CDE48285B1 Authentication-Results: ext-mx06.extmail.prod.ext.phx2.redhat.com; dmarc=none (p=none dis=none) header.from=youruncloud.com Authentication-Results: ext-mx06.extmail.prod.ext.phx2.redhat.com; spf=fail smtp.mailfrom=libvir-list-bounces@redhat.com DKIM-Filter: OpenDKIM Filter v2.11.0 mx1.redhat.com CDE48285B1 DMARC-Filter: OpenDMARC Filter v1.3.2 mx1.redhat.com D2E82369C9 Authentication-Results: ext-mx06.extmail.prod.ext.phx2.redhat.com; dmarc=none (p=none dis=none) header.from=youruncloud.com Authentication-Results: ext-mx06.extmail.prod.ext.phx2.redhat.com; spf=none smtp.mailfrom=zhenwei.pi@youruncloud.com DKIM-Filter: OpenDKIM Filter v2.11.0 mx1.redhat.com D2E82369C9 X-Alimail-AntiSpam: AC=CONTINUE; BC=0.06134298|-1; FP=0|0|0|0|0|-1|-1|-1; HT=e02c03278; MF=zhenwei.pi@youruncloud.com; NM=1; PH=DS; RN=3; RT=3; SR=0; TI=SMTPD_---.9H.MlsZ_1509332836; From: "zhenwei.pi" To: berrange@redhat.com, libvir-list@redhat.com Date: Mon, 30 Oct 2017 11:05:13 +0800 Message-Id: <1509332713-6503-1-git-send-email-zhenwei.pi@youruncloud.com> X-Greylist: Sender passed SPF test, Sender IP whitelisted by DNSRBL, ACL 205 matched, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.30]); Mon, 30 Oct 2017 03:07:21 +0000 (UTC) X-Greylist: inspected by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.30]); Mon, 30 Oct 2017 03:07:21 +0000 (UTC) for IP:'42.120.140.146' DOMAIN:'out3140-146.mail.aliyun.com' HELO:'out3140-146.mail.aliyun.com' FROM:'zhenwei.pi@youruncloud.com' RCPT:'' X-RedHat-Spam-Score: -0.029 (RCVD_IN_DNSWL_NONE, RCVD_IN_MSPIKE_H3, RCVD_IN_MSPIKE_WL, UNPARSEABLE_RELAY) 42.120.140.146 out3140-146.mail.aliyun.com 42.120.140.146 out3140-146.mail.aliyun.com X-Scanned-By: MIMEDefang 2.78 on 10.5.110.30 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.13 X-loop: libvir-list@redhat.com Cc: zhenwei.pi@youruncloud.com Subject: [libvirt] [PATCH go-xml] Add address support for memory device 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.30]); Mon, 30 Oct 2017 03:07:28 +0000 (UTC) X-ZohoMail: RSF_0 Z_629925259 SPT_0 Content-Type: text/plain; charset="utf-8" Add Base element for DomainAddress. Add address element for DomainMemorydev. Add test code for new DomainMemorydev. Signed-off-by: zhenwei.pi --- domain.go | 2 ++ domain_test.go | 9 +++++++++ 2 files changed, 11 insertions(+) diff --git a/domain.go b/domain.go index bacab11..3d9404f 100644 --- a/domain.go +++ b/domain.go @@ -297,6 +297,7 @@ type DomainAddress struct { Function *HexUint `xml:"function,attr"` Target *uint `xml:"target,attr"` Unit *uint `xml:"unit,attr"` + Base *HexUint `xml:"base,attr"` } =20 type DomainConsole struct { @@ -450,6 +451,7 @@ type DomainMemorydev struct { Model string `xml:"model,attr"` Access string `xml:"access,attr"` Target *DomainMemorydevTarget `xml:"target"` + Address *DomainAddress `xml:"address"` } =20 type DomainDeviceList struct { diff --git a/domain_test.go b/domain_test.go index dbebe42..cbc5d7f 100644 --- a/domain_test.go +++ b/domain_test.go @@ -66,6 +66,9 @@ var vcpuId0 uint =3D 0 var vcpuOrder0 uint =3D 1 var vcpuId1 uint =3D 1 =20 +var memorydevAddressSlot HexUint =3D 0 +var memorydevAddressBase HexUint =3D 4294967296 + var domainTestData =3D []struct { Object Document Expected []string @@ -385,6 +388,11 @@ var domainTestData =3D []struct { Value: 0, }, }, + Address: &DomainAddress{ + Type: "dimm", + Slot: &memorydevAddressSlot, + Base: &memorydevAddressBase, + }, }, }, }, @@ -434,6 +442,7 @@ var domainTestData =3D []struct { ` 1`, ` 0`, ` `, + `
= `, ` `, ` `, ``, --=20 2.7.4 -- libvir-list mailing list libvir-list@redhat.com https://www.redhat.com/mailman/listinfo/libvir-list