Sort policy files in local_settings.py
Hash order isn't preserved before Ruby 1.9.2. This change preserves the order for those running Ruby 1.8. Change-Id: I046a3e1c0b5efe5722d39ff91e01e94979204943 Closes-bug: #1422461
This commit is contained in:
parent
d63e437bdf
commit
915f0741ad
|
@ -216,8 +216,8 @@ describe 'horizon' do
|
|||
params.merge!({
|
||||
:policy_files_path => '/opt/openstack-dashboard',
|
||||
:policy_files => {
|
||||
'identity' => 'keystone_policy.json',
|
||||
'compute' => 'nova_policy.json',
|
||||
'identity' => 'keystone_policy.json',
|
||||
'network' => 'neutron_policy.json',
|
||||
}
|
||||
})
|
||||
|
@ -227,8 +227,8 @@ describe 'horizon' do
|
|||
verify_concat_fragment_contents(subject, 'local_settings.py', [
|
||||
"POLICY_FILES_PATH = '/opt/openstack-dashboard'",
|
||||
"POLICY_FILES = {",
|
||||
" 'identity': 'keystone_policy.json',",
|
||||
" 'compute': 'nova_policy.json',",
|
||||
" 'identity': 'keystone_policy.json',",
|
||||
" 'network': 'neutron_policy.json',",
|
||||
"} # POLICY_FILES"
|
||||
])
|
||||
|
|
|
@ -289,7 +289,7 @@ POLICY_FILES_PATH = '/etc/openstack-dashboard'
|
|||
# Map of local copy of service policy files
|
||||
<% if @policy_files.kind_of?(Hash) %>
|
||||
POLICY_FILES = {
|
||||
<% @policy_files.each do |service_name,filename| -%>
|
||||
<% @policy_files.sort.each do |service_name,filename| -%>
|
||||
'<%= service_name -%>': '<%= filename -%>',
|
||||
<% end -%>
|
||||
} # POLICY_FILES
|
||||
|
|
Loading…
Reference in New Issue