Skip to content

Commit

Permalink
Remove the node name from map field
Browse files Browse the repository at this point in the history
  • Loading branch information
aleksbykov authored and bentsi committed Jun 13, 2019
1 parent 158d829 commit 9bcd774
Showing 1 changed file with 5 additions and 13 deletions.
18 changes: 5 additions & 13 deletions sdcm/db_stats.py
Original file line number Diff line number Diff line change
Expand Up @@ -331,7 +331,7 @@ def get_setup_details(self):
if is_gce and self.db_cluster:
setup_details['cpu_platform'] = self.db_cluster.nodes[0]._instance.extra.get('cpuPlatform', 'UNKNOWN')

setup_details['db_cluster_details'] = {}
setup_details['db_cluster_node_details'] = {}
return setup_details

def get_test_details(self):
Expand All @@ -353,18 +353,10 @@ def get_test_details(self):
test_details['log_files'] = {}
return test_details

def get_db_cluster_details(self):
def get_db_cluster_node_details(self):

db_cluster_details = {}
for node in self.db_cluster.nodes:
node_system_info = {}
node_system_info[node.name] = {
'cpu_model': node.get_cpumodel(),
'sys_info': node.get_system_info(),
}
db_cluster_details.update(node_system_info)

return db_cluster_details
return {'cpu_model': self.db_cluster.nodes[0].get_cpumodel(),
'sys_info': self.db_cluster.nodes[0].get_system_info()}

def create_test_stats(self, sub_type=None):
self._test_index = self.__class__.__name__.lower()
Expand Down Expand Up @@ -494,7 +486,7 @@ def update_test_details(self, errors=None, coredumps=None, scylla_conf=False):
self._stats['test_details']['prometheus_data'] = self.monitors.download_monitor_data()

if self.db_cluster:
self._stats['setup_details']['db_cluster_details'] = self.get_db_cluster_details()
self._stats['setup_details']['db_cluster_node_details'] = self.get_db_cluster_node_details()

if self.db_cluster and scylla_conf and 'scylla_args' not in self._stats['setup_details'].keys():
node = self.db_cluster.nodes[0]
Expand Down

0 comments on commit 9bcd774

Please sign in to comment.