From nobody Tue May 7 18:11:35 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.zoho.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 1496770123820580.1246944673424; Tue, 6 Jun 2017 10:28:43 -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 9213980481; Tue, 6 Jun 2017 17:28:41 +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 6CA22867E9; Tue, 6 Jun 2017 17:28:41 +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 174294A48F; Tue, 6 Jun 2017 17:28:41 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx01.intmail.prod.int.phx2.redhat.com [10.5.11.11]) by lists01.pubmisc.prod.ext.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id v565phWi023744 for ; Tue, 6 Jun 2017 01:51:44 -0400 Received: by smtp.corp.redhat.com (Postfix) id A6A2019C87; Tue, 6 Jun 2017 05:51:43 +0000 (UTC) Received: from mx1.redhat.com (ext-mx05.extmail.prod.ext.phx2.redhat.com [10.5.110.29]) by smtp.corp.redhat.com (Postfix) with ESMTPS id A08FE6031D for ; Tue, 6 Jun 2017 05:51:41 +0000 (UTC) Received: from out28-145.mail.aliyun.com (out28-145.mail.aliyun.com [115.124.28.145]) by mx1.redhat.com (Postfix) with ESMTP id D560A3DEEB for ; Tue, 6 Jun 2017 05:51:36 +0000 (UTC) Received: from localhost.localdomain(mailfrom:zhenwei.pi@youruncloud.com ip:112.95.153.98) by smtp.aliyun-inc.com(10.147.41.187); Tue, 06 Jun 2017 13:51:34 +0800 DMARC-Filter: OpenDMARC Filter v1.3.2 mx1.redhat.com 9213980481 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=pass smtp.mailfrom=libvir-list-bounces@redhat.com DKIM-Filter: OpenDKIM Filter v2.11.0 mx1.redhat.com 9213980481 DMARC-Filter: OpenDMARC Filter v1.3.2 mx1.redhat.com D560A3DEEB Authentication-Results: ext-mx05.extmail.prod.ext.phx2.redhat.com; dmarc=none (p=none dis=none) header.from=youruncloud.com Authentication-Results: ext-mx05.extmail.prod.ext.phx2.redhat.com; spf=none smtp.mailfrom=zhenwei.pi@youruncloud.com DKIM-Filter: OpenDKIM Filter v2.11.0 mx1.redhat.com D560A3DEEB X-Alimail-AntiSpam: AC=CONTINUE; BC=0.1067908|-1; FP=0|0|0|0|0|-1|-1|-1; HT=e02c03311; MF=zhenwei.pi@youruncloud.com; NM=1; PH=DS; RN=2; RT=2; SR=0; TI=SMTPD_---.8AWitZz_1496728293; From: "zhenwei.pi" To: libvir-list@redhat.com Date: Tue, 6 Jun 2017 13:51:30 +0800 Message-Id: <1496728290-12047-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.29]); Tue, 06 Jun 2017 05:51:40 +0000 (UTC) X-Greylist: inspected by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.29]); Tue, 06 Jun 2017 05:51:40 +0000 (UTC) for IP:'115.124.28.145' DOMAIN:'out28-145.mail.aliyun.com' HELO:'out28-145.mail.aliyun.com' FROM:'zhenwei.pi@youruncloud.com' RCPT:'' X-RedHat-Spam-Score: 0.371 (BAYES_50, DCC_REPUT_00_12, RCVD_IN_DNSWL_NONE, RCVD_IN_MSPIKE_H3, RCVD_IN_MSPIKE_WL, UNPARSEABLE_RELAY) 115.124.28.145 out28-145.mail.aliyun.com 115.124.28.145 out28-145.mail.aliyun.com X-Scanned-By: MIMEDefang 2.78 on 10.5.110.29 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.11 X-loop: libvir-list@redhat.com Cc: "zhenwei.pi" Subject: [libvirt] [PATCH go-xml] 1,rename DomainInterfaceBoot to DomainDeviceBoot; 2,support disk boot order 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.28]); Tue, 06 Jun 2017 17:28:42 +0000 (UTC) X-ZohoMail: RSF_0 Z_629925259 SPT_0 Content-Type: text/plain; charset="utf-8" --- domain.go | 5 +++-- domain_test.go | 6 +++++- 2 files changed, 8 insertions(+), 3 deletions(-) diff --git a/domain.go b/domain.go index 1d91dc3..7d8f6d6 100644 --- a/domain.go +++ b/domain.go @@ -98,6 +98,7 @@ type DomainDisk struct { ReadOnly *DomainDiskReadOnly `xml:"readonly"` Shareable *DomainDiskShareable `xml:"shareable"` Address *DomainAddress `xml:"address"` + Boot *DomainDeviceBoot `xml:"boot"` } =20 type DomainFilesystemDriver struct { @@ -171,7 +172,7 @@ type DomainInterfaceLink struct { State string `xml:"state,attr"` } =20 -type DomainInterfaceBoot struct { +type DomainDeviceBoot struct { Order uint `xml:"order,attr"` } =20 @@ -193,7 +194,7 @@ type DomainInterface struct { Target *DomainInterfaceTarget `xml:"target"` Alias *DomainInterfaceAlias `xml:"alias"` Link *DomainInterfaceLink `xml:"link"` - Boot *DomainInterfaceBoot `xml:"boot"` + Boot *DomainDeviceBoot `xml:"boot"` Script *DomainInterfaceScript `xml:"script"` Driver *DomainInterfaceDriver `xml:"driver"` Address *DomainAddress `xml:"address"` diff --git a/domain_test.go b/domain_test.go index b83d4ae..3d015c7 100644 --- a/domain_test.go +++ b/domain_test.go @@ -87,6 +87,9 @@ var domainTestData =3D []struct { Bus: "virtio", }, Serial: "fishfood", + Boot: &DomainDeviceBoot{ + Order: 1, + }, }, DomainDisk{ Type: "block", @@ -189,6 +192,7 @@ var domainTestData =3D []struct { ` `, ` `, ` fishfood`, + ` `, ` `, ` `, ` `, @@ -710,7 +714,7 @@ var domainTestData =3D []struct { Link: &DomainInterfaceLink{ State: "up", }, - Boot: &DomainInterfaceBoot{ + Boot: &DomainDeviceBoot{ Order: 1, }, Driver: &DomainInterfaceDriver{ --=20 2.7.4 -- libvir-list mailing list libvir-list@redhat.com https://www.redhat.com/mailman/listinfo/libvir-list