Matt McEuen 178aa271a4 Update OSH Author copyrights to OSF
This PS updates the "Openstack-Helm Authors" copyright attribution
to be the "OpenStack Foundation", as decided in the 2018-03-20
team meeting:
http://eavesdrop.openstack.org/meetings/openstack_helm/2018/openstack_helm.2018-03-20-15.00.log.html

No other copyright attributions were changed.

Change-Id: I1137dee2ae5728771835f4b33fcaff60fcc22ca9
2018-08-26 17:17:06 -05:00

68 lines
1.9 KiB
Smarty

{{/*
Copyright 2017-2018 OpenStack Foundation.
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
*/}}
{{/*
abstract: |
Returns OSLO.conf formatted output from yaml input
values: |
conf:
keystone:
DEFAULT: # Keys at this level are used for section headings
max_token_size: 255
oslo_messaging_notifications:
driver: # An example of a multistring option's syntax
type: multistring
values:
- messagingv2
- log
security_compliance:
password_expires_ignore_user_ids:
# Values in a list will be converted to a comma separated key
- "123"
- "456"
usage: |
{{ include "helm-toolkit.utils.to_oslo_conf" .Values.conf.keystone }}
return: |
[DEFAULT]
max_token_size = 255
[oslo_messaging_notifications]
driver = messagingv2
driver = log
[security_compliance]
password_expires_ignore_user_ids = 123,456
*/}}
{{- define "helm-toolkit.utils.to_oslo_conf" -}}
{{- range $section, $values := . -}}
{{- if kindIs "map" $values -}}
[{{ $section }}]
{{ range $key, $value := $values -}}
{{- if kindIs "slice" $value -}}
{{ $key }} = {{ include "helm-toolkit.utils.joinListWithComma" $value }}
{{ else if kindIs "map" $value -}}
{{- if eq $value.type "multistring" }}
{{- range $k, $multistringValue := $value.values -}}
{{ $key }} = {{ $multistringValue }}
{{ end -}}
{{- end -}}
{{- else -}}
{{ $key }} = {{ $value }}
{{ end -}}
{{- end -}}
{{- end -}}
{{- end -}}
{{- end -}}