[Pure Storge] Ensure correct provisioned space value is used

With the development of the Evergreen//One consumption model for FlashArrays
the ``total_provisioned`` value is no longer supplied for arrays using this
consumption model.

Instead we will use the closest EG1 parameter which is ``used_provisioned``.

Closes-bug: #2090310
Change-Id: I65b80a9c370fa53b0bf124a94b8bae452f9c29ab
This commit is contained in:
Simon Dodsley 2024-11-29 14:10:56 -05:00
parent 6e5e0b78b3
commit 31ae9e6283
2 changed files with 16 additions and 2 deletions

View File

@ -1081,8 +1081,15 @@ class PureBaseVolumeDriver(san.SanDriver):
total_capacity = float(space_info.capacity) / units.Gi
used_space = float(space_info.space.total_physical) / units.Gi
free_space = float(total_capacity - used_space)
# If array uses Evergreen/One model then total_provisioned
# is not reported so use the closest value avaible in that
# consumption model
try:
provisioned_space = float(space_info.space.
total_provisioned) / units.Gi
except AttributeError:
provisioned_space = float(space_info.space.
used_provisioned) / units.Gi
total_reduction = float(space_info.space.total_reduction)
total_vols = len(volumes)
total_hosts = len(hosts)

View File

@ -0,0 +1,7 @@
---
fixes:
- |
`Bug #2090310 <https://bugs.launchpad.net/cinder/+bug/2090310>`_:
[Pure Storage] Fixed issue with FlashArray using the Evergreen//One
consumption model not reporting ``total_provisioned``. Used
``used_provisoned`` instead in this case.