cloudstack icon indicating copy to clipboard operation
cloudstack copied to clipboard

listStoragePools return all fields

Open poddm opened this issue 1 year ago • 1 comments
trafficstars

ISSUE TYPE
  • Enhancement Request
COMPONENT NAME
API
CLOUDSTACK VERSION
4.19
CONFIGURATION

n/a

OS / ENVIRONMENT

n/a

SUMMARY

listStoragePools doesn't return fields passed in from createStoragePool API preventing the use of terraform or other infrastructure as code tools.

Fields

  • details
  • capacitybytes
  • capacityiops
  • url is broken into two fields. Ip and path
    • note: IP can be a fqdn/hostname
  • managed
STEPS TO REPRODUCE
n/a
EXPECTED RESULTS
Values used during createStoragePool are mapped 1:1 and returned through listStoragePools API.
ACTUAL RESULTS
n/a

poddm avatar Feb 29 '24 21:02 poddm

@poddm The listStoragePools already returns capacitybytes (in disksizetotal response parameter), and capacityiops (if not null, in capacityiops response parameter). All the details can't be returned as there are some detail fields not to be listed, any specific details to be listed to use them in terraform? I think, url can be reconstructed from the ip, path, pool type, etc in case required.

For manage parameter in the response, I've created PR here: #9588.

sureshanaparti avatar Aug 26 '24 08:08 sureshanaparti

@poddm details, capacitybytes and capacityiops are updated in the storage pool response here: https://github.com/apache/cloudstack/pull/10740. Noticed some urls holds passwords / tokens, so it's better to construct the url using the pool type, Ip, path and any detail parameters.

sureshanaparti avatar Apr 17 '25 11:04 sureshanaparti

moving to 4.22 milestone

weizhouapache avatar Sep 08 '25 15:09 weizhouapache