Introduce VirtAPI to nova/virt

This patch introduces a VirtAPI class which will house
callbacks provided by the manager to the virt drivers, allowing
things such as direct database accesses to be pulled out of
the virt drivers and delegated to another service.

As a first step, this introduces an instance_update() method
and makes all the virt drivers use it instead of direct calls
to db.instance_update.*().

Change-Id: I2e40831f5cfb20a03b304097d84d592aab035ef1
This commit is contained in:
Dan Smith
2012-10-31 11:51:05 -07:00
parent ac00b064a1
commit ecb65a38b1
7 changed files with 134 additions and 139 deletions

View File

@@ -50,7 +50,7 @@ class VMWareAPIVMTestCase(test.TestCase):
vmwareapi_fake.reset()
db_fakes.stub_out_db_instance_api(self.stubs)
stubs.set_stubs(self.stubs)
self.conn = driver.VMWareESXDriver(False)
self.conn = driver.VMWareESXDriver(None, False)
# NOTE(vish): none of the network plugging code is actually
# being tested
self.network_info = [({'bridge': 'fa0',