summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMark McLoughlin <markmc@redhat.com>2013-06-24 21:54:28 +0100
committerMark McLoughlin <markmc@redhat.com>2013-06-25 07:27:24 +0100
commit7ba5f4b2311ef303301684ca591728f0fc93ee8f (patch)
tree3a6fb6293429a5adad8e7af497fd4f971ea85a38
parent489e2b73f33d40ad34492fa7993f91bc52a8a66e (diff)
downloadoslo-7ba5f4b2311ef303301684ca591728f0fc93ee8f.tar.gz
oslo-7ba5f4b2311ef303301684ca591728f0fc93ee8f.tar.xz
oslo-7ba5f4b2311ef303301684ca591728f0fc93ee8f.zip
Don't use mixture of cfg.Opt() deprecated args
No need to make this any more ugly than it needs to be :) Change-Id: Ib7ef13bb5f04e1780565de805eb81413d7b21274
-rw-r--r--openstack/common/db/sqlalchemy/session.py46
1 files changed, 22 insertions, 24 deletions
diff --git a/openstack/common/db/sqlalchemy/session.py b/openstack/common/db/sqlalchemy/session.py
index 0951ee6..7400b17 100644
--- a/openstack/common/db/sqlalchemy/session.py
+++ b/openstack/common/db/sqlalchemy/session.py
@@ -260,8 +260,6 @@ from openstack.common.gettextutils import _
from openstack.common import log as logging
from openstack.common import timeutils
-DEFAULT = 'DEFAULT'
-
sqlite_db_opts = [
cfg.StrOpt('sqlite_db',
default='oslo.sqlite',
@@ -278,9 +276,9 @@ database_opts = [
'../', '$sqlite_db')),
help='The SQLAlchemy connection string used to connect to the '
'database',
- deprecated_name='sql_connection',
- deprecated_group=DEFAULT,
deprecated_opts=[cfg.DeprecatedOpt('sql_connection',
+ group='DEFAULT'),
+ cfg.DeprecatedOpt('sql_connection',
group='DATABASE')],
secret=True),
cfg.StrOpt('slave_connection',
@@ -290,64 +288,64 @@ database_opts = [
secret=True),
cfg.IntOpt('idle_timeout',
default=3600,
- deprecated_name='sql_idle_timeout',
- deprecated_group=DEFAULT,
deprecated_opts=[cfg.DeprecatedOpt('sql_idle_timeout',
+ group='DEFAULT'),
+ cfg.DeprecatedOpt('sql_idle_timeout',
group='DATABASE')],
help='timeout before idle sql connections are reaped'),
cfg.IntOpt('min_pool_size',
default=1,
- deprecated_name='sql_min_pool_size',
- deprecated_group=DEFAULT,
deprecated_opts=[cfg.DeprecatedOpt('sql_min_pool_size',
+ group='DEFAULT'),
+ cfg.DeprecatedOpt('sql_min_pool_size',
group='DATABASE')],
help='Minimum number of SQL connections to keep open in a '
'pool'),
cfg.IntOpt('max_pool_size',
default=None,
- deprecated_name='sql_max_pool_size',
- deprecated_group=DEFAULT,
deprecated_opts=[cfg.DeprecatedOpt('sql_max_pool_size',
+ group='DEFAULT'),
+ cfg.DeprecatedOpt('sql_max_pool_size',
group='DATABASE')],
help='Maximum number of SQL connections to keep open in a '
'pool'),
cfg.IntOpt('max_retries',
default=10,
- deprecated_name='sql_max_retries',
- deprecated_group=DEFAULT,
deprecated_opts=[cfg.DeprecatedOpt('sql_max_retries',
+ group='DEFAULT'),
+ cfg.DeprecatedOpt('sql_max_retries',
group='DATABASE')],
help='maximum db connection retries during startup. '
'(setting -1 implies an infinite retry count)'),
cfg.IntOpt('retry_interval',
default=10,
- deprecated_name='sql_retry_interval',
- deprecated_group=DEFAULT,
- deprecated_opts=[cfg.DeprecatedOpt('reconnect_interval',
+ deprecated_opts=[cfg.DeprecatedOpt('sql_retry_interval',
+ group='DEFAULT'),
+ cfg.DeprecatedOpt('reconnect_interval',
group='DATABASE')],
help='interval between retries of opening a sql connection'),
cfg.IntOpt('max_overflow',
default=None,
- deprecated_name='sql_max_overflow',
- deprecated_group=DEFAULT,
- deprecated_opts=[cfg.DeprecatedOpt('sqlalchemy_max_overflow',
+ deprecated_opts=[cfg.DeprecatedOpt('sql_max_overflow',
+ group='DEFAULT'),
+ cfg.DeprecatedOpt('sqlalchemy_max_overflow',
group='DATABASE')],
help='If set, use this value for max_overflow with sqlalchemy'),
cfg.IntOpt('connection_debug',
default=0,
- deprecated_name='sql_connection_debug',
- deprecated_group=DEFAULT,
+ deprecated_opts=[cfg.DeprecatedOpt('sql_connection_debug',
+ group='DEFAULT')],
help='Verbosity of SQL debugging information. 0=None, '
'100=Everything'),
cfg.BoolOpt('connection_trace',
default=False,
- deprecated_name='sql_connection_trace',
- deprecated_group=DEFAULT,
+ deprecated_opts=[cfg.DeprecatedOpt('sql_connection_trace',
+ group='DEFAULT')],
help='Add python stack traces to SQL as comment strings'),
cfg.IntOpt('pool_timeout',
default=None,
- deprecated_name='sqlalchemy_pool_timeout',
- deprecated_group='DATABASE',
+ deprecated_opts=[cfg.DeprecatedOpt('sqlalchemy_pool_timeout',
+ group='DATABASE')],
help='If set, use this value for pool_timeout with sqlalchemy'),
]