Add new toggle to disable Swift
We're working on an effort to remove Swift on the Undercloud. This patch will help us to easily control if whether or not we want Swift deployed on the Undercloud. Change-Id: Ia58efb14803d54ca297218a58208c39c31641403
This commit is contained in:
parent
ef397d894f
commit
a139d43625
@ -52,9 +52,9 @@ class StandaloneConfig(BaseConfig):
|
||||
|
||||
def get_enable_service_opts(self, cinder=False, ironic=False,
|
||||
ironic_inspector=False, mistral=False,
|
||||
nova=False, novajoin=False, tempest=False,
|
||||
telemetry=False, validations=False,
|
||||
zaqar=False):
|
||||
nova=False, novajoin=False, swift=False,
|
||||
tempest=False, telemetry=False,
|
||||
validations=False, zaqar=False):
|
||||
_opts = [
|
||||
# service enablement
|
||||
cfg.BoolOpt('enable_cinder',
|
||||
@ -81,6 +81,11 @@ class StandaloneConfig(BaseConfig):
|
||||
help=_('Whether to install novajoin metadata service '
|
||||
'in the Undercloud.')
|
||||
),
|
||||
cfg.BoolOpt('enable_swift',
|
||||
default=swift,
|
||||
help=_('Whether to install Swift services in the '
|
||||
'Undercloud.')
|
||||
),
|
||||
cfg.BoolOpt('enable_tempest',
|
||||
default=tempest,
|
||||
help=_('Whether to install Tempest in the Undercloud.'
|
||||
|
@ -77,6 +77,7 @@ class UndercloudConfig(StandaloneConfig):
|
||||
mistral=True,
|
||||
nova=False,
|
||||
novajoin=False,
|
||||
swift=True,
|
||||
tempest=True,
|
||||
telemetry=False,
|
||||
validations=True,
|
||||
|
@ -51,6 +51,7 @@ class TestStandaloneConfig(base.TestCase):
|
||||
'enable_mistral',
|
||||
'enable_nova',
|
||||
'enable_novajoin',
|
||||
'enable_swift',
|
||||
'enable_telemetry',
|
||||
'enable_tempest',
|
||||
'enable_validations',
|
||||
@ -66,6 +67,7 @@ class TestStandaloneConfig(base.TestCase):
|
||||
mistral=True,
|
||||
nova=True,
|
||||
novajoin=True,
|
||||
swift=True,
|
||||
telemetry=True,
|
||||
tempest=True,
|
||||
validations=True,
|
||||
@ -76,6 +78,7 @@ class TestStandaloneConfig(base.TestCase):
|
||||
'enable_mistral',
|
||||
'enable_nova',
|
||||
'enable_novajoin',
|
||||
'enable_swift',
|
||||
'enable_telemetry',
|
||||
'enable_tempest',
|
||||
'enable_validations',
|
||||
@ -100,6 +103,7 @@ class TestStandaloneConfig(base.TestCase):
|
||||
'enable_mistral',
|
||||
'enable_nova',
|
||||
'enable_novajoin',
|
||||
'enable_swift',
|
||||
'enable_telemetry',
|
||||
'enable_tempest',
|
||||
'enable_validations',
|
||||
|
@ -104,6 +104,7 @@ class TestUndercloudConfig(base.TestCase):
|
||||
'enable_nova',
|
||||
'enable_novajoin',
|
||||
'enable_routed_networks',
|
||||
'enable_swift',
|
||||
'enable_swift_encryption',
|
||||
'enable_telemetry',
|
||||
'enable_tempest',
|
||||
@ -175,6 +176,7 @@ class TestUndercloudConfig(base.TestCase):
|
||||
'enable_nova': False,
|
||||
'enable_novajoin': False,
|
||||
'enable_telemetry': False,
|
||||
'enable_swift': True,
|
||||
'enable_tempest': True,
|
||||
'enable_validations': True,
|
||||
'enable_zaqar': True}
|
||||
|
@ -631,6 +631,10 @@ def prepare_undercloud_deploy(upgrade=False, no_validations=True,
|
||||
deploy_args += ['-e', os.path.join(
|
||||
tht_templates, "environments/services/zaqar-swift-backend.yaml")]
|
||||
|
||||
if not CONF.get('enable_swift'):
|
||||
deploy_args += ['-e', os.path.join(
|
||||
tht_templates, "environments/disable-swift.yaml")]
|
||||
|
||||
if CONF.get('enable_telemetry'):
|
||||
for env_file in TELEMETRY_DOCKER_ENV_YAML:
|
||||
deploy_args += ['-e', os.path.join(tht_templates, env_file)]
|
||||
|
Loading…
Reference in New Issue
Block a user