dell/PyU4V

How can I provision mainframe storage using the python (or Rest) API?

Closed this issue · 4 comments

On the unisphere web interface it is possible to "provision" storage groups for mainframe.

The wizard allows "CU Images" to be created or selected:
image

Summary:
image

Is it possible to add support for the same operation via the python or Rest API?

Hi Travis,
Unfortunately the calls for PyU4V to create the CU images have not been implemented as we have not had any mainframe requests yet, great to see that you are using this and we are happy to help.

There are API calls to do this which is good news for you. you can use the existing PyU4V infrastructure to make any API call you need once you know what it is, the process is documented here

https://pyu4v.readthedocs.io/en/latest/quick_start.html#perform-a-custom-rest-call-in-pyu4v

you can perform a custom API call to endpoints I've extracted the ones you need.

https://unisphere:8443/univmax/restapi/92/sloprovisioning/symmetrix/{symmetrixId}/split/{splitId}/cuimage
(get/post/put/delete supported)

The documentation is here,

https://developer.dell.com/apis/4458/versions/9.2/openapi.json/paths/~192~1sloprovisioning~1symmetrix~1%7BsymmetrixId%7D~1split/get
https://developer.dell.com/apis/4458/versions/9.2/openapi.json/paths/~192~1sloprovisioning~1symmetrix~1%7BsymmetrixId%7D~1split~1%7BsplitId%7D~1cuimage/post
https://developer.dell.com/apis/4458/versions/9.2/openapi.json/paths/~192~1sloprovisioning~1symmetrix~1%7BsymmetrixId%7D~1split~1%7BsplitId%7D~1cuimage~1%7BcuImageSSID%7D/put
https://developer.dell.com/apis/4458/versions/9.2/openapi.json/paths/~192~1sloprovisioning~1symmetrix~1%7BsymmetrixId%7D~1split~1%7BsplitId%7D~1cuimage~1%7BcuImageSSID%7D~1volume/get
https://developer.dell.com/apis/4458/versions/9.2/openapi.json/paths/~192~1sloprovisioning~1symmetrix~1%7BsymmetrixId%7D~1split~1%7BsplitId%7D~1storageProvisioningToHost/post

We can look at including these in a future release or you can create a pull request once Unit Test and CI Tests have been added.

Let me know if this works for you and we can collaborate to help get the changes in, but in the meantime you should be able to use the custom interface to achieve what you need and this method should not break even if you upgrade PyU4V as we take care of the versioning preserving the custom interface.

Thanks this is exactly what I need.
I'll try out the custom APIs interface for managing CUs

Hi @rawstorage ,

I've coded up some functions for Splits & CU images here https://github.com/travatine/PyU4V/commit/ba7e57fc987f1b4b2fa6f928209b114f03b54001

I was wondering if it is normal for "CU Image" operations to take several minutes?
For example, when I "unmap a single volume from a CU image", in the Unisphere web interface it takes almost 6 minutes:

image
(Let me know if you want more details)

Closing issue, UI and REST giving similar speed, this is normal. Mainframe supported added in 9.2