summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--nova/tests/test_hypervapi.py2
-rw-r--r--nova/virt/hyperv/vmops.py4
2 files changed, 3 insertions, 3 deletions
diff --git a/nova/tests/test_hypervapi.py b/nova/tests/test_hypervapi.py
index 1c49fe2f5..36f153531 100644
--- a/nova/tests/test_hypervapi.py
+++ b/nova/tests/test_hypervapi.py
@@ -188,7 +188,7 @@ class HyperVAPITestCase(basetestcase.BaseTestCase):
self._spawn_instance(True)
info = self._conn.get_info(self._instance_data)
- self.assertEquals(info["state"], str(power_state.RUNNING))
+ self.assertEquals(info["state"], power_state.RUNNING)
def test_spawn_cow_image(self):
self._test_spawn_instance(True)
diff --git a/nova/virt/hyperv/vmops.py b/nova/virt/hyperv/vmops.py
index e4704798b..480eb394f 100644
--- a/nova/virt/hyperv/vmops.py
+++ b/nova/virt/hyperv/vmops.py
@@ -102,12 +102,12 @@ class VMOps(baseops.BaseOps):
info = summary_info[0]
LOG.debug(_("hyperv vm state: %s"), info.EnabledState)
- state = str(constants.HYPERV_POWER_STATE[info.EnabledState])
+ state = constants.HYPERV_POWER_STATE[info.EnabledState]
memusage = str(info.MemoryUsage)
numprocs = str(info.NumberOfProcessors)
uptime = str(info.UpTime)
- LOG.debug(_("Got Info for vm %(instance_name)s: state=%(state)s,"
+ LOG.debug(_("Got Info for vm %(instance_name)s: state=%(state)d,"
" mem=%(memusage)s, num_cpu=%(numprocs)s,"
" uptime=%(uptime)s"), locals())