summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJenkins <jenkins@review.openstack.org>2017-10-09 13:39:30 +0000
committerGerrit Code Review <review@openstack.org>2017-10-09 13:39:30 +0000
commite2fa4c2246b0716c822d767aaf773767b6d6e04a (patch)
tree855b0d0dd0415a69ee0b3e57d1e79de495038c24
parent34c4b679fdc3e039d7f5d528ce360272af201164 (diff)
parent528abcb545b64daa37dda2919d2e4b6e53711370 (diff)
downloadoslo-db-e2fa4c2246b0716c822d767aaf773767b6d6e04a.tar.gz
Merge "Remove provisioned_engine in class BackendImpl"
-rw-r--r--oslo_db/sqlalchemy/provision.py31
1 files changed, 0 insertions, 31 deletions
diff --git a/oslo_db/sqlalchemy/provision.py b/oslo_db/sqlalchemy/provision.py
index 7aa1fd3..fb1e191 100644
--- a/oslo_db/sqlalchemy/provision.py
+++ b/oslo_db/sqlalchemy/provision.py
@@ -17,7 +17,6 @@
"""Provision test environment for specific DB backends"""
import abc
-import debtcollector
import logging
import os
import random
@@ -33,7 +32,6 @@ import testresources
from oslo_db import exception
from oslo_db.sqlalchemy import enginefacade
-from oslo_db.sqlalchemy import session
from oslo_db.sqlalchemy import utils
LOG = logging.getLogger(__name__)
@@ -503,39 +501,10 @@ class BackendImpl(object):
url.database = ident
return url
- @debtcollector.removals.remove()
- def provisioned_engine(self, base_url, ident):
- """Return a provisioned engine.
-
- Given the URL of a particular database backend and the string
- name of a particular 'database' within that backend, return
- an Engine instance whose connections will refer directly to the
- named database.
-
- For hostname-based URLs, this typically involves switching just the
- 'database' portion of the URL with the given name and creating
- an engine.
-
- For URLs that instead deal with DSNs, the rules may be more custom;
- for example, the engine may need to connect to the root URL and
- then emit a command to switch to the named database.
-
- """
- url = self.provisioned_database_url(base_url, ident)
-
- return session.create_engine(
- url,
- logging_name="%s@%s" % (self.drivername, ident),
- **self.default_engine_kwargs
- )
-
@BackendImpl.impl.dispatch_for("mysql")
class MySQLBackendImpl(BackendImpl):
- # only used for deprecated provisioned_engine() function.
- default_engine_kwargs = {'mysql_sql_mode': 'TRADITIONAL'}
-
def create_opportunistic_driver_url(self):
return "mysql+pymysql://openstack_citest:openstack_citest@localhost/"