summaryrefslogtreecommitdiffstats
path: root/nova/tests/conductor
diff options
context:
space:
mode:
authorNikola Dipanov <ndipanov@redhat.com>2013-05-15 15:47:31 +0200
committerChris Behrens <cbehrens@codestud.com>2013-06-10 23:10:37 +0000
commit0d5fb06b39e8244429be72f05e2066d24572dc2e (patch)
tree0a0045f201203af848e9261fc345c5a133f37dbd /nova/tests/conductor
parentf85e4ec079283f4217415b4fd6a37ced189bc49a (diff)
downloadnova-0d5fb06b39e8244429be72f05e2066d24572dc2e.tar.gz
nova-0d5fb06b39e8244429be72f05e2066d24572dc2e.tar.xz
nova-0d5fb06b39e8244429be72f05e2066d24572dc2e.zip
DB migration to the new BDM data format
This patch migrates the DB to the new data format. In addition it also utilizes routines introduced in the change I9370333059b8c9aaf92010470b8475a913d329b2 in a way that will allow us to transition into using the new data in Nova logic one step at a time. This is accomplished in a following manner in the DB/conductor layer, which is supposed to allow for subsequent changes to be as granular as possible: * Read operations - data is always read as is found in the DB - meaning in the new format, and transformed after every call. This will allow us to make granular changes in the API/Compute layers. * Data is converted inside the DB methods that do writes, and an additional 'legacy' flag is added (set to True by default). It is up to the calling method to make sure it supplies the DB layer with the format it is intending to write, to avoid guessing. An exception to the above is when using conductor due to rpcapi versioning, so this patch adds a 'legacy' flag to the block_device_mapping_get_all_by_instance conductor method and bumps the version of the API. This patch also fixes some of the block device fixtures in tests, when it was required to be aware of the new data structure (mostly when mocking DB methods that return the new data format). This patch is not supposed to provide any new functionality to Nova. blueprint: improve-block-device-handling Change-Id: If30afdb59d4c4268b97d3d10270df2cc729a0c4c
Diffstat (limited to 'nova/tests/conductor')
-rw-r--r--nova/tests/conductor/test_conductor.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/nova/tests/conductor/test_conductor.py b/nova/tests/conductor/test_conductor.py
index 8b397db02..e5abd1182 100644
--- a/nova/tests/conductor/test_conductor.py
+++ b/nova/tests/conductor/test_conductor.py
@@ -321,7 +321,7 @@ class _BaseTestCase(object):
self.context, fake_inst['uuid']).AndReturn('fake-result')
self.mox.ReplayAll()
result = self.conductor.block_device_mapping_get_all_by_instance(
- self.context, fake_inst)
+ self.context, fake_inst, legacy=False)
self.assertEqual(result, 'fake-result')
def test_instance_get_active_by_window_joined(self):