Minor code cleanups
This commit is contained in:
@@ -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
|
||||
|
||||
@@ -265,10 +265,6 @@ class XenAPIVMTestCase(test.TestCase):
|
||||
return instance
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
class XenAPIDiffieHellmanTestCase(test.TestCase):
|
||||
"""
|
||||
Unit tests for Diffie-Hellman code
|
||||
|
||||
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user