Browse Source

Merge "Add enable_neutron and enable_heat"

changes/57/787157/2
Zuul 2 weeks ago
committed by Gerrit Code Review
parent
commit
fba8b06018
7 changed files with 39 additions and 2 deletions
  1. +5
    -0
      releasenotes/notes/add-enable_neutron_heat-8d799d8ffc76f6da.yaml
  2. +9
    -2
      tripleoclient/config/standalone.py
  3. +2
    -0
      tripleoclient/config/undercloud.py
  4. +8
    -0
      tripleoclient/tests/config/test_config_standalone.py
  5. +4
    -0
      tripleoclient/tests/config/test_config_undercloud.py
  6. +3
    -0
      tripleoclient/v1/overcloud_deploy.py
  7. +8
    -0
      tripleoclient/v1/undercloud_config.py

+ 5
- 0
releasenotes/notes/add-enable_neutron_heat-8d799d8ffc76f6da.yaml View File

@ -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.

+ 9
- 2
tripleoclient/config/standalone.py View File

@ -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
- 0
tripleoclient/config/undercloud.py View File

@ -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
- 0
tripleoclient/tests/config/test_config_standalone.py View File

@ -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
- 0
tripleoclient/tests/config/test_config_undercloud.py View File

@ -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
- 0
tripleoclient/v1/overcloud_deploy.py View File

@ -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
- 0
tripleoclient/v1/undercloud_config.py View File

@ -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