From nobody Thu May 2 10:29:07 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; dkim=fail; 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 151074746332772.14211374542526; Wed, 15 Nov 2017 04:04:23 -0800 (PST) Received: from smtp.corp.redhat.com (int-mx06.intmail.prod.int.phx2.redhat.com [10.5.11.16]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id ED47A5FD57; Wed, 15 Nov 2017 12:04:21 +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 C51EA88E18; Wed, 15 Nov 2017 12:04:21 +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 5E01B4A468; Wed, 15 Nov 2017 12:04:21 +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 vAFC4Kub024326 for ; Wed, 15 Nov 2017 07:04:20 -0500 Received: by smtp.corp.redhat.com (Postfix) id 153A190C17; Wed, 15 Nov 2017 12:04:20 +0000 (UTC) Received: from mx1.redhat.com (ext-mx10.extmail.prod.ext.phx2.redhat.com [10.5.110.39]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 0F45D90C1C for ; Wed, 15 Nov 2017 12:04:17 +0000 (UTC) Received: from joint.e-dot.pl (joint.e-dot.pl [108.61.84.20]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 5708A5F7BF for ; Wed, 15 Nov 2017 12:04:16 +0000 (UTC) Received: from [10.180.78.241] (unknown [62.6.59.98]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by joint.e-dot.pl (Postfix) with ESMTPSA id A8E0C4A419 for ; Wed, 15 Nov 2017 11:55:40 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=e-dot.pl; s=default; t=1510746940; bh=2CxE914Ey+Ri8EmXiHOZNj2hRta3+O7AU1FVcQZaw9w=; h=From:Subject:To:Date:From; b=uOutAreIuOgzNlgu/0YVhEKDwN7/qPXNM2s8+c0lkT+MQhkITxI/FiuvaavRx3ltw dXEWq6qo96oegq9me3HTs7xRhdkTzUrsYwjr2LM10ED0BLbsiV3GHgm1m2E7pNgSZz ShrjL20RIt/f7vrr7hTd4PybV4wI5hQScuQYPXSM= From: Karol Czeryna Mime-Version: 1.0 (Mac OS X Mail 10.3 \(3273\)) Message-Id: <345E870C-8366-4B76-9D8D-D5880E79308D@e-dot.pl> X-Mailbutler-Link-Tracking-Uuid: To: libvir-list@redhat.com Date: Wed, 15 Nov 2017 11:55:36 +0000 X-Greylist: Delayed for 00:08:34 by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.39]); Wed, 15 Nov 2017 12:04:16 +0000 (UTC) X-Greylist: inspected by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.39]); Wed, 15 Nov 2017 12:04:16 +0000 (UTC) for IP:'108.61.84.20' DOMAIN:'joint.e-dot.pl' HELO:'joint.e-dot.pl' FROM:'karol@e-dot.pl' RCPT:'' X-RedHat-Spam-Score: -0.102 (DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, RP_MATCHES_RCVD, SPF_PASS) 108.61.84.20 joint.e-dot.pl 108.61.84.20 joint.e-dot.pl X-Scanned-By: MIMEDefang 2.78 on 10.5.110.39 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.12 X-MIME-Autoconverted: from quoted-printable to 8bit by lists01.pubmisc.prod.ext.phx2.redhat.com id vAFC4Kub024326 X-loop: libvir-list@redhat.com Subject: [libvirt] PATCH go-xml : add virtualport support 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: , 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.16 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.25]); Wed, 15 Nov 2017 12:04:22 +0000 (UTC) X-ZohoMail-DKIM: fail (Header signature does not verify) X-ZohoMail: RDKM_2 RSF_0 Z_629925259 SPT_0 Content-Type: text/plain; charset="utf-8" Hi guys! Working with terraform libvirt plugin I discovered lack of openvswitch supp= ort - but in libvirt-go there is no support for virtualport entry.. this pa= tch adds virtualport support. diff --git a/network.go b/network.go index 10c4dfc..0f072ec 100644 Reviewed-by: Daniel P. Berrange --- a/network.go +++ b/network.go @@ -36,6 +36,16 @@ type NetworkBridge struct { MACTableManager string `xml:"macTableManager,attr,omitempty"` } +type VirtualPortParameters struct { + InterfaceID string `xml:"interfaceid,attr,omitempty"` + ProfileID string `xml:"profileid,attr,omitempty"` +} + +type VirtualPort struct { + Type string `xml:"type,attr,omitempty"` + Parameters []VirtualPortParameters `xml:"parameters,omitempty"` +} + type NetworkDomain struct { Name string `xml:"name,attr,omitempty"` LocalOnly string `xml:"localOnly,attr,omitempty"` @@ -152,6 +162,7 @@ type Network struct { UUID string `xml:"uuid,omitempty"` MAC *NetworkMAC `xml:"mac"` Bridge *NetworkBridge `xml:"bridge"` + VirtualPort *VirtualPort `xml:"virtualport"` Forward *NetworkForward `xml:"forward"` Domain *NetworkDomain `xml:"domain"` IPs []NetworkIP `xml:"ip"` diff --git a/network_test.go b/network_test.go index 3efb278..10cce66 100644 --- a/network_test.go +++ b/network_test.go @@ -65,6 +65,14 @@ var networkTestData =3D []struct { Bridge: &NetworkBridge{ Name: "virbr0", }, + VirtualPort: &VirtualPort{ + Type: "openvswitch", + Parameters: []VirtualPortParameters{ + VirtualPortParameters{ + InterfaceID: "09b11c53-8b5c-4eeb-8f00-d84eaa0aaa4f", + }, + }, + }, Forward: &NetworkForward{ Mode: "nat", NAT: &NetworkForwardNAT{ @@ -175,6 +183,9 @@ var networkTestData =3D []struct { ``, ` test`, ` `, + ` `, + ` <= /parameters>`, + ` `, ` `, ` `, `
`, Best, Karol -- libvir-list mailing list libvir-list@redhat.com https://www.redhat.com/mailman/listinfo/libvir-list