From nobody Mon Sep 16 18:58:10 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 1489065439773624.1024553988049; Thu, 9 Mar 2017 05:17:19 -0800 (PST) Received: from lists.phx.ovirt.org (localhost [127.0.0.1]) by lists.ovirt.org (Postfix) with ESMTP id E36F9820646; Thu, 9 Mar 2017 13:17:17 +0000 (UTC) Received: from mx0a-001b2d01.pphosted.com (mx0a-001b2d01.pphosted.com [148.163.156.1]) by lists.ovirt.org (Postfix) with ESMTPS id 0EFD58205DD for ; Thu, 9 Mar 2017 13:16:21 +0000 (UTC) Received: from pps.filterd (m0098410.ppops.net [127.0.0.1]) by mx0a-001b2d01.pphosted.com (8.16.0.20/8.16.0.20) with SMTP id v29DERbW067041 for ; Thu, 9 Mar 2017 08:16:21 -0500 Received: from e24smtp03.br.ibm.com (e24smtp03.br.ibm.com [32.104.18.24]) by mx0a-001b2d01.pphosted.com with ESMTP id 29358aqp0p-1 (version=TLSv1.2 cipher=AES256-SHA bits=256 verify=NOT) for ; Thu, 09 Mar 2017 08:16:21 -0500 Received: from localhost by e24smtp03.br.ibm.com with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted for from ; Thu, 9 Mar 2017 10:16:18 -0300 Received: from d24relay02.br.ibm.com (9.18.232.42) by e24smtp03.br.ibm.com (10.172.0.139) with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted; Thu, 9 Mar 2017 10:16:16 -0300 Received: from d24av04.br.ibm.com (d24av04.br.ibm.com [9.8.31.97]) by d24relay02.br.ibm.com (8.14.9/8.14.9/NCO v10.0) with ESMTP id v29DGGKN38141952 for ; Thu, 9 Mar 2017 10:16:16 -0300 Received: from d24av04.br.ibm.com (localhost [127.0.0.1]) by d24av04.br.ibm.com (8.14.4/8.14.4/NCO v10.0 AVout) with ESMTP id v29DGFQI003587 for ; Thu, 9 Mar 2017 10:16:15 -0300 Received: from jarvis.ibmmodules.com ([9.85.161.65]) by d24av04.br.ibm.com (8.14.4/8.14.4/NCO v10.0 AVin) with ESMTP id v29DG9Xw003462 for ; Thu, 9 Mar 2017 10:16:14 -0300 X-Original-To: kimchi-devel@ovirt.org From: Ramon Medeiros To: Kimchi Devel Date: Thu, 9 Mar 2017 10:16:02 -0300 X-Mailer: git-send-email 2.9.3 In-Reply-To: <20170309131603.3553-1-ramonn@linux.vnet.ibm.com> References: <20170309131603.3553-1-ramonn@linux.vnet.ibm.com> X-TM-AS-MML: disable x-cbid: 17030913-0024-0000-0000-0000015C3F9E X-IBM-AV-DETECTION: SAVI=unused REMOTE=unused XFE=unused x-cbparentid: 17030913-0025-0000-0000-000016224D18 Message-Id: <20170309131603.3553-4-ramonn@linux.vnet.ibm.com> X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10432:, , definitions=2017-03-09_11:, , 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-1703090100 Subject: [Kimchi-devel] [PATCH] [Kimchi 3/4] Bug fix #1091: Allow to set disk performance options per guest and template 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" Allow vmstorage creation passing disk bus Signed-off-by: Ramon Medeiros --- docs/API.md | 1 + model/vmstorages.py | 4 +++- 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/docs/API.md b/docs/API.md index 6f00600..3657db3 100644 --- a/docs/API.md +++ b/docs/API.md @@ -243,6 +243,7 @@ Represents a snapshot of the Virtual Machine's primary = monitor. * dir_path: s390x specific attribute to attach direct storage without = libvirt * format: s390x specific attribute specify the format of direct storage * size: s390x specific attribute to specify the size of direct storage + * bus: Bus type of disk. =20 ### Sub-resource: storage **URI:** /plugins/kimchi/vms/*:name*/storages/*:dev* diff --git a/model/vmstorages.py b/model/vmstorages.py index 007e88c..bf55300 100644 --- a/model/vmstorages.py +++ b/model/vmstorages.py @@ -91,7 +91,9 @@ class VMStoragesModel(object): raise InvalidParameter("KCHVMSTOR0019E") =20 dom =3D VMModel.get_vm(vm_name, self.conn) - params['bus'] =3D _get_device_bus(params['type'], dom) + + if params.get('bus') is None: + params['bus'] =3D _get_device_bus(params['type'], dom) =20 if is_s390x() and params['type'] =3D=3D 'disk' and 'dir_path' in p= arams: if 'format' not in params: --=20 2.9.3 _______________________________________________ Kimchi-devel mailing list Kimchi-devel@ovirt.org http://lists.ovirt.org/mailman/listinfo/kimchi-devel