Check compute driver using new flag
nova.common.deprecated: WARNING: Deprecated Config: Specifying virt driver via connection_type is deprecated. Use compute_driver=classname instead. Change-Id: I9c4e8e6abbf49f7b351b0f501f3e7aafa8d98896 Signed-off-by: Julien Danjou <julien@danjou.info>
This commit is contained in:
parent
8aaa93484b
commit
5affdd159a
@ -71,7 +71,7 @@ class DiskIOPollster(plugin.PollsterBase):
|
||||
])
|
||||
|
||||
def get_counters(self, manager, context):
|
||||
if FLAGS.connection_type == 'libvirt':
|
||||
if FLAGS.compute_driver == 'libvirt.LibvirtDriver':
|
||||
conn = nova.virt.connection.get_connection(read_only=True)
|
||||
for instance in manager.db.instance_get_all_by_host(context,
|
||||
manager.host):
|
||||
|
@ -49,7 +49,7 @@ class TestDiskIOPollster(test.TestCase):
|
||||
|
||||
@test.skip_if(libvirt_missing, 'Test requires libvirt')
|
||||
def test_fetch_diskio_with_libvirt_non_existent_instance(self):
|
||||
flags.FLAGS.connection_type = 'libvirt'
|
||||
flags.FLAGS.compute_driver = 'libvirt.LibvirtDriver'
|
||||
|
||||
instance = db.instance_create(self.context, {})
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user