Ejemplo n.º 1
0
    def test_validate_weighers_configured(self):
        self.flags(scheduler_weight_classes=
                   ['ServerGroupSoftAntiAffinityWeigher',
                    'FakeFilter1'])

        self.assertTrue(scheduler_utils.validate_weigher(
            'ServerGroupSoftAntiAffinityWeigher'))
        self.assertTrue(scheduler_utils.validate_weigher('FakeFilter1'))
        self.assertFalse(scheduler_utils.validate_weigher(
            'ServerGroupSoftAffinityWeigher'))
Ejemplo n.º 2
0
 def test_validate_weighers_configured_all_weighers(self):
     self.assertTrue(scheduler_utils.validate_weigher(
         'ServerGroupSoftAffinityWeigher'))
     self.assertTrue(scheduler_utils.validate_weigher(
         'ServerGroupSoftAntiAffinityWeigher'))