From patchwork Tue Jan 19 07:58:23 2010 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Yolkfull Chow X-Patchwork-Id: 73820 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by demeter.kernel.org (8.14.3/8.14.2) with ESMTP id o0J7wdE1004086 for ; Tue, 19 Jan 2010 07:58:40 GMT Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753352Ab0ASH60 (ORCPT ); Tue, 19 Jan 2010 02:58:26 -0500 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S1752100Ab0ASH6V (ORCPT ); Tue, 19 Jan 2010 02:58:21 -0500 Received: from mx1.redhat.com ([209.132.183.28]:34602 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752332Ab0ASH6T (ORCPT ); Tue, 19 Jan 2010 02:58:19 -0500 Received: from int-mx03.intmail.prod.int.phx2.redhat.com (int-mx03.intmail.prod.int.phx2.redhat.com [10.5.11.16]) by mx1.redhat.com (8.13.8/8.13.8) with ESMTP id o0J7wIiw003294 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK); Tue, 19 Jan 2010 02:58:18 -0500 Received: from localhost.localdomain ([10.66.91.168]) by int-mx03.intmail.prod.int.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id o0J7wFLF009515; Tue, 19 Jan 2010 02:58:16 -0500 From: Yolkfull Chow To: autotest@test.kernel.org Cc: kvm@vger.kernel.org, Yolkfull Chow Subject: [Autotest PATCH] KVM-test: Fix a bug that pci_assignable type name mismatch Date: Tue, 19 Jan 2010 15:58:23 +0800 Message-Id: <1263887903-30896-1-git-send-email-yzhou@redhat.com> X-Scanned-By: MIMEDefang 2.67 on 10.5.11.16 Sender: kvm-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: kvm@vger.kernel.org diff --git a/client/tests/kvm/kvm_utils.py b/client/tests/kvm/kvm_utils.py index 83aff66..df26a77 100644 --- a/client/tests/kvm/kvm_utils.py +++ b/client/tests/kvm/kvm_utils.py @@ -971,12 +971,12 @@ class PciAssignable(object): Request PCI assignable devices on host. It will check whether to request PF (physical Functions) or VF (Virtual Functions). """ - def __init__(self, type="nic_vf", driver=None, driver_option=None, + def __init__(self, type="vf", driver=None, driver_option=None, names=None, devices_requested=None): """ Initialize parameter 'type' which could be: - nic_vf: Virtual Functions - nic_pf: Physical Function (actual hardware) + vf: Virtual Functions + pf: Physical Function (actual hardware) mixed: Both includes VFs and PFs If pass through Physical NIC cards, we need to specify which devices @@ -1087,9 +1087,9 @@ class PciAssignable(object): @param count: count number of PCI devices needed for pass through @return: a list of all devices' PCI IDs """ - if self.type == "nic_vf": + if self.type == "vf": vf_ids = self.get_vf_devs() - elif self.type == "nic_pf": + elif self.type == "pf": vf_ids = self.get_pf_devs() elif self.type == "mixed": vf_ids = self.get_vf_devs()