~rlane/nova/lp773690

« back to all changes in this revision

Viewing changes to nova/db/base.py

  • Committer: rlane at wikimedia
  • Date: 2011-04-29 22:30:40 UTC
  • mfrom: (382.1.655 nova)
  • Revision ID: rlane@wikimedia.org-20110429223040-i0x3ds9eqwrabyru
MergeĀ fromĀ trunk

Show diffs side-by-side

added added

removed removed

Lines of Context:
16
16
#    License for the specific language governing permissions and limitations
17
17
#    under the License.
18
18
 
19
 
"""
20
 
Base class for classes that need modular database access.
21
 
"""
 
19
"""Base class for classes that need modular database access."""
22
20
 
23
21
from nova import utils
24
22
from nova import flags
25
23
 
 
24
 
26
25
FLAGS = flags.FLAGS
27
26
flags.DEFINE_string('db_driver', 'nova.db.api',
28
27
                    'driver to use for database access')
29
28
 
30
29
 
31
30
class Base(object):
32
 
    """DB driver is injected in the init method"""
 
31
    """DB driver is injected in the init method."""
 
32
 
33
33
    def __init__(self, db_driver=None):
34
34
        if not db_driver:
35
35
            db_driver = FLAGS.db_driver