Ejemplo n.º 1
0
 def test_PlanObject(self):
     inst = PlanObject(self.params, '.', self.conf)
     #checking if members exist
     self.assertTrue(hasattr(inst, 'template_file'), "Base doesn't contain template_file")
     self.assertTrue(hasattr(inst, 'data_source'), "Base doesn't contain data_source")
     self.assertTrue(hasattr(inst, 'source_type'), "Base doesn't contain source_type")
     self.assertTrue(hasattr(inst, 'sampling'), "Base doesn't contain sampling")
     inst.gather_statistics('device_grid_widget', 'ALL')
     for stat in Configurator.OPTIMIZER_STATISTICS['ALL']:
         self.assertTrue(hasattr(inst, stat), "Base doesn't contain {0}".format(stat))
Ejemplo n.º 2
0
 def test_planobject(self):
     inst = PlanObject(self.params, '.', self.conf)
     # checking if members exist
     self.assertTrue(hasattr(inst, 'template_file'),
                     "Base doesn't contain template_file")
     self.assertTrue(hasattr(inst, 'data_source'),
                     "Base doesn't contain data_source")
     self.assertTrue(hasattr(inst, 'source_type'),
                     "Base doesn't contain source_type")
     self.assertTrue(hasattr(inst, 'sampling'),
                     "Base doesn't contain sampling")
     inst.gather_statistics('device_grid_widget', 'ALL')
     for stat in Configurator.OPTIMIZER_STATISTICS['ALL']:
         self.assertTrue(hasattr(inst, stat),
                         "Base doesn't contain {0}".format(stat))
Ejemplo n.º 3
0
    def _get_complex_data(self, data_type, params, conf):
        plan = PlanObject(params, data_type, conf)
        # TODO: configure the data source type, etc.

        if params['APP_TYPE'].to_string() == 'Dashboard':
            pass
        else:
            pass
Ejemplo n.º 4
0
 def _geo_lookup_plan(self, source_id, params, conf):
     plan = PlanObject(params, source_id, conf)
     plan.data_source = 'vertica-dashboard'
     plan.template_file = 'geo_lookup.sql'
     return plan
Ejemplo n.º 5
0
 def _geo_widget_plan(self, source_id, params, conf):
     plan = PlanObject(params, source_id, conf)
     # here comes the logic around the params
     plan.data_source = 'vertica-dashboard'
     plan.template_file = 'geo_widget.sql'
     return plan
Ejemplo n.º 6
0
 def _geo_lookup_plan(self, source_id,  params, conf):
     plan = PlanObject(params, source_id, conf)
     plan.data_source = 'vertica-dashboard'
     plan.template_file = 'geo_lookup.sql'
     return plan
Ejemplo n.º 7
0
 def _geo_widget_plan(self, source_id,  params, conf):
     plan = PlanObject(params, source_id, conf)
     # here comes the logic around the params
     plan.data_source = 'vertica-dashboard'
     plan.template_file = 'geo_widget.sql'
     return plan