Sort key-value pairs in backend dictionaries
The items within each cinder backend section is currently templated as an unsorted dictionary. Sort them to avoid unnecessary config changes and service restarts. Change-Id: I48a0bd5dc294ec5bc142537c6e74d57a25fda5e4
This commit is contained in:
parent
d6e92768bb
commit
849677b052
@ -95,7 +95,7 @@ enabled_backends={% for backend in cinder_backends|dictsort %}{{ backend.0 }}{%
|
||||
# All given backend(s)
|
||||
{% for backend_section in cinder_backends|dictsort %}
|
||||
[{{ backend_section.0 }}]
|
||||
{% for key, value in backend_section.1.items() if key not in ['extra_volume_types', 'shares'] %}
|
||||
{% for key, value in (backend_section.1 | dictsort) if key not in ['extra_volume_types', 'shares'] %}
|
||||
{{ key }}={{ value }}
|
||||
{% endfor %}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user