diff --git a/README.md b/README.md index f923c3e..8f30b1e 100644 --- a/README.md +++ b/README.md @@ -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. @@ -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: diff --git a/omdrivers/lifecycle/iDRAC/RAIDHelper.py b/omdrivers/lifecycle/iDRAC/RAIDHelper.py index 1045f15..4f0b76d 100644 --- a/omdrivers/lifecycle/iDRAC/RAIDHelper.py +++ b/omdrivers/lifecycle/iDRAC/RAIDHelper.py @@ -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} diff --git a/setup.py b/setup.py index 0f76292..6749297 100644 --- a/setup.py +++ b/setup.py @@ -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