diff --git a/manifests/scheduler/filter.pp b/manifests/scheduler/filter.pp index 0a16bc600..8b41deac6 100644 --- a/manifests/scheduler/filter.pp +++ b/manifests/scheduler/filter.pp @@ -104,6 +104,10 @@ # (optional) Separator character(s) for image property namespace and name # Defaults to $facts['os_service_default'] # +# [*pci_in_placement*] +# (optional) Enable scheduling and claiming PCI devices in Placement. +# Defaults to $facts['os_service_default'] +# class nova::scheduler::filter ( $host_subset_size = $facts['os_service_default'], $max_io_ops_per_host = $facts['os_service_default'], @@ -128,6 +132,7 @@ class nova::scheduler::filter ( $restrict_isolated_hosts_to_isolated_images = $facts['os_service_default'], $aggregate_image_properties_isolation_namespace = $facts['os_service_default'], $aggregate_image_properties_isolation_separator = $facts['os_service_default'], + $pci_in_placement = $facts['os_service_default'], ) { include nova::deps @@ -186,6 +191,8 @@ class nova::scheduler::filter ( value => $aggregate_image_properties_isolation_namespace; 'filter_scheduler/aggregate_image_properties_isolation_separator': value => $aggregate_image_properties_isolation_separator; + 'filter_scheduler/pci_in_placement': + value => $pci_in_placement; } } diff --git a/releasenotes/notes/scheduler_filter-pci_in_placement-3a5681f811af430a.yaml b/releasenotes/notes/scheduler_filter-pci_in_placement-3a5681f811af430a.yaml new file mode 100644 index 000000000..9044e37a7 --- /dev/null +++ b/releasenotes/notes/scheduler_filter-pci_in_placement-3a5681f811af430a.yaml @@ -0,0 +1,5 @@ +--- +features: + - | + The new ``nova::scheduler::filter::pci_in_placement`` parameter has been + added. diff --git a/spec/classes/nova_scheduler_filter_spec.rb b/spec/classes/nova_scheduler_filter_spec.rb index 9113ce2bd..12b32bbe6 100644 --- a/spec/classes/nova_scheduler_filter_spec.rb +++ b/spec/classes/nova_scheduler_filter_spec.rb @@ -32,10 +32,7 @@ describe 'nova::scheduler::filter' do it { is_expected.to contain_nova_config('filter_scheduler/restrict_isolated_hosts_to_isolated_images').with_value('') } it { is_expected.to contain_nova_config('filter_scheduler/aggregate_image_properties_isolation_namespace').with_value('') } it { is_expected.to contain_nova_config('filter_scheduler/aggregate_image_properties_isolation_separator').with_value('') } - - it { is_expected.to_not contain_nova_config('filter_scheduler/use_baremetal_filters') } - it { is_expected.to_not contain_nova_config('filter_scheduler/baremetal_enabled_filters') } - it { is_expected.to_not contain_nova_config('scheduler/host_manager') } + it { is_expected.to contain_nova_config('filter_scheduler/pci_in_placement').with_value('') } end context 'when overriding params' do @@ -61,6 +58,7 @@ describe 'nova::scheduler::filter' do :hypervisor_version_weight_multiplier => 70, :num_instances_weight_multiplier => 0, :shuffle_best_same_weighed_hosts => true, + :pci_in_placement => false, } end @@ -83,6 +81,7 @@ describe 'nova::scheduler::filter' do it { is_expected.to contain_nova_config('filter_scheduler/isolated_hosts').with_value('192.168.1.2,192.168.1.3') } it { is_expected.to contain_nova_config('filter_scheduler/enabled_filters').with_value('RetryFilter,AvailabilityZoneFilter') } it { is_expected.to contain_nova_config('filter_scheduler/available_filters').with_value(['nova_filter1','nova_filter2']) } + it { is_expected.to contain_nova_config('filter_scheduler/pci_in_placement').with_value(false) } end end