Now swift config is not passed if Swift disable
Change-Id: I17339c7339a9d6f786ba8c803f2778d8d666ed61
(cherry picked from commit 6904a54ff7
)
This commit is contained in:
parent
c3c45f9acb
commit
03f18e82e8
|
@ -46,7 +46,6 @@ ENV_CONFS = {
|
|||
}
|
||||
}
|
||||
|
||||
|
||||
ENABLE_SWIFT = p.Config('Enable Swift', 'general', 'cluster',
|
||||
config_type="bool", priority=1,
|
||||
default_value=True, is_optional=True)
|
||||
|
@ -149,11 +148,14 @@ def generate_xml_configs(configs, storage_path, nn_hostname, jt_hostname=None):
|
|||
cfg[key] = value
|
||||
|
||||
# applying swift configs if user enabled it
|
||||
swift_xml_confs = [{}]
|
||||
swift_xml_confs = []
|
||||
#TODO(aignatov): should be changed. General configs not only Swift
|
||||
if not ('general' in configs and
|
||||
ENABLE_SWIFT.name in configs['general'] and
|
||||
configs['general'][ENABLE_SWIFT.name] == 'false'):
|
||||
swift_in_config = False
|
||||
if ('general' in configs and
|
||||
ENABLE_SWIFT.name in configs['general']):
|
||||
swift_in_config = True
|
||||
if ((swift_in_config and configs['general'][ENABLE_SWIFT.name]) or
|
||||
(not swift_in_config and ENABLE_SWIFT.default_value)):
|
||||
swift_xml_confs = swift.get_swift_configs()
|
||||
cfg.update(extract_name_values(swift_xml_confs))
|
||||
LOG.info("Swift integration is enabled")
|
||||
|
|
Loading…
Reference in New Issue