Skip to content

Commit f4cec2d

Browse files
Zuulopenstack-gerrit
authored andcommitted
Merge "Allow jobs to disable all services"
2 parents 924b114 + 5551170 commit f4cec2d

2 files changed

Lines changed: 9 additions & 1 deletion

File tree

roles/write-devstack-local-conf/README.rst

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,12 @@ Write the local.conf file for use by devstack
5353
A dictionary mapping service names to boolean values. If the
5454
boolean value is ``false``, a ``disable_service`` line will be
5555
emitted for the service name. If it is ``true``, then
56-
``enable_service`` will be emitted. All other values are ignored.
56+
``enable_service`` will be emitted. All other values are ignored.
57+
The special key ``base`` can be used to enable or disable the base set of
58+
services enabled by default. If ``base`` is found, it will processed before
59+
all other keys. If its value is ``False`` a ``disable_all_services`` will be
60+
emitted; if its value is ``True`` nothing will be emitted since base
61+
services are enabled by default.
5762

5863
.. zuul:rolevar:: devstack_plugins
5964
:type: dict

roles/write-devstack-local-conf/library/devstack_local_conf.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -124,6 +124,9 @@ def handle_plugins(self, plugins):
124124
self.localrc.append('enable_plugin {} {}'.format(k, v))
125125

126126
def handle_services(self, services):
127+
base_services = services.pop('base', True)
128+
if not base_services:
129+
self.localrc.append('disable_all_services')
127130
for k, v in services.items():
128131
if v is False:
129132
self.localrc.append('disable_service {}'.format(k))

0 commit comments

Comments
 (0)