Skip to content

Commit

Permalink
RaidHelper issue fix
Browse files Browse the repository at this point in the history
  • Loading branch information
jagadeeshnv committed Nov 24, 2021
1 parent 1b510a4 commit 3de6e65
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 9 deletions.
8 changes: 4 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,15 +22,15 @@ Dell EMC OpenManage Python SDK is supported for python 2.7 and above.
``` pip3 install -r requirements-python3x.txt ```

# Installation
* This branch contains the build version 1.2.478
* This branch contains the build version 1.2.481
* Install the latest development version from github:

```
git clone https://github.com/dell/omsdk.git
cd omsdk
sh build.sh 1.2 478
sh build.sh 1.2 481
cd dist
pip install omsdk-1.2.478-py2.py3-none-any.whl
pip install omsdk-1.2.481-py2.py3-none-any.whl
```
* If omsdk build creation fails due to `python` command error, configure
`python` to launch either `python2` or `python3`. Accordingly configure the `pip` command.
Expand All @@ -40,7 +40,7 @@ Dell EMC OpenManage Python SDK is supported for python 2.7 and above.

* Downgrade pip version to lower than 10.0 and then install omsdk
* Force install omsdk using:
```pip install --ignore-installed omsdk-1.2.478-py2.py3-none-any.whl```
```pip install --ignore-installed omsdk-1.2.481-py2.py3-none-any.whl```
# Uninstallation
* Uninstall this module as follows:
Expand Down
14 changes: 10 additions & 4 deletions omdrivers/lifecycle/iDRAC/RAIDHelper.py
Original file line number Diff line number Diff line change
Expand Up @@ -207,17 +207,23 @@ def raid_std_validation(raid_value=None):
if raid_value.get('pd_required') or raid_value.get('span_length') is not None:
pd_slots = raid_value.get('pd_required')
span_length = raid_value.get('span_length')
if operator.ne(raid.get('span_depth'), raid_value.get('span_depth')):
message, status = "Invalid physical disk slots or span length or span depth details.", "Failed"
if raid_value['raid_level'] in ["RAID 0", "RAID 1", "RAID 5", "RAID 6"] and \
operator.ne(raid.get('span_depth'), raid_value.get('span_depth')):
return {'Status': 'Failed', 'Message': 'Invalid span depth.'}
if raid_value['raid_level'] not in ["RAID 0", "RAID 1", "RAID 5", "RAID 6"] and \
operator.lt(raid_value.get('span_depth'), raid.get('span_depth')):
return {'Status': 'Failed', 'Message': 'Invalid span depth.'}
if raid.get('checks')(pd_slots, len(raid.get('pd_slots'))):
status = "Success"
message = "span length validation is successful."
elif raid.get('checks')(span_length, raid.get('span_length')):
else:
status, message = status, message
if raid.get('checks')(span_length, raid.get('span_length')):
status = "Success"
message = "physical disk slots validation is successful."
else:
status = "Failed"
message = "Invalid physical disk slots or span length or span depth details."
status, message = status, message
logger.info("Interface raid_std_validation exit")
return {"Status": status, "Message": message}

Expand Down
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
long_description = f.read()

# Update the package version here
omsdk_ver = '1.2.478'
omsdk_ver = '1.2.481'

# conditional dependency:include enum34 if python 2 is in use
debug_l1_en = False
Expand Down

0 comments on commit 3de6e65

Please sign in to comment.