From 7af8f5ac5fc02abe79dec3cf3651b6f0a9deb78c Mon Sep 17 00:00:00 2001 From: Ed Leafe Date: Thu, 13 Jan 2011 10:51:31 -0600 Subject: Minor code cleanups --- nova/compute/manager.py | 2 +- nova/tests/test_xenapi.py | 4 ---- nova/virt/xenapi/vmops.py | 1 - 3 files changed, 1 insertion(+), 6 deletions(-) (limited to 'nova') diff --git a/nova/compute/manager.py b/nova/compute/manager.py index 267beca45..613ee45f6 100644 --- a/nova/compute/manager.py +++ b/nova/compute/manager.py @@ -125,7 +125,7 @@ class ComputeManager(manager.Manager): # FIXME(ja): include other fields from state? instance_ref = self.db.instance_get(context, instance_id) try: - info = self.driver.get_info(instance_ref) + info = self.driver.get_info(instance_ref['name']) state = info['state'] except exception.NotFound: state = power_state.NOSTATE diff --git a/nova/tests/test_xenapi.py b/nova/tests/test_xenapi.py index a03d616ad..93afe9ce1 100644 --- a/nova/tests/test_xenapi.py +++ b/nova/tests/test_xenapi.py @@ -265,10 +265,6 @@ class XenAPIVMTestCase(test.TestCase): return instance - - - - class XenAPIDiffieHellmanTestCase(test.TestCase): """ Unit tests for Diffie-Hellman code diff --git a/nova/virt/xenapi/vmops.py b/nova/virt/xenapi/vmops.py index 6c6d25709..6e359ef82 100644 --- a/nova/virt/xenapi/vmops.py +++ b/nova/virt/xenapi/vmops.py @@ -22,7 +22,6 @@ Management class for VM-related functions (spawn, reboot, etc). import json import M2Crypto import os -import random import subprocess import tempfile import uuid -- cgit