Пример #1
0
 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)
Пример #2
0
 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)
Пример #3
0
 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)
Пример #5
0
 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)
Пример #6
0
 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)
Пример #7
0
 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)
Пример #8
0
 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)
Пример #9
0
 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)
Пример #10
0
 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)
Пример #11
0
 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)