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

Hpe 3par: change to lower case and add digital judgment #935

Merged
merged 3 commits into from
Oct 28, 2022
Merged
Changes from 2 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
4 changes: 2 additions & 2 deletions delfin/drivers/hpe/hpe_3par/component_handler.py
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ def get_storage(self, context):
# Check the hardware and software health
# status of the storage system
re_str = self.ssh_handler.get_health_state()
if 'degraded' in re_str or 'failed' in re_str:
if 'degraded' in re_str.lower() or 'failed' in re_str.lower():
status = constants.StorageStatus.ABNORMAL
except Exception:
status = constants.StorageStatus.ABNORMAL
Expand Down Expand Up @@ -287,7 +287,7 @@ def list_disks(self, storage_id):
model = inventory_map.get('disk_model')
firmware = inventory_map.get('disk_fw_rev')
speed = None
if disk.get('rpm'):
if str(disk.get('rpm')).isdigit():
speed = int(disk.get('rpm')) * units.k
disk_model = {
'name': disk.get('cagepos'),
Expand Down