From nobody Tue May 7 22:28:01 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of redhat.com designates 205.139.110.61 as permitted sender) client-ip=205.139.110.61; envelope-from=libvir-list-bounces@redhat.com; helo=us-smtp-delivery-1.mimecast.com; Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of redhat.com designates 205.139.110.61 as permitted sender) smtp.mailfrom=libvir-list-bounces@redhat.com; dmarc=pass(p=none dis=none) header.from=redhat.com ARC-Seal: i=1; a=rsa-sha256; t=1576880570; cv=none; d=zohomail.com; s=zohoarc; b=NAOCIEuyfdNv4RTJjOZXGKE7ly37KM9fEOTIej1eSyvTBchJVm3V6WblkIfk1VKyxs7914RQ9LKOS4FwtmqxQK16UReX+sPW/W1dAQ0nsMze83wiU82394XmXLgqflXDtFvAAjTqvDJju1jSTfM0bjyAgbWNEXM7ONIhVKXgkSQ= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1576880570; h=Content-Type:Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To; bh=IYbIYVMf644tdmmdZ2yT7UW27ZtefaKJsuKhrVRxeCY=; b=TPFMFw0kaMSVSe8HylnHMz9JVfHKpmGMa7vdxA+RCF26X8RG8SQQMFeHgY+dI8Q40EqAyTEOjpBNOzrJo6CFv/uAqijmeRb5BhkaacrjjPt0NYabXItAbnGS1wI06UMCAEwlrJGgDSY84Vleiz2Xv2+RI0H1SLTZoHhBXnZmfWk= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of redhat.com designates 205.139.110.61 as permitted sender) smtp.mailfrom=libvir-list-bounces@redhat.com; dmarc=pass header.from= (p=none dis=none) header.from= Return-Path: Received: from us-smtp-delivery-1.mimecast.com (us-smtp-2.mimecast.com [205.139.110.61]) by mx.zohomail.com with SMTPS id 1576880570488546.6302467519455; Fri, 20 Dec 2019 14:22:50 -0800 (PST) Received: from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com [209.132.183.4]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-436-H1r07o6JNgqu1Zt5N5inXA-1; Fri, 20 Dec 2019 17:22:47 -0500 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 mimecast-mx01.redhat.com (Postfix) with ESMTPS id B1CD2800D48; Fri, 20 Dec 2019 22:22:41 +0000 (UTC) Received: from colo-mx.corp.redhat.com (colo-mx01.intmail.prod.int.phx2.redhat.com [10.5.11.20]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 8E2A15D729; Fri, 20 Dec 2019 22:22:40 +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 EA04418089CD; Fri, 20 Dec 2019 22:22:37 +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 xBKMMaCw016123 for ; Fri, 20 Dec 2019 17:22:36 -0500 Received: by smtp.corp.redhat.com (Postfix) id 135FC7D92F; Fri, 20 Dec 2019 22:22:36 +0000 (UTC) Received: from worklaptop.redhat.com (ovpn-124-243.rdu2.redhat.com [10.10.124.243]) by smtp.corp.redhat.com (Postfix) with ESMTP id 3B0BF7D903; Fri, 20 Dec 2019 22:22:35 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1576880568; h=from:from:sender:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references:list-id:list-help: list-unsubscribe:list-subscribe:list-post; bh=IYbIYVMf644tdmmdZ2yT7UW27ZtefaKJsuKhrVRxeCY=; b=f7ZqnySKuFQnI6YEiLIWoj0DolAkx6U+nJGkSWnDjtQ5OVBtslpx744ct3WHWPgxAmPRHK QQPSgyIOW8SKFgds7mfSqF3yKAozpvnzfpUwJj2BReyjXmVdiUjPDnarYeJQ/Ba2OjIbYT 1BJSwz2xi5fb+JcYadFS6MhnmelXdfs= From: Cole Robinson To: libvir-list@redhat.com Date: Fri, 20 Dec 2019 17:22:25 -0500 Message-Id: In-Reply-To: References: MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.13 X-loop: libvir-list@redhat.com Cc: Cole Robinson Subject: [libvirt] [go-xml PATCH 1/2] Fix virtio-s390 address lookup 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: , 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-MC-Unique: H1r07o6JNgqu1Zt5N5inXA-1 X-Mimecast-Spam-Score: 0 Content-Transfer-Encoding: quoted-printable X-ZohoMail-DKIM: pass (identity @redhat.com) Content-Type: text/plain; charset="utf-8" It was comparing against spapr-vio Signed-off-by: Cole Robinson --- All this virtio-s390 stuff is kinda bogus though, because it is never actually output in libvirt XML. domain.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/domain.go b/domain.go index 8c4d7a4..7552c4b 100644 --- a/domain.go +++ b/domain.go @@ -5145,7 +5145,7 @@ func (a *DomainAddress) UnmarshalXML(d *xml.Decoder, = start xml.StartElement) err } else if typ =3D=3D "ccid" { a.CCID =3D &DomainAddressCCID{} return d.DecodeElement(a.CCID, &start) - } else if typ =3D=3D "spapr-vio" { + } else if typ =3D=3D "virtio-s390" { a.VirtioS390 =3D &DomainAddressVirtioS390{} return d.DecodeElement(a.VirtioS390, &start) } --=20 2.23.0 -- libvir-list mailing list libvir-list@redhat.com https://www.redhat.com/mailman/listinfo/libvir-list From nobody Tue May 7 22:28:01 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of redhat.com designates 205.139.110.120 as permitted sender) client-ip=205.139.110.120; envelope-from=libvir-list-bounces@redhat.com; helo=us-smtp-1.mimecast.com; Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of redhat.com designates 205.139.110.120 as permitted sender) smtp.mailfrom=libvir-list-bounces@redhat.com; dmarc=pass(p=none dis=none) header.from=redhat.com ARC-Seal: i=1; a=rsa-sha256; t=1576880586; cv=none; d=zohomail.com; s=zohoarc; b=krOKIrRBGTY+f694pKF2PheomRjr+Ukc2LSyeMFOS1Lntua9kPkcGq6m2w/e3ZawGndGLJobm15i1UP0kCAG+hHqpt3Hun0vKiXAQW+RtEfZVYCZMPgOuEEgy4ww9dXMQesWDDZhlWSTTunNLrYfBtlgt8UzDR44ogTBg8ZuMlg= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1576880586; h=Content-Type:Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To; bh=PnafcpI4F+1H4z6aJTQ/yWdXJg8vEcF4vGTVGFvZF4c=; b=JmEpojwdseXWN2qwDMUS+S4/65lZheZwlTPD+fHl7zAKJM8DRr17/RmekQ+oqhPnIdcZlnRBpX3tuOWdO5Mpw76zMvlfIJt4qOHFwt8Uv2o22V+WQFj7JF2anoTz2ceDt1ded+kSd816ZL1xR+xVAym3MZME2CjxawC/0AQizGM= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of redhat.com designates 205.139.110.120 as permitted sender) smtp.mailfrom=libvir-list-bounces@redhat.com; dmarc=pass header.from= (p=none dis=none) header.from= Return-Path: Received: from us-smtp-1.mimecast.com (us-smtp-delivery-1.mimecast.com [205.139.110.120]) by mx.zohomail.com with SMTPS id 1576880586508885.0915392887847; Fri, 20 Dec 2019 14:23:06 -0800 (PST) Received: from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com [209.132.183.4]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-222-6UKUhjmCPMa9JFgOwwgxjg-1; Fri, 20 Dec 2019 17:23:03 -0500 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 mimecast-mx01.redhat.com (Postfix) with ESMTPS id DEAD0800EB5; Fri, 20 Dec 2019 22:22:57 +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 B6D2C5F777; Fri, 20 Dec 2019 22:22:57 +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 40250252C3; Fri, 20 Dec 2019 22:22:57 +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 xBKMMbVc016130 for ; Fri, 20 Dec 2019 17:22:37 -0500 Received: by smtp.corp.redhat.com (Postfix) id F2E3B7D92F; Fri, 20 Dec 2019 22:22:36 +0000 (UTC) Received: from worklaptop.redhat.com (ovpn-124-243.rdu2.redhat.com [10.10.124.243]) by smtp.corp.redhat.com (Postfix) with ESMTP id 626847D903; Fri, 20 Dec 2019 22:22:36 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1576880585; h=from:from:sender:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references:list-id:list-help: list-unsubscribe:list-subscribe:list-post; bh=PnafcpI4F+1H4z6aJTQ/yWdXJg8vEcF4vGTVGFvZF4c=; b=IEgRFD2k7XMDRBkuZIncCkrCklbqLie7qJ0JMAb11M7/f84nnKDa87i+EqVIhRfdeuwAPA 1diKWL7KtFmjSphTdlp/EGfevzZzxp/3zcqOmMywkmIgCpCv7ThGWmiN2R0Qdr1q+waKGL SV4Ap7jmPR89Tj2MTAYekoKom2fea8k= From: Cole Robinson To: libvir-list@redhat.com Date: Fri, 20 Dec 2019 17:22:26 -0500 Message-Id: <03ff3c85b8f83a848c835760c3d9d8944211558c.1576879072.git.crobinso@redhat.com> In-Reply-To: References: MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.13 X-loop: libvir-list@redhat.com Cc: Cole Robinson Subject: [libvirt] [go-xml PATCH 2/2] Support domain address type='unassigned' 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: , 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-MC-Unique: 6UKUhjmCPMa9JFgOwwgxjg-1 X-Mimecast-Spam-Score: 0 Content-Transfer-Encoding: quoted-printable X-ZohoMail-DKIM: pass (identity @redhat.com) Content-Type: text/plain; charset="utf-8" Signed-off-by: Cole Robinson Reviewed-by: Daniel P. Berrang=C3=A9 --- This should fix the libvirt-go-xml CI domain.go | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) diff --git a/domain.go b/domain.go index 7552c4b..c290003 100644 --- a/domain.go +++ b/domain.go @@ -887,6 +887,9 @@ type DomainAddressCCID struct { type DomainAddressVirtioS390 struct { } =20 +type DomainAddressUnassigned struct { +} + type DomainAddress struct { PCI *DomainAddressPCI Drive *DomainAddressDrive @@ -899,6 +902,7 @@ type DomainAddress struct { VirtioMMIO *DomainAddressVirtioMMIO ISA *DomainAddressISA DIMM *DomainAddressDIMM + Unassigned *DomainAddressUnassigned } =20 type DomainChardevLog struct { @@ -4801,6 +4805,12 @@ func (a *DomainAddressVirtioS390) MarshalXML(e *xml.= Encoder, start xml.StartElem return nil } =20 +func (a *DomainAddressUnassigned) MarshalXML(e *xml.Encoder, start xml.Sta= rtElement) error { + e.EncodeToken(start) + e.EncodeToken(start.End()) + return nil +} + func (a *DomainAddress) MarshalXML(e *xml.Encoder, start xml.StartElement)= error { if a.USB !=3D nil { start.Attr =3D append(start.Attr, xml.Attr{ @@ -4857,6 +4867,11 @@ func (a *DomainAddress) MarshalXML(e *xml.Encoder, s= tart xml.StartElement) error xml.Name{Local: "type"}, "virtio-s390", }) return e.EncodeElement(a.VirtioS390, start) + } else if a.Unassigned !=3D nil { + start.Attr =3D append(start.Attr, xml.Attr{ + xml.Name{Local: "type"}, "unassigned", + }) + return e.EncodeElement(a.Unassigned, start) } else { return nil } @@ -5102,6 +5117,11 @@ func (a *DomainAddressVirtioS390) UnmarshalXML(d *xm= l.Decoder, start xml.StartEl return nil } =20 +func (a *DomainAddressUnassigned) UnmarshalXML(d *xml.Decoder, start xml.S= tartElement) error { + d.Skip() + return nil +} + func (a *DomainAddress) UnmarshalXML(d *xml.Decoder, start xml.StartElemen= t) error { var typ string for _, attr :=3D range start.Attr { @@ -5148,6 +5168,9 @@ func (a *DomainAddress) UnmarshalXML(d *xml.Decoder, = start xml.StartElement) err } else if typ =3D=3D "virtio-s390" { a.VirtioS390 =3D &DomainAddressVirtioS390{} return d.DecodeElement(a.VirtioS390, &start) + } else if typ =3D=3D "unassigned" { + a.Unassigned =3D &DomainAddressUnassigned{} + return d.DecodeElement(a.Unassigned, &start) } =20 return nil --=20 2.23.0 -- libvir-list mailing list libvir-list@redhat.com https://www.redhat.com/mailman/listinfo/libvir-list