From mboxrd@z Thu Jan 1 00:00:00 1970 From: Michael Goldish Subject: [KVM-AUTOTEST PATCH 2/7] KVM test: VM.get_address(): fix handling of multiple NICs Date: Sun, 24 Oct 2010 13:01:05 +0200 Message-ID: <1287918070-4579-2-git-send-email-mgoldish@redhat.com> References: <1287918070-4579-1-git-send-email-mgoldish@redhat.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: autotest@test.kernel.org, kvm@vger.kernel.org Return-path: In-Reply-To: <1287918070-4579-1-git-send-email-mgoldish@redhat.com> List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: autotest-bounces@test.kernel.org Errors-To: autotest-bounces@test.kernel.org List-Id: kvm.vger.kernel.org Use VM.get_mac_address() instead of kvm_utils.get_mac_ip_pair_from_dict(). Signed-off-by: Michael Goldish --- client/tests/kvm/kvm_vm.py | 6 +----- 1 files changed, 1 insertions(+), 5 deletions(-) diff --git a/client/tests/kvm/kvm_vm.py b/client/tests/kvm/kvm_vm.py index 51e7cfa..f3e803b 100755 --- a/client/tests/kvm/kvm_vm.py +++ b/client/tests/kvm/kvm_vm.py @@ -930,11 +930,7 @@ class VM: "%s" % mac) return None # Make sure the IP address is assigned to this guest - nic_dicts = [kvm_utils.get_sub_dict(self.params, nic) - for nic in nics] - macs = [kvm_utils.get_mac_ip_pair_from_dict(dict)[0] - for dict in nic_dicts] - macs.append(mac) + macs = [self.get_mac_address(i) for i in range(len(nics))] if not kvm_utils.verify_ip_address_ownership(ip, macs): logging.debug("Could not verify MAC-IP address mapping: " "%s ---> %s" % (mac, ip)) -- 1.5.5.6