Broke parts of compute manager out into compute.api to separate what gets run on the API side vs the worker side.

This commit is contained in:
Eric Day
2010-12-01 09:24:39 -08:00
parent 5ab117827a
commit 744adf1eb2
2 changed files with 8 additions and 10 deletions

View File

@@ -53,23 +53,19 @@ This module provides Manager, a base class for managers.
from nova import utils
from nova import flags
from nova.db import base
from twisted.internet import defer
FLAGS = flags.FLAGS
flags.DEFINE_string('db_driver', 'nova.db.api',
'driver to use for volume creation')
class Manager(object):
"""DB driver is injected in the init method"""
class Manager(base.Base):
def __init__(self, host=None, db_driver=None):
if not host:
host = FLAGS.host
self.host = host
if not db_driver:
db_driver = FLAGS.db_driver
self.db = utils.import_object(db_driver) # pylint: disable-msg=C0103
super(Manager, self).__init__(db_driver)
@defer.inlineCallbacks
def periodic_tasks(self, context=None):