Switch from FLAGS to CONF in tests
Use the global CONF variable instead of FLAGS. This is purely a cleanup since FLAGS is already just another reference to CONF. We leave the nova.flags imports until a later cleanup commit since removing them may cause unpredictable problems due to config options not being registered. Change-Id: Ic0168188dfe214fc81af04c8a9644d2d9f31600d
This commit is contained in:
@@ -25,6 +25,7 @@ import sys
|
||||
import uuid
|
||||
|
||||
from nova.compute import power_state
|
||||
from nova import config
|
||||
from nova import context
|
||||
from nova import db
|
||||
from nova import flags
|
||||
@@ -40,6 +41,8 @@ from nova.virt.hyperv import driver as driver_hyperv
|
||||
from nova.virt.hyperv import vmutils
|
||||
from nova.virt import images
|
||||
|
||||
CONF = config.CONF
|
||||
|
||||
|
||||
class HyperVAPITestCase(basetestcase.BaseTestCase):
|
||||
"""Unit tests for Hyper-V driver calls."""
|
||||
@@ -148,7 +151,7 @@ class HyperVAPITestCase(basetestcase.BaseTestCase):
|
||||
|
||||
self._hypervutils.logout_iscsi_volume_sessions(self._volume_id)
|
||||
|
||||
shutil.rmtree(flags.FLAGS.instances_path, True)
|
||||
shutil.rmtree(CONF.instances_path, True)
|
||||
|
||||
fake_image.FakeImageService_reset()
|
||||
finally:
|
||||
|
||||
Reference in New Issue
Block a user