Merge "Drop AvailabilityZoneFilter inline with upstream removal"
This commit is contained in:
commit
f022edc81f
@ -585,7 +585,6 @@ def get_installed_os_version():
|
||||
return openstack_release().get('OPENSTACK_CODENAME')
|
||||
|
||||
|
||||
@cached
|
||||
def openstack_release():
|
||||
"""Return /etc/os-release in a dict."""
|
||||
d = {}
|
||||
|
@ -381,6 +381,15 @@ _victoria_enabled_filters = [
|
||||
"DifferentHostFilter",
|
||||
"SameHostFilter",
|
||||
]
|
||||
_bobcat_enabled_filters = [
|
||||
"ComputeFilter",
|
||||
"ComputeCapabilitiesFilter",
|
||||
"ImagePropertiesFilter",
|
||||
"ServerGroupAntiAffinityFilter",
|
||||
"ServerGroupAffinityFilter",
|
||||
"DifferentHostFilter",
|
||||
"SameHostFilter",
|
||||
]
|
||||
|
||||
|
||||
def default_enabled_filters():
|
||||
@ -392,6 +401,8 @@ def default_enabled_filters():
|
||||
"""
|
||||
os_rel = ch_utils.os_release('nova-common')
|
||||
cmp_os_rel = ch_utils.CompareOpenStackReleases(os_rel)
|
||||
if cmp_os_rel >= 'bobcat':
|
||||
return _bobcat_enabled_filters
|
||||
if cmp_os_rel >= 'victoria':
|
||||
return _victoria_enabled_filters
|
||||
if cmp_os_rel >= 'pike':
|
||||
|
@ -774,3 +774,8 @@ class NovaComputeContextTests(CharmTestCase):
|
||||
self.os_release.return_value = 'victoria'
|
||||
self.assertEqual(context.default_enabled_filters(),
|
||||
context._victoria_enabled_filters)
|
||||
|
||||
def test_default_enabled_filters_bobcat(self):
|
||||
self.os_release.return_value = 'bobcat'
|
||||
self.assertEqual(context.default_enabled_filters(),
|
||||
context._bobcat_enabled_filters)
|
||||
|
Loading…
Reference in New Issue
Block a user