Skip to content

Commit

Permalink
Merge pull request #500 from tanjiangyu-ghca/vsp_host
Browse files Browse the repository at this point in the history
vsp deviceid optimize
  • Loading branch information
tanjiangyu-ghca authored Feb 11, 2022
2 parents 0d9d9f9 + 5641736 commit 772f310
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions delfin/drivers/hitachi/vsp/rest_handler.py
Original file line number Diff line number Diff line change
Expand Up @@ -177,14 +177,14 @@ def get_device_id(self):
system_info = storage_systems.get('data')
for system in system_info:
succeed = True
if system.get('model') in consts.SUPPORTED_VSP_SERIES:
if system.get('ctl1Ip') == self.rest_host or \
system.get('ctl2Ip') == self.rest_host:
if system.get('svpIp'):
if system.get('svpIp') == self.rest_host:
self.storage_device_id = system.get('storageDeviceId')
self.device_model = system.get('model')
self.serial_number = system.get('serialNumber')
break
elif system.get('svpIp') == self.rest_host:
elif system.get('ctl1Ip') == self.rest_host or \
system.get('ctl2Ip') == self.rest_host:
self.storage_device_id = system.get('storageDeviceId')
self.device_model = system.get('model')
self.serial_number = system.get('serialNumber')
Expand Down

0 comments on commit 772f310

Please sign in to comment.