Skip to content

Commit

Permalink
Obtain IP information for multiple control nodes
Browse files Browse the repository at this point in the history
  • Loading branch information
yuanyu-ghca committed Sep 13, 2023
1 parent 978eff4 commit 19936c8
Show file tree
Hide file tree
Showing 2 changed files with 21 additions and 0 deletions.
18 changes: 18 additions & 0 deletions delfin/drivers/dell_emc/vnx/vnx_block/component_handler.py
Original file line number Diff line number Diff line change
Expand Up @@ -901,3 +901,21 @@ def check_latest_timestamp(self, storage_id):
latest_time = file_latest_time
time.sleep(consts.CHECK_WAITE_TIME_SECONDS)
return latest_time, file_latest_time

def get_alert_sources(self):
try:
ip_list = []
domains = self.navi_handler.get_domain()
if domains:
for domain in domains:
host_ip = domain.get('ip_address')
ip_list.append({'host': host_ip})
return ip_list
except exception.DelfinException as e:
err_msg = "Get alerts sources failed: %s" % (e.msg)
LOG.error(err_msg)
raise e
except Exception as e:
err_msg = "Get alert sources failed: %s" % (six.text_type(e))
LOG.error(err_msg)
raise exception.InvalidResults(err_msg)
3 changes: 3 additions & 0 deletions delfin/drivers/dell_emc/vnx/vnx_block/vnx_block.py
Original file line number Diff line number Diff line change
Expand Up @@ -110,3 +110,6 @@ def get_capabilities(context, filters=None):

def get_latest_perf_timestamp(self, context):
return self.com_handler.get_latest_perf_timestamp(self.storage_id)

def get_alert_sources(self, context):
return self.com_handler.get_alert_sources()

0 comments on commit 19936c8

Please sign in to comment.