コード例 #1
0
ファイル: tests.py プロジェクト: usnavi/blueflood
 def setUp(self):
   self.alias_key = '_avg'
   config = {'blueflood':
             {'urls':["http://dummy.com"],
              'tenant':'dummyTenant',
              'submetric_aliases': {self.alias_key:'average',
                                    "_enum": 'enum'  }}}
   self.finder = TenantBluefloodFinder(config)
   self.metric1 = "a.b.c"
   self.metric2 = "e.f.g"
   self.metric3 = "x.y.z"
   self.reader = TenantBluefloodReader(self.metric1, self.finder.tenant, self.finder.bf_query_endpoint,
                                       self.finder.enable_submetrics, self.finder.submetric_aliases, None)
   metric_with_enum1 = self.metric3 + '.' + 'v1'
   metric_with_enum2 = self.metric3 + '.' + 'v2'
   self.enum_reader1 = TenantBluefloodReader(metric_with_enum1, self.finder.tenant, self.finder.bf_query_endpoint,
                                            self.finder.enable_submetrics, self.finder.submetric_aliases, "v1")
   self.enum_reader2 = TenantBluefloodReader(metric_with_enum2, self.finder.tenant, self.finder.bf_query_endpoint,
                                            self.finder.enable_submetrics, self.finder.submetric_aliases, "v2")
   self.node1 = TenantBluefloodLeafNode(self.metric1, self.reader)
   self.node2 = TenantBluefloodLeafNode(self.metric2, self.reader)
   self.node3 = TenantBluefloodLeafNode(metric_with_enum1, self.enum_reader1)
   self.node4 = TenantBluefloodLeafNode(metric_with_enum2, self.enum_reader2)
   self.bfc = BluefloodClient(self.finder.bf_query_endpoint, self.finder.tenant,
                              self.finder.enable_submetrics, self.finder.submetric_aliases)
   auth.set_auth(None)
コード例 #2
0
ファイル: tests.py プロジェクト: bmumdluri/blueflood
 def setUp(self):
     self.alias_key = '_avg'
     config = {
         'blueflood': {
             'urls': ["http://dummy.com"],
             'tenant': 'dummyTenant',
             'submetric_aliases': {
                 self.alias_key: 'average'
             }
         }
     }
     self.finder = TenantBluefloodFinder(config)
     self.metric1 = "a.b.c"
     self.metric2 = "e.f.g"
     self.reader = TenantBluefloodReader(self.metric1, self.finder.tenant,
                                         self.finder.bf_query_endpoint,
                                         self.finder.enable_submetrics,
                                         self.finder.submetric_aliases)
     self.node1 = TenantBluefloodLeafNode(self.metric1, self.reader)
     self.node2 = TenantBluefloodLeafNode(self.metric2, self.reader)
     self.bfc = BluefloodClient(self.finder.bf_query_endpoint,
                                self.finder.tenant,
                                self.finder.enable_submetrics,
                                self.finder.submetric_aliases)
     auth.set_auth(None)