diff --git a/hooks/nova_cc_context.py b/hooks/nova_cc_context.py index 25ca41e1..1f5ce77f 100644 --- a/hooks/nova_cc_context.py +++ b/hooks/nova_cc_context.py @@ -359,6 +359,16 @@ _pike_enabled_filters = [ "DifferentHostFilter", "SameHostFilter", ] +_victoria_enabled_filters = [ + "AvailabilityZoneFilter", + "ComputeFilter", + "ComputeCapabilitiesFilter", + "ImagePropertiesFilter", + "ServerGroupAntiAffinityFilter", + "ServerGroupAffinityFilter", + "DifferentHostFilter", + "SameHostFilter", +] def default_enabled_filters(): @@ -370,6 +380,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 >= 'victoria': + return _victoria_enabled_filters if cmp_os_rel >= 'pike': return _pike_enabled_filters return _base_enabled_filters diff --git a/unit_tests/test_nova_cc_contexts.py b/unit_tests/test_nova_cc_contexts.py index b248b21b..8d983a7d 100644 --- a/unit_tests/test_nova_cc_contexts.py +++ b/unit_tests/test_nova_cc_contexts.py @@ -693,3 +693,8 @@ class NovaComputeContextTests(CharmTestCase): self.os_release.return_value = 'rocky' self.assertEqual(context.default_enabled_filters(), context._pike_enabled_filters) + + def test_default_enabled_filters_victoria(self): + self.os_release.return_value = 'victoria' + self.assertEqual(context.default_enabled_filters(), + context._victoria_enabled_filters)