Skip to content

Commit 1ca22d5

Browse files
Jenkinsopenstack-gerrit
authored andcommitted
Merge "Don't treat service as enabled if in disabled list"
2 parents 986da64 + 902158b commit 1ca22d5

7 files changed

Lines changed: 8 additions & 0 deletions

File tree

lib/cinder

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -129,6 +129,7 @@ CINDER_CACHE_ENABLED_FOR_BACKENDS=${CINDER_CACHE_ENABLED_FOR_BACKENDS:-$CINDER_E
129129
# Test if any Cinder services are enabled
130130
# is_cinder_enabled
131131
function is_cinder_enabled {
132+
[[ ,${DISABLED_SERVICES} =~ ,"cinder" ]] && return 1
132133
[[ ,${ENABLED_SERVICES} =~ ,"c-" ]] && return 0
133134
return 1
134135
}

lib/glance

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -78,6 +78,7 @@ GLANCE_REGISTRY_PORT_INT=${GLANCE_REGISTRY_PORT_INT:-19191}
7878
# Test if any Glance services are enabled
7979
# is_glance_enabled
8080
function is_glance_enabled {
81+
[[ ,${DISABLED_SERVICES} =~ ,"glance" ]] && return 1
8182
[[ ,${ENABLED_SERVICES} =~ ,"g-" ]] && return 0
8283
return 1
8384
}

lib/keystone

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -134,6 +134,7 @@ KEYSTONE_UNIQUE_LAST_PASSWORD_COUNT=${KEYSTONE_UNIQUE_LAST_PASSWORD_COUNT:-2}
134134
# Test if Keystone is enabled
135135
# is_keystone_enabled
136136
function is_keystone_enabled {
137+
[[ ,${DISABLED_SERVICES} =~ ,"keystone" ]] && return 1
137138
[[ ,${ENABLED_SERVICES}, =~ ,"key", ]] && return 0
138139
return 1
139140
}

lib/neutron

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -91,13 +91,15 @@ declare -a -g _NEUTRON_SERVER_EXTRA_CONF_FILES_ABS
9191
# Test if any Neutron services are enabled
9292
# is_neutron_enabled
9393
function is_neutron_enabled {
94+
[[ ,${DISABLED_SERVICES} =~ ,"neutron" ]] && return 1
9495
[[ ,${ENABLED_SERVICES} =~ ,"neutron-" || ,${ENABLED_SERVICES} =~ ,"q-" ]] && return 0
9596
return 1
9697
}
9798

9899
# Test if any Neutron services are enabled
99100
# is_neutron_enabled
100101
function is_neutron_legacy_enabled {
102+
[[ ,${DISABLED_SERVICES} =~ ,"neutron" ]] && return 1
101103
[[ ,${ENABLED_SERVICES} =~ ,"q-" ]] && return 0
102104
return 1
103105
}

lib/nova

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -175,6 +175,7 @@ NOVA_USE_SERVICE_TOKEN=$(trueorfalse False NOVA_USE_SERVICE_TOKEN)
175175
# Test if any Nova services are enabled
176176
# is_nova_enabled
177177
function is_nova_enabled {
178+
[[ ,${DISABLED_SERVICES} =~ ,"nova" ]] && return 1
178179
[[ ,${ENABLED_SERVICES} =~ ,"n-" ]] && return 0
179180
return 1
180181
}

lib/swift

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -174,6 +174,7 @@ SWIFT_STORAGE_IPS=${SWIFT_STORAGE_IPS:-}
174174
# Test if any Swift services are enabled
175175
# is_swift_enabled
176176
function is_swift_enabled {
177+
[[ ,${DISABLED_SERVICES} =~ ,"swift" ]] && return 1
177178
[[ ,${ENABLED_SERVICES} =~ ,"s-" ]] && return 0
178179
return 1
179180
}

lib/template

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,7 @@ XXX_CONF_DIR=/etc/XXXX
4141
# Test if any XXXX services are enabled
4242
# is_XXXX_enabled
4343
function is_XXXX_enabled {
44+
[[ ,${DISABLED_SERVICES} =~ ,"XXXX" ]] && return 1
4445
[[ ,${ENABLED_SERVICES} =~ ,"XX-" ]] && return 0
4546
return 1
4647
}

0 commit comments

Comments
 (0)