@@ -62,6 +62,7 @@ def _report_nodes(self, config, tags):
62
62
if isinstance (config_nodes , bool ):
63
63
report_nodes = config_nodes
64
64
config_nodes = {}
65
+ discovered_nodes = []
65
66
if report_nodes :
66
67
nodes_discovery = None
67
68
if config_nodes :
@@ -82,6 +83,7 @@ def _report_nodes(self, config, tags):
82
83
discovered_nodes = [
83
84
(None , node .get ('name' ), node , None ) for node in self .check .api .get_baremetal_nodes ()
84
85
]
86
+ self .check .log .debug ("discovered_nodes: %s" , discovered_nodes )
85
87
for _pattern , _item_name , item , item_config in discovered_nodes :
86
88
self .check .log .debug ("item: %s" , item )
87
89
self .check .log .debug ("item_config: %s" , item_config )
@@ -199,8 +201,7 @@ def _report_volume_targets(self, config, tags):
199
201
@Component .register_global_metrics (ID )
200
202
@Component .http_error ()
201
203
def _report_drivers (self , config , tags ):
202
- if 'drivers' not in config :
203
- report_drivers = config .get ('drivers' , True )
204
+ report_drivers = config .get ('drivers' , True )
204
205
if report_drivers :
205
206
data = self .check .api .get_baremetal_drivers ()
206
207
for item in data :
@@ -216,8 +217,7 @@ def _report_drivers(self, config, tags):
216
217
@Component .register_global_metrics (ID )
217
218
@Component .http_error ()
218
219
def _report_allocations (self , config , tags ):
219
- if 'allocations' not in config :
220
- report_allocations = config .get ('allocations' , True )
220
+ report_allocations = config .get ('allocations' , True )
221
221
if report_allocations :
222
222
data = self .check .api .get_baremetal_allocations ()
223
223
for item in data :
0 commit comments