emc-openstack / storops

Python storage management library for VNX and Unity.
Apache License 2.0
54 stars 29 forks source link

Unity: EnclosureTypeEnum missing #284

Closed matmb-cld closed 5 years ago

matmb-cld commented 5 years ago

Hello, I have an issue when getting dpe information from a 480F Unity array (version 5.0).

unity.get_sp(id='spa').parent_dpe .... File "/home/mat/Virtualenv/xymon_cloud/local/lib/python2.7/site-packages/storops/lib/common.py", line 194, in _raise_invalid_value raise storops.exception.EnumValueNotFoundError(msg) storops.exception.EnumValueNotFoundError: 38 is not a valid value for EnclosureTypeEnum

And I solved this issue by simply adding the following variable SCORP_12G_SAS_DPE = (38, '25 Drive 12G DPE') To the class class EnclosureTypeEnum(UnityEnum) in the file storops/unity/enums.py

I've found this Enclosure Type in the document: Unisphere Management REST API Reference Guide

Regards Mathieu

yong-huang commented 5 years ago

Thanks for the report. Fixed in review [GH-284] Unity: add 'SCORP_12G_SAS_DPE' in EnclosureTypeEnum.

matmb-cld commented 5 years ago

Thank you for your quick answer.