summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorzhangyangyang <zhangyangyang@unionpay.com>2017-09-03 21:29:57 +0800
committerzhangyangyang <zhangyangyang@unionpay.com>2017-09-05 23:52:13 +0800
commit528abcb545b64daa37dda2919d2e4b6e53711370 (patch)
treef18364bc289b4835fe5e9d3dab09a737f1805d74
parent69910499a7056c131913f591e54c5628efd17879 (diff)
downloadoslo-db-528abcb545b64daa37dda2919d2e4b6e53711370.tar.gz
Remove provisioned_engine in class BackendImpl
This method is useless in class BackendImpl. So it is deprecated for removal. Change-Id: I3c73acc6b02da731a73880146661b63e75657982 Closes-Bug:#1714778
-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/"