hpe-storage / python-3parclient

This is a python client that talks to the HPE Alletra 9000 and HPE Primera and HPE 3PAR storage array via REST.
Apache License 2.0
48 stars 70 forks source link

You can't just compare version strings like this #87

Open VortexUK opened 2 years ago

VortexUK commented 2 years ago

https://github.com/hpe-storage/python-3parclient/blob/26094f3011237795f0c5efb24faf04560c72f4a4/hpe3parclient/client.py#L252-L255

The WSAPI version on primera is now 1.10.0. Which since the 'minimum' version is 1.5.0, means that the code thinks the minimum version is not met and breaks any attempt at a creation of a compressed lun. Please fix ASAP

VortexUK commented 2 years ago

Just to give the simplest example possible:


>>> WSAPI_MIN_SUPPORTED_VERSION = '1.5.0'
>>> before = '1.9.0'
>>> after = '1.10.0'
>>> before >= WSAPI_MIN_SUPPORTED_VERSION
True
>>> after >= WSAPI_MIN_SUPPORTED_VERSION
False
VortexUK commented 2 years ago

In the SDK, you compare them correctly using StrictVersion, so the same thing applies here.