Files
puppet-nova/templates/provider.yaml.erb
Takashi Kajinami c034b19b52 Sort dictionary values
... to make provider.yaml content predictable.

Also replace verify_contents, because this utility is provided by
puppetlabs_spec_helper which we aim to replace by voxpupuli-test.
More strict assertion allows us to detect wrong orders.

Change-Id: Id9c834b822ba4897b92b43733c6ad557ec586a93
Signed-off-by: Takashi Kajinami <kajinamit@oss.nttdata.com>
2025-09-15 02:39:44 +09:00

32 lines
924 B
Plaintext

meta:
schema_version: '<%= @schema_version %>'
providers:
# for details check https://docs.openstack.org/nova/latest/admin/managing-resource-providers.html
<% @custom_inventories.each do |provider| -%>
- identification:
<%- if provider['name'] -%>
name: '<%= provider['name'] %>'
<%- elsif provider['uuid'] -%>
uuid: '<%= provider['uuid'] %>'
<%- else -%>
uuid: '$COMPUTE_NODE'
<%- end -%>
<%- if !provider['inventories'].nil? -%>
inventories:
additional:
<%- provider['inventories'].sort.each do |inventory| -%>
- <%= inventory[0] %>:
<%- inventory[1].sort.each do |resource| -%>
<%= resource[0] %>: <%= resource[1] %>
<%- end -%>
<%- end -%>
<%- end -%>
<%- if !provider['traits'].nil? -%>
traits:
additional:
<%- provider['traits'].each do |trait| -%>
- '<%= trait %>'
<%- end -%>
<%- end -%>
<%- end -%>