Replace config options under DEFAULT section
This patch replace 2 config options: enabled_artifact_types and custom_artifact_types_modules from [glare] section to [DEFAULT]. Change-Id: I64bcf8d1ec42f04fb9434f85dd7a8dc07d68aff5
This commit is contained in:
parent
6fa4b80ca0
commit
12ab1635cd
|
@ -44,7 +44,7 @@ registry_options = [
|
|||
"will be uploaded by Glare dynamically during service "
|
||||
"startup."))
|
||||
]
|
||||
CONF.register_opts(registry_options, group='glare')
|
||||
CONF.register_opts(registry_options)
|
||||
|
||||
|
||||
def import_submodules(module):
|
||||
|
@ -98,12 +98,12 @@ class ArtifactRegistry(vo_base.VersionedObjectRegistry):
|
|||
# to specify custom logic inside
|
||||
modules = (import_submodules('glare.objects') +
|
||||
import_modules_list(
|
||||
CONF.glare.custom_artifact_types_modules))
|
||||
CONF.custom_artifact_types_modules))
|
||||
# get all versioned object classes in module
|
||||
supported_types = []
|
||||
for module in modules:
|
||||
supported_types.extend(get_subclasses(module, base.BaseArtifact))
|
||||
for type_name in set(CONF.glare.enabled_artifact_types + ['all']):
|
||||
for type_name in set(CONF.enabled_artifact_types + ['all']):
|
||||
for af_type in supported_types:
|
||||
if type_name == af_type.get_type_name():
|
||||
cls._validate_artifact_type(af_type)
|
||||
|
|
|
@ -301,6 +301,8 @@ log_file = %(log_file)s
|
|||
delayed_delete = %(delayed_delete)s
|
||||
workers = %(workers)s
|
||||
lock_path = %(lock_path)s
|
||||
enabled_artifact_types = %(enabled_artifact_types)s
|
||||
custom_artifact_types_modules = %(custom_artifact_types_modules)s
|
||||
[oslo_policy]
|
||||
policy_file = %(policy_file)s
|
||||
policy_default_rule = %(policy_default_rule)s
|
||||
|
@ -309,9 +311,6 @@ flavor = %(deployment_flavor)s
|
|||
[glance_store]
|
||||
filesystem_store_datadir=%(blob_dir)s
|
||||
default_store = %(default_store)s
|
||||
[glare]
|
||||
enabled_artifact_types = %(enabled_artifact_types)s
|
||||
custom_artifact_types_modules = %(custom_artifact_types_modules)s
|
||||
[database]
|
||||
connection = %(sql_connection)s
|
||||
"""
|
||||
|
|
Loading…
Reference in New Issue