Determine flavor type from the public nova API.
Fixes bug 1078298 Previously the flavor name used in the flavor-specific instance meter was available from the nova DB instance representation. Now that we retrieve the on-host instances from the public nova API as opposed to the DB, we need to retrieve and cache the flavor name separately. Change-Id: Ifd15eedd34e4128d5f9bdaa9318049e973dac9ed
This commit is contained in:
@@ -59,8 +59,7 @@ class TestLibvirtBase(test_base.TestCase):
|
||||
setattr(self.instance, 'OS-EXT-SRV-ATTR:instance_name',
|
||||
self.instance.name)
|
||||
self.instance.id = 1
|
||||
self.instance.instance_type = mock.MagicMock()
|
||||
self.instance.instance_type.name = 'm1.small'
|
||||
self.instance.flavor = {'name': 'm1.small', 'id': 2}
|
||||
flags.FLAGS.compute_driver = 'libvirt.LibvirtDriver'
|
||||
flags.FLAGS.connection_type = 'libvirt'
|
||||
|
||||
|
||||
Reference in New Issue
Block a user