Skip to content

Commit

Permalink
Merge branch 'master' into hpe_3par_hostmap
Browse files Browse the repository at this point in the history
  • Loading branch information
yuanyu-ghca authored Jan 21, 2022
2 parents 097fd82 + 60914f9 commit 12f6c85
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
6 changes: 3 additions & 3 deletions delfin/drivers/ibm/storwize_svc/ssh_handler.py
Original file line number Diff line number Diff line change
Expand Up @@ -577,7 +577,7 @@ def get_fc_port(self, storage_id):
port_result = {
'name': location,
'storage_id': storage_id,
'native_port_id': location,
'native_port_id': port_map.get('id'),
'location': location,
'connection_status': conn_status,
'health_status': status,
Expand Down Expand Up @@ -748,7 +748,7 @@ def packege_data(self, storage_id, resource_type, metrics, metric_map):
resource_info).get('iops').get(iops_time)
res_value = \
res_value / iops_value if iops_value else 0
res_value = round(res_value, 2)
res_value = round(res_value, 3)
metric_map[resource_info][target][res_time] = \
res_value
break
Expand Down Expand Up @@ -785,7 +785,7 @@ def count_metric_data(last_data, now_data, interval, target, metric_type,
elif 'IOPS' in metric_type.upper() or 'RESPONSETIME' \
in metric_type.upper():
value = value / interval
value = round(value, 2)
value = round(value, 3)
if metric_map.get(res_id):
if metric_map.get(res_id).get(metric_type):
if metric_map.get(res_id).get(metric_type).get(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1076,7 +1076,7 @@ def __init__(self):
{
'name': 'node1_0',
'storage_id': '12345',
'native_port_id': 'node1_0',
'native_port_id': '0',
'location': 'node1_0',
'connection_status': 'connected',
'health_status': 'normal',
Expand Down

0 comments on commit 12f6c85

Please sign in to comment.