Skip to content

Commit 66f820c

Browse files
Zuulopenstack-gerrit
authored andcommitted
Merge "Horizon: gentler -o nounset handling" into stable/victoria
2 parents 08af0bc + 6e02f95 commit 66f820c

File tree

1 file changed

+31
-36
lines changed

1 file changed

+31
-36
lines changed

docker/horizon/extend_start.sh

Lines changed: 31 additions & 36 deletions
Original file line numberDiff line numberDiff line change
@@ -66,51 +66,51 @@ function config_dashboard {
6666

6767
function config_blazar_dashboard {
6868
for file in ${SITE_PACKAGES}/blazar_dashboard/enabled/_*[^__].py; do
69-
config_dashboard "${ENABLE_BLAZAR}" \
69+
config_dashboard "${ENABLE_BLAZAR:-no}" \
7070
"${SITE_PACKAGES}/blazar_dashboard/enabled/${file##*/}" \
7171
"${SITE_PACKAGES}/openstack_dashboard/local/enabled/${file##*/}"
7272
done
7373
}
7474

7575
function config_cloudkitty_dashboard {
7676
for file in ${SITE_PACKAGES}/cloudkittydashboard/enabled/_*[^__].py; do
77-
config_dashboard "${ENABLE_CLOUDKITTY}" \
77+
config_dashboard "${ENABLE_CLOUDKITTY:-no}" \
7878
"${SITE_PACKAGES}/cloudkittydashboard/enabled/${file##*/}" \
7979
"${SITE_PACKAGES}/openstack_dashboard/local/enabled/${file##*/}"
8080
done
8181
}
8282

8383
function config_designate_dashboard {
8484
for file in ${SITE_PACKAGES}/designatedashboard/enabled/_*[^__].py; do
85-
config_dashboard "${ENABLE_DESIGNATE}" \
85+
config_dashboard "${ENABLE_DESIGNATE:-no}" \
8686
"${SITE_PACKAGES}/designatedashboard/enabled/${file##*/}" \
8787
"${SITE_PACKAGES}/openstack_dashboard/local/enabled/${file##*/}"
8888
done
8989
}
9090

9191
function config_freezer_ui {
9292
for file in ${SITE_PACKAGES}/disaster_recovery/enabled/_*[^__].py; do
93-
config_dashboard "${ENABLE_FREEZER}" \
93+
config_dashboard "${ENABLE_FREEZER:-no}" \
9494
"${SITE_PACKAGES}/disaster_recovery/enabled/${file##*/}" \
9595
"${SITE_PACKAGES}/openstack_dashboard/local/enabled/${file##*/}"
9696
done
9797
}
9898

9999
function config_heat_dashboard {
100100
for file in ${SITE_PACKAGES}/heat_dashboard/enabled/_*[^__].py; do
101-
config_dashboard "${ENABLE_HEAT}" \
101+
config_dashboard "${ENABLE_HEAT:-no}" \
102102
"${SITE_PACKAGES}/heat_dashboard/enabled/${file##*/}" \
103103
"${SITE_PACKAGES}/openstack_dashboard/local/enabled/${file##*/}"
104104
done
105105

106-
config_dashboard "${ENABLE_HEAT}" \
106+
config_dashboard "${ENABLE_HEAT:-no}" \
107107
"${SITE_PACKAGES}/heat_dashboard/conf/heat_policy.json" \
108108
"/etc/openstack-dashboard/heat_policy.json"
109109
}
110110

111111
function config_ironic_dashboard {
112112
for file in ${SITE_PACKAGES}/ironic_ui/enabled/_*[^__].py; do
113-
config_dashboard "${ENABLE_IRONIC}" \
113+
config_dashboard "${ENABLE_IRONIC:-no}" \
114114
"${SITE_PACKAGES}/ironic_ui/enabled/${file##*/}" \
115115
"${SITE_PACKAGES}/openstack_dashboard/local/enabled/${file##*/}"
116116
done
@@ -126,72 +126,72 @@ function config_karbor_dashboard {
126126

127127
function config_magnum_dashboard {
128128
for file in ${SITE_PACKAGES}/magnum_ui/enabled/_*[^__].py; do
129-
config_dashboard "${ENABLE_MAGNUM}" \
129+
config_dashboard "${ENABLE_MAGNUM:-no}" \
130130
"${SITE_PACKAGES}/magnum_ui/enabled/${file##*/}" \
131131
"${SITE_PACKAGES}/openstack_dashboard/local/enabled/${file##*/}"
132132
done
133133
}
134134

135135
function config_manila_ui {
136136
for file in ${SITE_PACKAGES}/manila_ui/local/enabled/_*[^__].py; do
137-
config_dashboard "${ENABLE_MANILA}" \
137+
config_dashboard "${ENABLE_MANILA:-no}" \
138138
"${SITE_PACKAGES}/manila_ui/local/enabled/${file##*/}" \
139139
"${SITE_PACKAGES}/openstack_dashboard/local/enabled/${file##*/}"
140140
done
141141
}
142142

143143
function config_masakari_dashboard {
144144
for file in ${SITE_PACKAGES}/masakaridashboard/local/enabled/_*[^__].py; do
145-
config_dashboard "${ENABLE_MASAKARI}" \
145+
config_dashboard "${ENABLE_MASAKARI:-no}" \
146146
"${SITE_PACKAGES}/masakaridashboard/local/enabled/${file##*/}" \
147147
"${SITE_PACKAGES}/openstack_dashboard/local/enabled/${file##*/}"
148148
done
149-
config_dashboard "${ENABLE_MASAKARI}"\
149+
config_dashboard "${ENABLE_MASAKARI:-no}"\
150150
"${SITE_PACKAGES}/masakaridashboard/conf/masakari_policy.json" \
151151
"/etc/openstack-dashboard/masakari_policy.json"
152-
config_dashboard "${ENABLE_MASAKARI}"\
152+
config_dashboard "${ENABLE_MASAKARI:-no}"\
153153
"${SITE_PACKAGES}/masakaridashboard/local/local_settings.d/_50_masakari.py" \
154154
"${SITE_PACKAGES}/openstack_dashboard/local/local_settings.d/_50_masakari.py"
155155
}
156156

157157
function config_monasca_ui {
158-
config_dashboard "${ENABLE_MONASCA}" \
158+
config_dashboard "${ENABLE_MONASCA:-no}" \
159159
"${SITE_PACKAGES}/monitoring/enabled/_50_admin_add_monitoring_panel.py" \
160160
"${SITE_PACKAGES}/openstack_dashboard/local/enabled/_50_admin_add_monitoring_panel.py"
161-
config_dashboard "${ENABLE_MONASCA}" \
161+
config_dashboard "${ENABLE_MONASCA:-no}" \
162162
"${SITE_PACKAGES}/monitoring/conf/monitoring_policy.json" \
163163
"${SITE_PACKAGES}/openstack_dashboard/conf/monitoring_policy.json"
164164
}
165165

166166
function config_murano_dashboard {
167167
for file in ${SITE_PACKAGES}/muranodashboard/local/enabled/_*[^__].py; do
168-
config_dashboard "${ENABLE_MURANO}" \
168+
config_dashboard "${ENABLE_MURANO:-no}" \
169169
"${SITE_PACKAGES}/muranodashboard/local/enabled/${file##*/}" \
170170
"${SITE_PACKAGES}/openstack_dashboard/local/enabled/${file##*/}"
171171
done
172-
config_dashboard "${ENABLE_MURANO}"\
172+
config_dashboard "${ENABLE_MURANO:-no}"\
173173
"${SITE_PACKAGES}/muranodashboard/conf/murano_policy.json" \
174174
"/etc/openstack-dashboard/murano_policy.json"
175175

176-
config_dashboard "${ENABLE_MURANO}"\
176+
config_dashboard "${ENABLE_MURANO:-no}"\
177177
"${SITE_PACKAGES}/muranodashboard/local/local_settings.d/_50_murano.py" \
178178
"${SITE_PACKAGES}/openstack_dashboard/local/local_settings.d/_50_murano.py"
179179
}
180180

181181
function config_mistral_dashboard {
182-
config_dashboard "${ENABLE_MISTRAL}" \
182+
config_dashboard "${ENABLE_MISTRAL:-no}" \
183183
"${SITE_PACKAGES}/mistraldashboard/enabled/_50_mistral.py" \
184184
"${SITE_PACKAGES}/openstack_dashboard/local/enabled/_50_mistral.py"
185185
}
186186

187187
function config_neutron_vpnaas_dashboard {
188-
config_dashboard "${ENABLE_NEUTRON_VPNAAS}" \
188+
config_dashboard "${ENABLE_NEUTRON_VPNAAS:-no}" \
189189
"${SITE_PACKAGES}/neutron_vpnaas_dashboard/enabled/_7100_project_vpn_panel.py" \
190190
"${SITE_PACKAGES}/openstack_dashboard/local/enabled/_7100_project_vpn_panel.py"
191191
}
192192

193193
function config_octavia_dashboard {
194-
config_dashboard "${ENABLE_OCTAVIA}" \
194+
config_dashboard "${ENABLE_OCTAVIA:-no}" \
195195
"${SITE_PACKAGES}/octavia_dashboard/enabled/_1482_project_load_balancer_panel.py" \
196196
"${SITE_PACKAGES}/openstack_dashboard/local/enabled/_1482_project_load_balancer_panel.py"
197197
}
@@ -206,7 +206,7 @@ function config_qinling_dashboard {
206206

207207
function config_sahara_dashboard {
208208
for file in ${SITE_PACKAGES}/sahara_dashboard/enabled/_*[^__].py; do
209-
config_dashboard "${ENABLE_SAHARA}" \
209+
config_dashboard "${ENABLE_SAHARA:-no}" \
210210
"${SITE_PACKAGES}/sahara_dashboard/enabled/${file##*/}" \
211211
"${SITE_PACKAGES}/openstack_dashboard/local/enabled/${file##*/}"
212212
done
@@ -230,76 +230,71 @@ function config_searchlight_ui {
230230

231231
function config_senlin_dashboard {
232232
for file in ${SITE_PACKAGES}/senlin_dashboard/enabled/_*[^__].py; do
233-
config_dashboard "${ENABLE_SENLIN}" \
233+
config_dashboard "${ENABLE_SENLIN:-no}" \
234234
"${SITE_PACKAGES}/senlin_dashboard/enabled/${file##*/}" \
235235
"${SITE_PACKAGES}/openstack_dashboard/local/enabled/${file##*/}"
236236
done
237237

238-
config_dashboard "${ENABLE_SENLIN}" \
238+
config_dashboard "${ENABLE_SENLIN:-no}" \
239239
"${SITE_PACKAGES}/senlin_dashboard/conf/senlin_policy.json" \
240240
"/etc/openstack-dashboard/senlin_policy.json"
241241
}
242242

243243
function config_solum_dashboard {
244244
for file in ${SITE_PACKAGES}/solumdashboard/local/enabled/_*[^__].py; do
245-
config_dashboard "${ENABLE_SOLUM}" \
245+
config_dashboard "${ENABLE_SOLUM:-no}" \
246246
"${SITE_PACKAGES}/solumdashboard/local/enabled/${file##*/}" \
247247
"${SITE_PACKAGES}/openstack_dashboard/local/enabled/${file##*/}"
248248
done
249249
}
250250

251251
function config_tacker_dashboard {
252252
for file in ${SITE_PACKAGES}/tacker_horizon/enabled/_*[^__].py; do
253-
config_dashboard "${ENABLE_TACKER}" \
253+
config_dashboard "${ENABLE_TACKER:-no}" \
254254
"${SITE_PACKAGES}/tacker_horizon/enabled/${file##*/}" \
255255
"${SITE_PACKAGES}/openstack_dashboard/local/enabled/${file##*/}"
256256
done
257257
}
258258

259259
function config_trove_dashboard {
260260
for file in ${SITE_PACKAGES}/trove_dashboard/enabled/_*[^__].py; do
261-
config_dashboard "${ENABLE_TROVE}" \
261+
config_dashboard "${ENABLE_TROVE:-no}" \
262262
"${SITE_PACKAGES}/trove_dashboard/enabled/${file##*/}" \
263263
"${SITE_PACKAGES}/openstack_dashboard/local/enabled/${file##*/}"
264264
done
265265
}
266266

267267
function config_vitrage_dashboard {
268268
for file in ${SITE_PACKAGES}/vitrage_dashboard/enabled/_*[^__].py; do
269-
config_dashboard "${ENABLE_VITRAGE}" \
269+
config_dashboard "${ENABLE_VITRAGE:-no}" \
270270
"${SITE_PACKAGES}/vitrage_dashboard/enabled/${file##*/}" \
271271
"${SITE_PACKAGES}/openstack_dashboard/local/enabled/${file##*/}"
272272
done
273273
}
274274

275275
function config_watcher_dashboard {
276276
for file in ${SITE_PACKAGES}/watcher_dashboard/local/enabled/_*[^__].py; do
277-
config_dashboard "${ENABLE_WATCHER}" \
277+
config_dashboard "${ENABLE_WATCHER:-no}" \
278278
"${SITE_PACKAGES}/watcher_dashboard/local/enabled/${file##*/}" \
279279
"${SITE_PACKAGES}/openstack_dashboard/local/enabled/${file##*/}"
280280
done
281281

282-
config_dashboard "${ENABLE_WATCHER}" \
282+
config_dashboard "${ENABLE_WATCHER:-no}" \
283283
"${SITE_PACKAGES}/watcher_dashboard/conf/watcher_policy.json" \
284284
"/etc/openstack-dashboard/watcher_policy.json"
285285
}
286286

287287
function config_zaqar_dashboard {
288-
# NOTE(yoctozepto): Kolla-Ansible does not control Zaqar and therefore
289-
# does not set ENABLE_ZAQAR; the workaround below ensures it gets set to
290-
# `no` in that case to fix this code under `set -o nounset`.
291-
ENABLE_ZAQAR=${ENABLE_ZAQAR-no}
292-
293288
for file in ${SITE_PACKAGES}/zaqar_ui/enabled/_*[^__].py; do
294-
config_dashboard "${ENABLE_ZAQAR}" \
289+
config_dashboard "${ENABLE_ZAQAR:-no}" \
295290
"${SITE_PACKAGES}/zaqar_ui/enabled/${file##*/}" \
296291
"${SITE_PACKAGES}/openstack_dashboard/local/enabled/${file##*/}"
297292
done
298293
}
299294

300295
function config_zun_dashboard {
301296
for file in ${SITE_PACKAGES}/zun_ui/enabled/_*[^__].py; do
302-
config_dashboard "${ENABLE_ZUN}" \
297+
config_dashboard "${ENABLE_ZUN:-no}" \
303298
"${SITE_PACKAGES}/zun_ui/enabled/${file##*/}" \
304299
"${SITE_PACKAGES}/openstack_dashboard/local/enabled/${file##*/}"
305300
done

0 commit comments

Comments
 (0)