Exemple #1
0
 def __init__(self):
     super(MetricsFilter, self).__init__()
     opts = utils.parse_options(CONF.metrics.weight_setting,
                                sep='=',
                                converter=float,
                                name="metrics.weight_setting")
     self.keys = [x[0] for x in opts]
 def _check_parse_options(self, opts, sep, converter, expected):
     good = scheduler_utils.parse_options(opts,
                                          sep=sep,
                                          converter=converter)
     for item in expected:
         self.assertIn(item, good)
 def _check_parse_options(self, opts, sep, converter, expected):
     good = scheduler_utils.parse_options(opts,
                                          sep=sep,
                                          converter=converter)
     for item in expected:
         self.assertIn(item, good)
Exemple #4
0
 def _parse_setting(self):
     self.setting = utils.parse_options(CONF.metrics.weight_setting,
                                        sep='=',
                                        converter=float,
                                        name="metrics.weight_setting")
Exemple #5
0
 def _parse_setting(self):
     self.setting = utils.parse_options(CONF.metrics.weight_setting,
                                        sep='=',
                                        converter=float,
                                        name="metrics.weight_setting")