f3037793b5
Nova supports to configure resource provider inventory and traits using a standardized YAML file format starting victoria release [1]. This change adds the nova::compute::provider class to configure the custom provider yaml file via puppet-nova. [1] https://docs.openstack.org/nova/latest/admin/managing-resource-providers.html Change-Id: If12d7f5a8c331e051eb543f88187c31e676f3b62
32 lines
840 B
Plaintext
32 lines
840 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 -%>
|
|
<% unless provider['inventories'].nil? -%>
|
|
inventories:
|
|
additional:
|
|
<% provider['inventories'].each do |key,inventory| -%>
|
|
- <%= key %>:
|
|
<% inventory.each do |key,value| -%>
|
|
<%= key %>: <%= value %>
|
|
<% end -%>
|
|
<% end -%>
|
|
<% end -%>
|
|
<% unless provider['traits'].nil? -%>
|
|
traits:
|
|
additional:
|
|
<% provider['traits'].each do |trait| -%>
|
|
- '<%= trait %>'
|
|
<% end -%>
|
|
<% end -%>
|
|
<% end -%>
|