dell / PyU4V

PyU4V is a Python module that simplifies interaction with the Unisphere for PowerMax REST API. It wraps REST calls with simple APIs that abstracts the HTTP request and response handling.
Apache License 2.0
41 stars 37 forks source link

Are there APIs to list and release lock on Storage groups #190

Closed Sacheen123 closed 3 months ago

Sacheen123 commented 3 months ago

Hi,

I am unable to find APIs to list and release lock on Storage groups. Can you please help?

Thanks, Sacheen Birhade

rawstorage commented 3 months ago

https://IPaddress:8443/univmax/restapi/102/system/symmetrix/{symmetrixId}?include_lock_info=true

you can add a filter, to system call. This is not implemented in PyU4V right now,

There is an accompanying PUT call

https://IPaddress:8443/univmax/restapi/101/system/symmetrix/{symmetrixId}

{ "editSymmetrixActionParam": { "releaseLockParam": { "lockNumber": 15, "force": "true" } } }

You can use the custom call intterface to create a function for this.

import PyU4V conn = PyU4V.U4VConn(username='smc',password='smc',server_ip='ipaddress ',port='8443',array_id='None',verify=False) payload = {'editSymmetrixActionParam':{'releaseLockParam':{'lockNumber':15,'force':'true'}}} conn.common.modify_resource(target_uri=f'/101/system/symmetrix/{symmetrixId}',resource_type=None,payload=payload)

https://developer.dell.com/apis/4458/versions/10.1.0/openapi.json/paths/~1101~1system~1symmetrix~1%7BsymmetrixId%7D/get https://developer.dell.com/apis/4458/versions/10.1.0/openapi.json/paths/~1101~1system~1symmetrix~1%7BsymmetrixId%7D/PUT

This call was available in 9,.2 also..

Only use this call if you are sure what you are doing, It's not something we recommend automating given lock could be placed there by your CE for hardware upgrade or something else. This is not an issue with PyU4V and we have no plans to create a function for this in the future. Be careful with these options.

Sacheen123 commented 3 months ago

Thank you so much!