From nobody Sun Dec 22 06:14:07 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 1488573236693113.90576266024448; Fri, 3 Mar 2017 12:33:56 -0800 (PST) Received: from lists.phx.ovirt.org (localhost [127.0.0.1]) by lists.ovirt.org (Postfix) with ESMTP id 3F8A58205D1; Fri, 3 Mar 2017 20:33:54 +0000 (UTC) Received: from mx0a-001b2d01.pphosted.com (mx0b-001b2d01.pphosted.com [148.163.158.5]) by lists.ovirt.org (Postfix) with ESMTPS id 9894C82052A for ; Fri, 3 Mar 2017 20:33:27 +0000 (UTC) Received: from pps.filterd (m0098413.ppops.net [127.0.0.1]) by mx0b-001b2d01.pphosted.com (8.16.0.20/8.16.0.20) with SMTP id v23KOLpC013332 for ; Fri, 3 Mar 2017 15:33:26 -0500 Received: from e24smtp02.br.ibm.com (e24smtp02.br.ibm.com [32.104.18.86]) by mx0b-001b2d01.pphosted.com with ESMTP id 28ye163p6u-1 (version=TLSv1.2 cipher=AES256-SHA bits=256 verify=NOT) for ; Fri, 03 Mar 2017 15:33:26 -0500 Received: from localhost by e24smtp02.br.ibm.com with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted for from ; Fri, 3 Mar 2017 17:33:24 -0300 Received: from d24dlp01.br.ibm.com (9.18.248.204) by e24smtp02.br.ibm.com (10.172.0.142) with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted; Fri, 3 Mar 2017 17:33:22 -0300 Received: from d24relay03.br.ibm.com (d24relay03.br.ibm.com [9.18.232.225]) by d24dlp01.br.ibm.com (Postfix) with ESMTP id 9578F3520070 for ; Fri, 3 Mar 2017 15:32:47 -0500 (EST) 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 v23KXLFi40698024 for ; Fri, 3 Mar 2017 17:33:21 -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 v23KXL0D004773 for ; Fri, 3 Mar 2017 17:33:21 -0300 Received: from jarvis.ibmmodules.com ([9.80.234.165]) by d24av01.br.ibm.com (8.14.4/8.14.4/NCO v10.0 AVin) with ESMTP id v23KXHgi004663 for ; Fri, 3 Mar 2017 17:33:20 -0300 X-Original-To: kimchi-devel@ovirt.org From: Ramon Medeiros To: Kimchi Devel Date: Fri, 3 Mar 2017 17:33:15 -0300 X-Mailer: git-send-email 2.9.3 In-Reply-To: <20170303203316.17978-1-ramonn@linux.vnet.ibm.com> References: <20170303203316.17978-1-ramonn@linux.vnet.ibm.com> X-TM-AS-MML: disable X-Content-Scanned: Fidelis XPS MAILER x-cbid: 17030320-0020-0000-0000-0000028E922D X-IBM-AV-DETECTION: SAVI=unused REMOTE=unused XFE=unused x-cbparentid: 17030320-0021-0000-0000-000030AA9B42 Message-Id: <20170303203316.17978-2-ramonn@linux.vnet.ibm.com> X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10432:, , definitions=2017-03-03_16:, , 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-1703030181 Subject: [Kimchi-devel] [PATCH] [Kimchi 1/2] 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 --- model/vmstorages.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/model/vmstorages.py b/model/vmstorages.py index 143225c..b123b50 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') =3D=3D 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 From nobody Sun Dec 22 06:14:07 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 1488573246594233.27705212009994; Fri, 3 Mar 2017 12:34:06 -0800 (PST) Received: from lists.phx.ovirt.org (localhost [127.0.0.1]) by lists.ovirt.org (Postfix) with ESMTP id 85130820582; Fri, 3 Mar 2017 20:34:05 +0000 (UTC) Received: from mx0a-001b2d01.pphosted.com (mx0a-001b2d01.pphosted.com [148.163.156.1]) by lists.ovirt.org (Postfix) with ESMTPS id A98A9820582 for ; Fri, 3 Mar 2017 20:33:27 +0000 (UTC) Received: from pps.filterd (m0098404.ppops.net [127.0.0.1]) by mx0a-001b2d01.pphosted.com (8.16.0.20/8.16.0.20) with SMTP id v23KP4cp142989 for ; Fri, 3 Mar 2017 15:33:27 -0500 Received: from e24smtp05.br.ibm.com (e24smtp05.br.ibm.com [32.104.18.26]) by mx0a-001b2d01.pphosted.com with ESMTP id 28ye6c3ax3-1 (version=TLSv1.2 cipher=AES256-SHA bits=256 verify=NOT) for ; Fri, 03 Mar 2017 15:33:26 -0500 Received: from localhost by e24smtp05.br.ibm.com with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted for from ; Fri, 3 Mar 2017 17:33:24 -0300 Received: from d24dlp02.br.ibm.com (9.18.248.206) by e24smtp05.br.ibm.com (10.172.0.141) with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted; Fri, 3 Mar 2017 17:33:23 -0300 Received: from d24relay03.br.ibm.com (d24relay03.br.ibm.com [9.18.232.225]) by d24dlp02.br.ibm.com (Postfix) with ESMTP id 3A7611DC006E for ; Fri, 3 Mar 2017 15:33:24 -0500 (EST) 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 v23KXMcT27983990 for ; Fri, 3 Mar 2017 17:33:22 -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 v23KXMCN004803 for ; Fri, 3 Mar 2017 17:33:22 -0300 Received: from jarvis.ibmmodules.com ([9.80.234.165]) by d24av01.br.ibm.com (8.14.4/8.14.4/NCO v10.0 AVin) with ESMTP id v23KXHgj004663 for ; Fri, 3 Mar 2017 17:33:21 -0300 X-Original-To: kimchi-devel@ovirt.org From: Ramon Medeiros To: Kimchi Devel Date: Fri, 3 Mar 2017 17:33:16 -0300 X-Mailer: git-send-email 2.9.3 In-Reply-To: <20170303203316.17978-1-ramonn@linux.vnet.ibm.com> References: <20170303203316.17978-1-ramonn@linux.vnet.ibm.com> X-TM-AS-MML: disable X-Content-Scanned: Fidelis XPS MAILER x-cbid: 17030320-0032-0000-0000-00000545534C X-IBM-AV-DETECTION: SAVI=unused REMOTE=unused XFE=unused x-cbparentid: 17030320-0033-0000-0000-000011C95A39 Message-Id: <20170303203316.17978-3-ramonn@linux.vnet.ibm.com> X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10432:, , definitions=2017-03-03_16:, , 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-1703030181 Subject: [Kimchi-devel] [PATCH] [Kimchi 2/2] Add tests for disk creation with specified bus driver 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" Signed-off-by: Ramon Medeiros --- tests/test_model.py | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/tests/test_model.py b/tests/test_model.py index e49e556..03101f6 100644 --- a/tests/test_model.py +++ b/tests/test_model.py @@ -808,6 +808,17 @@ class ModelTests(unittest.TestCase): self.assertRaises(InvalidParameter, inst.vmstorages_create, vm_name, cdrom_args) =20 + # try add disk with specified bus + disk_args =3D {"type": "disk", + "pool": pool, + "vol": vol, + "bus": "scsi"} + disk =3D inst.vmstorages_create(vm_name, disk_args) + disk_info =3D inst.vmstorage_lookup(vm_name, disk) + self.assertEquals("scsi", disk_info['bus']) + self.assertTrue(disk_info["dev"].startswith("sd")) + inst.vmstorage_delete(vm_name, disk) + # Cold plug and unplug a disk disk =3D _attach_disk() inst.vmstorage_delete(vm_name, disk) --=20 2.9.3 _______________________________________________ Kimchi-devel mailing list Kimchi-devel@ovirt.org http://lists.ovirt.org/mailman/listinfo/kimchi-devel