Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

use resourse's own status #134

Merged
merged 1 commit into from
Jun 3, 2021
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 8 additions & 8 deletions delfin/drivers/dell_emc/unity/unity.py
Original file line number Diff line number Diff line change
Expand Up @@ -185,9 +185,9 @@ def list_controllers(self, context):
content = pool.get('content', {})
health_value = content.get('health', {}).get('value')
if health_value in UnityStorDriver.HEALTH_OK:
status = constants.StorageStatus.NORMAL
status = constants.ControllerStatus.NORMAL
else:
status = constants.StorageStatus.ABNORMAL
status = constants.ControllerStatus.OFFLINE
controller_result = {
'name': content.get('name'),
'storage_id': self.storage_id,
Expand Down Expand Up @@ -222,9 +222,9 @@ def get_eth_ports(self, port_list):
content = port.get('content', {})
health_value = content.get('health', {}).get('value')
if health_value in UnityStorDriver.HEALTH_OK:
status = constants.StorageStatus.NORMAL
status = constants.PortHealthStatus.NORMAL
else:
status = constants.StorageStatus.ABNORMAL
status = constants.PortHealthStatus.ABNORMAL
conn_status = constants.PortConnectionStatus.CONNECTED if \
content.get('isLinkUp') is True \
else constants.PortConnectionStatus.DISCONNECTED
Expand Down Expand Up @@ -275,9 +275,9 @@ def get_fc_port(self, port_list):
content = port.get('content', {})
health_value = content.get('health', {}).get('value')
if health_value in UnityStorDriver.HEALTH_OK:
status = constants.StorageStatus.NORMAL
status = constants.PortHealthStatus.NORMAL
else:
status = constants.StorageStatus.ABNORMAL
status = constants.PortHealthStatus.ABNORMAL
conn_status = status
port_result = {
'name': content.get('name'),
Expand Down Expand Up @@ -316,9 +316,9 @@ def list_disks(self, context):
content = disk.get('content', {})
health_value = content.get('health', {}).get('value')
if health_value in UnityStorDriver.HEALTH_OK:
status = constants.StorageStatus.NORMAL
status = constants.DiskStatus.NORMAL
else:
status = constants.StorageStatus.ABNORMAL
status = constants.DiskStatus.ABNORMAL
disk_result = {
'name': content.get('name'),
'storage_id': self.storage_id,
Expand Down