def test_all_weighers(self): classes = weights.all_weighers() class_names = [cls.__name__ for cls in classes] self.assertEqual(3, len(classes)) self.assertIn('RAMWeigher', class_names) self.assertIn('MetricsWeigher', class_names) self.assertIn('IoOpsWeigher', class_names)
def test_all_weighers(self): classes = weights.all_weighers() class_names = [cls.__name__ for cls in classes] self.assertEqual(len(classes), 3) self.assertIn('RAMWeigher', class_names) self.assertIn('MetricsWeigher', class_names) self.assertIn('IoOpsWeigher', class_names)
def test_all_weighers(self): classes = weights.all_weighers() self.assertIn(ram.RAMWeigher, classes) self.assertIn(metrics.MetricsWeigher, classes) self.assertIn(io_ops.IoOpsWeigher, classes) self.assertIn(affinity.ServerGroupSoftAffinityWeigher, classes) self.assertIn(affinity.ServerGroupSoftAntiAffinityWeigher, classes)
def test_all_weighers(self): classes = weights.all_weighers() self.assertIn(ram.RAMWeigher, classes) self.assertIn(metrics.MetricsWeigher, classes) self.assertIn(io_ops.IoOpsWeigher, classes) # PF9 change self.assertIn(vcpu_pf9.VcpuWeigher, classes)
def test_all_weighers(self): classes = weights.all_weighers() self.assertIn(ram.RAMWeigher, classes) self.assertIn(metrics.MetricsWeigher, classes) self.assertIn(io_ops.IoOpsWeigher, classes)
def test_all_weighers_with_deprecated_config2(self): self.flags(least_cost_functions=['something']) classes = weights.all_weighers() class_names = [cls.__name__ for cls in classes] self.assertEqual(len(classes), 1) self.assertIn('_LeastCostWeigher', class_names)
def test_all_weighers_with_deprecated_config1(self): self.flags(compute_fill_first_cost_fn_weight=-1.0) classes = weights.all_weighers() class_names = [cls.__name__ for cls in classes] self.assertEqual(len(classes), 1) self.assertIn('_LeastCostWeigher', class_names)
def test_all_weighers(self): classes = weights.all_weighers() class_names = [cls.__name__ for cls in classes] self.assertEqual(len(classes), 1) self.assertIn('RAMWeigher', class_names)