Browse Source

Add enable_neutron and enable_heat

These new configuration options can be used to optionally disable these
services when using ephemeral Heat.

Depends-On: I2c9cf50363579d4e18aaeaf783770ca7a4266622
Change-Id: I5503a0bb632e7ab03e2c6c5fecec617899179525
Signed-off-by: James Slagle <jslagle@redhat.com>
changes/19/790119/3
James Slagle 7 months ago
parent
commit
769788f1b2
  1. 5
      releasenotes/notes/add-enable_neutron_heat-8d799d8ffc76f6da.yaml
  2. 11
      tripleoclient/config/standalone.py
  3. 2
      tripleoclient/config/undercloud.py
  4. 8
      tripleoclient/tests/config/test_config_standalone.py
  5. 4
      tripleoclient/tests/config/test_config_undercloud.py
  6. 3
      tripleoclient/v1/overcloud_deploy.py
  7. 8
      tripleoclient/v1/undercloud_config.py

5
releasenotes/notes/add-enable_neutron_heat-8d799d8ffc76f6da.yaml

@ -0,0 +1,5 @@
---
features:
- New configuration options for enable_neutron and enable_heat are added to
the standalone and undercloud installers. These options default to true,
and can be used to selectively disable these services.

11
tripleoclient/config/standalone.py

@ -54,8 +54,8 @@ class StandaloneConfig(BaseConfig):
def get_enable_service_opts(self, cinder=False, frr=False, ironic=False,
ironic_inspector=False, mistral=False,
nova=False, novajoin=False, swift=False,
telemetry=False,
validations=False, zaqar=False):
telemetry=False, validations=False,
zaqar=False, neutron=False, heat=False):
_opts = [
# service enablement
cfg.BoolOpt('enable_cinder',
@ -105,6 +105,13 @@ class StandaloneConfig(BaseConfig):
cfg.BoolOpt('enable_zaqar',
default=zaqar,
help=_('Whether to enable the zaqar service.')),
cfg.BoolOpt('enable_neutron',
default=neutron,
help=_('Whether to enable the neutron service.')),
cfg.BoolOpt('enable_heat',
default=heat,
help=_('Whether to enable the heat service.')),
]
return self.sort_opts(_opts)

2
tripleoclient/config/undercloud.py

@ -72,9 +72,11 @@ class UndercloudConfig(StandaloneConfig):
def get_undercloud_service_opts(self):
return super(UndercloudConfig, self).get_enable_service_opts(
cinder=False,
heat=True,
ironic=True,
ironic_inspector=True,
mistral=False,
neutron=True,
nova=False,
novajoin=False,
swift=False,

8
tripleoclient/tests/config/test_config_standalone.py

@ -47,9 +47,11 @@ class TestStandaloneConfig(base.TestCase):
ret = self.config.get_enable_service_opts()
expected = ['enable_cinder',
'enable_frr',
'enable_heat',
'enable_ironic',
'enable_ironic_inspector',
'enable_mistral',
'enable_neutron',
'enable_nova',
'enable_novajoin',
'enable_swift',
@ -63,9 +65,11 @@ class TestStandaloneConfig(base.TestCase):
def test_get_service_opts_enabled(self):
ret = self.config.get_enable_service_opts(cinder=True,
frr=True,
heat=True,
ironic=True,
ironic_inspector=True,
mistral=True,
neutron=True,
nova=True,
novajoin=True,
swift=True,
@ -74,9 +78,11 @@ class TestStandaloneConfig(base.TestCase):
zaqar=True)
expected = ['enable_cinder',
'enable_frr',
'enable_heat',
'enable_ironic',
'enable_ironic_inspector',
'enable_mistral',
'enable_neutron',
'enable_nova',
'enable_novajoin',
'enable_swift',
@ -99,9 +105,11 @@ class TestStandaloneConfig(base.TestCase):
'deployment_user',
'enable_cinder',
'enable_frr',
'enable_heat',
'enable_ironic',
'enable_ironic_inspector',
'enable_mistral',
'enable_neutron',
'enable_nova',
'enable_novajoin',
'enable_swift',

4
tripleoclient/tests/config/test_config_undercloud.py

@ -96,9 +96,11 @@ class TestUndercloudConfig(base.TestCase):
'discovery_default_driver',
'enable_cinder',
'enable_frr',
'enable_heat',
'enable_ironic',
'enable_ironic_inspector',
'enable_mistral',
'enable_neutron',
'enable_node_discovery',
'enable_nova',
'enable_novajoin',
@ -167,9 +169,11 @@ class TestUndercloudConfig(base.TestCase):
ret = self.config.get_undercloud_service_opts()
expected = {'enable_cinder': False,
'enable_frr': False,
'enable_heat': True,
'enable_ironic': True,
'enable_ironic_inspector': True,
'enable_mistral': False,
'enable_neutron': True,
'enable_nova': False,
'enable_novajoin': False,
'enable_telemetry': False,

3
tripleoclient/v1/overcloud_deploy.py

@ -133,6 +133,9 @@ class DeployOvercloud(command.Command):
except openstack.exceptions.ConfigException:
return dict()
if not conn.endpoint_for('network'):
return dict()
network = conn.network.find_network('ctlplane')
if network is None:
return dict()

8
tripleoclient/v1/undercloud_config.py

@ -635,6 +635,14 @@ def prepare_undercloud_deploy(upgrade=False, no_validations=True,
'undercloud.conf. TLS Everywhere is now implemented '
'using an ansible module instead.')
if not CONF.get('enable_neutron'):
deploy_args += ['-e', os.path.join(
tht_templates, "environments/disable-neutron.yaml")]
if not CONF.get('enable_heat'):
deploy_args += ['-e', os.path.join(
tht_templates, "environments/disable-heat.yaml")]
if CONF.get('ipa_otp'):
deploy_args += ['-e', os.path.join(
tht_templates, "environments/services/undercloud-tls.yaml")]

Loading…
Cancel
Save