Merge "Handle scheduler default filters as sequence"
diff --git a/README.rst b/README.rst
index 297d432..4d698c4 100644
--- a/README.rst
+++ b/README.rst
@@ -646,6 +646,14 @@
# Then add your custom filter on the end (make sure to include all other ones that you need as well)
scheduler_default_filters: "DifferentHostFilter,SameHostFilter,RetryFilter,AvailabilityZoneFilter,RamFilter,CoreFilter,DiskFilter,ComputeFilter,ComputeCapabilitiesFilter,ImagePropertiesFilter,ServerGroupAntiAffinityFilter,ServerGroupAffinityFilter,PciPassthroughFilter,MyCustomFilter"
+ # Since Queens version a sequence could be used as well:
+ ~scheduler_default_filters:
+ - DifferentHostFilter
+ - SameHostFilter
+ ...
+ - MyCustomFilter
+
+
Hardware Trip/Unmap Support
---------------------------
diff --git a/nova/files/queens/nova-controller.conf.Debian b/nova/files/queens/nova-controller.conf.Debian
index 9bb8307..12d1b58 100644
--- a/nova/files/queens/nova-controller.conf.Debian
+++ b/nova/files/queens/nova-controller.conf.Debian
@@ -4868,7 +4868,8 @@
# (list value)
# Deprecated group/name - [DEFAULT]/scheduler_default_filters
#enabled_filters = RetryFilter,AvailabilityZoneFilter,ComputeFilter,ComputeCapabilitiesFilter,ImagePropertiesFilter,ServerGroupAntiAffinityFilter,ServerGroupAffinityFilter
-enabled_filters={{ controller.scheduler_default_filters }}
+{%- set _enabled_filters = controller.scheduler_default_filters if controller.scheduler_default_filters is string else controller.scheduler_default_filters|unique|sort|join(',') %}
+enabled_filters = {{ _enabled_filters }}
# DEPRECATED:
# Filters used for filtering baremetal hosts.
diff --git a/tests/pillar/control_single.sls b/tests/pillar/control_single.sls
index 338d63b..f94743b 100644
--- a/tests/pillar/control_single.sls
+++ b/tests/pillar/control_single.sls
@@ -2,12 +2,23 @@
controller:
enabled: true
networking: contrail
- version: pike
+ version: queens
security_group: false
vncproxy_url: 127.0.0.1
vnc_keymap: en-gb
dhcp_domain: novalocal
- scheduler_default_filters: "DifferentHostFilter,RetryFilter,AvailabilityZoneFilter,RamFilter,CoreFilter,DiskFilter,ComputeFilter,ComputeCapabilitiesFilter,ImagePropertiesFilter,ServerGroupAntiAffinityFilter,ServerGroupAffinityFilter"
+ scheduler_default_filters:
+ - DifferentHostFilter
+ - RetryFilter
+ - AvailabilityZoneFilter
+ - RamFilter
+ - CoreFilter
+ - DiskFilter
+ - ComputeFilter
+ - ComputeCapabilitiesFilter
+ - ImagePropertiesFilter
+ - ServerGroupAntiAffinityFilter
+ - ServerGroupAffinityFilter
cpu_allocation_ratio: 16.0
ram_allocation_ratio: 1.5
disk_allocation_ratio: 1.0