summaryrefslogtreecommitdiff
path: root/nova/tests/functional/libvirt/test_power_manage.py
diff options
context:
space:
mode:
authorSylvain Bauza <sbauza@redhat.com>2023-02-20 22:13:03 +0100
committerSylvain Bauza <sbauza@redhat.com>2023-02-23 12:04:17 +0100
commit37fa501cacdf4807582b677c92bd61013d477e2a (patch)
tree5e59b1b437e134f05fa5112964b8f99b3661942f /nova/tests/functional/libvirt/test_power_manage.py
parent00299dcaad9a42c7f81be62a3966c59b299dff1d (diff)
downloadnova-37fa501cacdf4807582b677c92bd61013d477e2a.tar.gz
fup for power management series
Emptying the cpu init file and directly calling the submodule API. Relates to blueprint libvirt-cpu-state-mgmt Change-Id: I1299ca4b49743f58bec6f541785dd9fbee0ae9e2
Diffstat (limited to 'nova/tests/functional/libvirt/test_power_manage.py')
-rw-r--r--nova/tests/functional/libvirt/test_power_manage.py6
1 files changed, 3 insertions, 3 deletions
diff --git a/nova/tests/functional/libvirt/test_power_manage.py b/nova/tests/functional/libvirt/test_power_manage.py
index fb1ac7d0cd..9f80446bd6 100644
--- a/nova/tests/functional/libvirt/test_power_manage.py
+++ b/nova/tests/functional/libvirt/test_power_manage.py
@@ -21,7 +21,7 @@ from nova.tests import fixtures as nova_fixtures
from nova.tests.fixtures import libvirt as fakelibvirt
from nova.tests.functional.libvirt import base
from nova.virt import hardware
-from nova.virt.libvirt import cpu
+from nova.virt.libvirt.cpu import api as cpu_api
class PowerManagementTestsBase(base.ServersTestBase):
@@ -73,7 +73,7 @@ class PowerManagementTestsBase(base.ServersTestBase):
def _assert_cpu_set_state(self, cpu_set, expected='online'):
for i in cpu_set:
- core = cpu.Core(i)
+ core = cpu_api.Core(i)
if expected == 'online':
self.assertTrue(core.online, f'{i} is not online')
elif expected == 'offline':
@@ -212,7 +212,7 @@ class PowerManagementTestsGovernor(PowerManagementTestsBase):
def test_changing_strategy_fails(self):
# Arbitratly set a core governor strategy to be performance
- cpu.Core(1).set_high_governor()
+ cpu_api.Core(1).set_high_governor()
# and then forget about it while changing the strategy.
self.flags(cpu_power_management_strategy='cpu_state', group='libvirt')
# This time, this wouldn't be acceptable as some core would have a