Remove usage of enforce_type

The usage of `enforce_type` from oslo.config will be removed in the
4.0 release of oslo.config. The default behavior has been
incorporated into set_override/set_default as of:

  Ifa552de0a994e40388cbc9f7dbaa55700ca276b0

We no longer need to specify `enforce_type=True` and we should
remove it since it will be removed from oslo.config.

This commit also fixes violations with enforce_type=True.

Change-Id: I8222e84583aaa4de4c7c36ec8cec5e35c2e7e253
Related-Bug: 1517839
This commit is contained in:
Lance Bragstad 2017-04-10 17:04:13 +00:00 committed by ChangBo Guo(gcb)
parent f77d330978
commit 716c70c315
3 changed files with 3 additions and 4 deletions

View File

@ -266,8 +266,7 @@ class DomainConfigs(dict):
for group in specific_config:
for option in specific_config[group]:
domain_config['cfg'].set_override(
option, specific_config[group][option],
group, enforce_type=True)
option, specific_config[group][option], group)
domain_config['cfg_overrides'] = specific_config
domain_config['driver'] = self._load_driver(domain_config)

View File

@ -143,7 +143,7 @@ class TestDatabaseDomainConfigs(unit.TestCase):
# Override two config options for our domain
conf = {'ldap': {'url': uuid.uuid4().hex,
'suffix': uuid.uuid4().hex,
'use_tls': 'True'},
'use_tls': True},
'identity': {
'driver': 'ldap'}}
self.domain_config_api.create_config(domain['id'], conf)

View File

@ -2608,7 +2608,7 @@ class MultiLDAPandSQLIdentityDomainConfigsInSQL(MultiLDAPandSQLIdentity):
'password': 'password',
'suffix': 'cn=example,cn=com'},
'identity': {'driver': 'ldap',
'list_limit': '101'}
'list_limit': 101}
}
domain2_config = {
'ldap': {'url': 'fake://memory',