From nobody Wed Oct 9 00:16:14 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zoho.com: domain of ovirt.org designates 66.187.230.42 as permitted sender) client-ip=66.187.230.42; envelope-from=kimchi-devel-bounces@ovirt.org; helo=lists.ovirt.org; Authentication-Results: mx.zoho.com; spf=pass (zoho.com: domain of ovirt.org designates 66.187.230.42 as permitted sender) smtp.mailfrom=kimchi-devel-bounces@ovirt.org; Return-Path: Received: from lists.ovirt.org (lists.phx.ovirt.org [66.187.230.42]) by mx.zohomail.com with SMTPS id 1490793951354915.4725479091595; Wed, 29 Mar 2017 06:25:51 -0700 (PDT) Received: from lists.phx.ovirt.org (localhost [127.0.0.1]) by lists.ovirt.org (Postfix) with ESMTP id BDCCD820749; Wed, 29 Mar 2017 13:25:48 +0000 (UTC) Received: from mx0a-001b2d01.pphosted.com (mx0b-001b2d01.pphosted.com [148.163.158.5]) by lists.ovirt.org (Postfix) with ESMTPS id 594C9820744 for ; Wed, 29 Mar 2017 13:25:21 +0000 (UTC) Received: from pps.filterd (m0098419.ppops.net [127.0.0.1]) by mx0b-001b2d01.pphosted.com (8.16.0.20/8.16.0.20) with SMTP id v2TDNjxk123043 for ; Wed, 29 Mar 2017 09:25:20 -0400 Received: from e24smtp02.br.ibm.com (e24smtp02.br.ibm.com [32.104.18.86]) by mx0b-001b2d01.pphosted.com with ESMTP id 29gd8s1k5y-1 (version=TLSv1.2 cipher=AES256-SHA bits=256 verify=NOT) for ; Wed, 29 Mar 2017 09:25:20 -0400 Received: from localhost by e24smtp02.br.ibm.com with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted for from ; Wed, 29 Mar 2017 10:25:18 -0300 Received: from d24relay03.br.ibm.com (9.18.232.225) by e24smtp02.br.ibm.com (10.172.0.142) with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted; Wed, 29 Mar 2017 10:25:15 -0300 Received: from d24av01.br.ibm.com (d24av01.br.ibm.com [9.8.31.91]) by d24relay03.br.ibm.com (8.14.9/8.14.9/NCO v10.0) with ESMTP id v2TDPEPD39583788 for ; Wed, 29 Mar 2017 10:25:14 -0300 Received: from d24av01.br.ibm.com (localhost [127.0.0.1]) by d24av01.br.ibm.com (8.14.4/8.14.4/NCO v10.0 AVout) with ESMTP id v2TDPEac030113 for ; Wed, 29 Mar 2017 10:25:14 -0300 Received: from alinefm-TP440.ibmmodules.com ([9.85.150.73]) by d24av01.br.ibm.com (8.14.4/8.14.4/NCO v10.0 AVin) with ESMTP id v2TDPB60030045 for ; Wed, 29 Mar 2017 10:25:12 -0300 X-Original-To: kimchi-devel@ovirt.org From: Aline Manera To: Kimchi Devel Date: Wed, 29 Mar 2017 10:25:04 -0300 X-Mailer: git-send-email 2.9.3 X-TM-AS-MML: disable x-cbid: 17032913-0020-0000-0000-00000299E6E7 X-IBM-AV-DETECTION: SAVI=unused REMOTE=unused XFE=unused x-cbparentid: 17032913-0021-0000-0000-000030B6E99A Message-Id: <20170329132504.11669-1-alinefm@linux.vnet.ibm.com> X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10432:, , definitions=2017-03-29_09:, , signatures=0 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 spamscore=0 suspectscore=0 malwarescore=0 phishscore=0 adultscore=0 bulkscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.0.1-1702020001 definitions=main-1703290115 Subject: [Kimchi-devel] [PATCH] [Kimchi] Bug fix: Set original VLAN device to network parameters to be updated X-BeenThere: kimchi-devel@ovirt.org X-Mailman-Version: 2.1.12 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Sender: kimchi-devel-bounces@ovirt.org Errors-To: kimchi-devel-bounces@ovirt.org X-ZohoMail: RSF_0 Z_629925259 SPT_0 Content-Type: text/plain; charset="utf-8" It is part of the #1087 fix Signed-off-by: Aline Manera Reviewed-by: Daniel Barboza --- model/networks.py | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/model/networks.py b/model/networks.py index eb1590e..ce93bb1 100644 --- a/model/networks.py +++ b/model/networks.py @@ -532,6 +532,9 @@ class NetworkModel(object): if params.get('vlan_id') or params.get('interfaces'): raise InvalidParameter("KCHNET0032E") =20 + # merge parameters + info.update(params) + # get target device if bridge was created by Kimchi if connection =3D=3D 'bridge': iface =3D info['interfaces'][0] @@ -544,18 +547,13 @@ class NetworkModel(object): else: info['interfaces'] =3D original['interfaces'] =3D [por= t] =20 - # merge parameters - info.update(params) - # delete original network self.delete(name) =20 try: # create new network - network =3D self.collection.create(info) + return self.collection.create(info) except: # restore original network self.collection.create(original) raise - - return network --=20 2.9.3 _______________________________________________ Kimchi-devel mailing list Kimchi-devel@ovirt.org http://lists.ovirt.org/mailman/listinfo/kimchi-devel