Added support for deprecated config parameters
This commit is contained in:
parent
658a6175e8
commit
841264e185
@ -197,6 +197,8 @@ class OpenstackComponent(Service):
|
|||||||
|
|
||||||
# if value == parameter_schema.default:
|
# if value == parameter_schema.default:
|
||||||
# report_issue(MarkedIssue(Issue.INFO, 'Explicit value equals default: section "%s" parameter "%s"' % (section_name, parameter.name.text), parameter.start_mark))
|
# report_issue(MarkedIssue(Issue.INFO, 'Explicit value equals default: section "%s" parameter "%s"' % (section_name, parameter.name.text), parameter.start_mark))
|
||||||
|
if parameter_schema.deprecation_message:
|
||||||
|
report_issue(MarkedIssue(Issue.WARNING, 'Deprecated parameter: section "%s" name "%s". %s' % (section_name, parameter.name.text, parameter_schema.deprecation_message), parameter.start_mark))
|
||||||
else:
|
else:
|
||||||
_config.set(section_name, parameter.name.text, parameter.value.text)
|
_config.set(section_name, parameter.name.text, parameter.value.text)
|
||||||
|
|
||||||
|
@ -145,13 +145,14 @@ class ConfigSchema:
|
|||||||
return '<ConfigSchema name=%s version=%s format=%s parameters=%s>' % (self.name, self.version, self.format, self.parameters)
|
return '<ConfigSchema name=%s version=%s format=%s parameters=%s>' % (self.name, self.version, self.format, self.parameters)
|
||||||
|
|
||||||
class ConfigParameterSchema:
|
class ConfigParameterSchema:
|
||||||
def __init__(self, name, type, section=None, description=None, default=None, required=False):
|
def __init__(self, name, type, section=None, description=None, default=None, required=False, deprecation_message=None):
|
||||||
self.section = section
|
self.section = section
|
||||||
self.name = name
|
self.name = name
|
||||||
self.type = type
|
self.type = type
|
||||||
self.description = description
|
self.description = description
|
||||||
self.default = default
|
self.default = default
|
||||||
self.required = required
|
self.required = required
|
||||||
|
self.deprecation_message = deprecation_message
|
||||||
|
|
||||||
def __repr__(self):
|
def __repr__(self):
|
||||||
return '<ConfigParameterSchema %s>' % ' '.join(['%s=%s' % (attr, getattr(self, attr)) for attr in ['section', 'name', 'type', 'description', 'default', 'required']])
|
return '<ConfigParameterSchema %s>' % ' '.join(['%s=%s' % (attr, getattr(self, attr)) for attr in ['section', 'name', 'type', 'description', 'default', 'required']])
|
||||||
|
@ -250,6 +250,8 @@ cinder.param('use_tpool', type='boolean', default='false', description="Enable t
|
|||||||
|
|
||||||
cinder.param('connection', type='string', default='sqlite:////cinder/openstack/common/db/$sqlite_db', description="The SQLAlchemy connection string used to connect to the database")
|
cinder.param('connection', type='string', default='sqlite:////cinder/openstack/common/db/$sqlite_db', description="The SQLAlchemy connection string used to connect to the database")
|
||||||
|
|
||||||
|
cinder.param('sql_connection', type='string', default='sqlite:////nova/openstack/common/db/$sqlite_db', description="The SQLAlchemy connection string used to connect to the database", deprecation_message='Deprecated in favor of "[DEFAULT]connection" parameter')
|
||||||
|
|
||||||
cinder.param('idle_timeout', type='integer', default='3600', description="timeout before idle sql connections are reaped")
|
cinder.param('idle_timeout', type='integer', default='3600', description="timeout before idle sql connections are reaped")
|
||||||
|
|
||||||
cinder.param('min_pool_size', type='integer', default='1', description="Minimum number of SQL connections to keep open in a pool")
|
cinder.param('min_pool_size', type='integer', default='1', description="Minimum number of SQL connections to keep open in a pool")
|
||||||
|
@ -1038,6 +1038,8 @@ nova.param('cinder_api_insecure', type='boolean', default=False, description="Al
|
|||||||
|
|
||||||
nova.param('cinder_cross_az_attach', type='boolean', default=True, description="Allow attach between instance and volume in different availability zones.")
|
nova.param('cinder_cross_az_attach', type='boolean', default=True, description="Allow attach between instance and volume in different availability zones.")
|
||||||
|
|
||||||
|
nova.param('sql_connection', type='string', default='sqlite:////nova/openstack/common/db/$sqlite_db', description="The SQLAlchemy connection string used to connect to the database", deprecation_message='Deprecated in favor of "[database]connection" parameter')
|
||||||
|
|
||||||
nova.section('hyperv')
|
nova.section('hyperv')
|
||||||
|
|
||||||
nova.param('instances_path_share', type='string', default='', description="The name of a Windows share name mapped to the 'instances_path' dir and used by the resize feature to copy files to the target host. If left blank, an administrative share will be used, looking for the same 'instances_path' used locally")
|
nova.param('instances_path_share', type='string', default='', description="The name of a Windows share name mapped to the 'instances_path' dir and used by the resize feature to copy files to the target host. If left blank, an administrative share will be used, looking for the same 'instances_path' used locally")
|
||||||
|
Loading…
x
Reference in New Issue
Block a user