Ejemplo n.º 1
0
 def f():
     query_list = get_real_time_query_list()
     if query_list:
         paths = calculators.get_all_paths(rsc_clz_list)
         ret = query_list.get_query_result(paths)
     else:
         ret = None
     return ret
Ejemplo n.º 2
0
 def test_all_paths_with_clz_list(self):
     paths = calculators.get_all_paths([UnityDisk, UnityFileSystem])
     assert_that(
         paths,
         has_items('sp.*.physical.disk.*.reads',
                   'sp.*.storage.filesystem.*.reads'))
     assert_that(paths, is_not(has_item('sp.*.cpu.summary.busyTicks')))
     assert_that(paths, is_not(has_item('sp.*.storage.lun.*.reads')))
Ejemplo n.º 3
0
 def test_all_paths_default(self):
     paths = calculators.get_all_paths()
     assert_that(
         paths,
         has_items('sp.*.physical.disk.*.reads',
                   'sp.*.physical.disk.*.writes',
                   'sp.*.physical.disk.*.readBlocks',
                   'sp.*.physical.disk.*.writeBlocks',
                   'sp.*.cpu.summary.busyTicks',
                   'sp.*.storage.filesystem.*.reads',
                   'sp.*.storage.lun.*.reads'))
Ejemplo n.º 4
0
 def get_real_time_query_list():
     paths = calculators.get_all_paths(rsc_clz_list)
     return UnityMetricRealTimeQuery.get_query_list(self._cli,
                                                    interval,
                                                    paths=paths)