Start a Conversation

Unsolved

G

1 Rookie

 • 

2 Posts

705

March 24th, 2022 13:00

PyPowerStore: add functions to clone a volume group and to refresh a clone

Hi, I am working on a Python script for a customer to manage Powerstore volume group clones.  I am using the the Python library for Powerstore (PyPowerStore).  Unfortunately the functions to clone a vg and refresh the clone, which are in the REST API, are not implemented in PyPowerStore, so it looks like I will need to add those myself.

Has anyone done somethng like this before, or have any tips on doing it?

These are from the REST API:

POST /volume_group/{id}/clone
Description
Clone a volume group. The clone volume group will be created on the same appliance as the source
volume group. A clone of a volume group will result in a new volume group of Clone type. The
clone will belong to the same family as the source volume group. When the source of a clone
operation is a either primary or clone volume group,


POST /volume_group/{id}/refresh
Description
Refresh the contents of a volume group (the target volume group) from another volume group in
the same family.

 

Thanks

Geoff

1 Message

April 14th, 2022 21:00

Hi @gbradfor ,

Please find below steps to add clone/refresh functions in PyPowerStore:

  1. Add rest endpoints for clone and refresh in constants.py, present in the utils folder. Please refer the volume group existing rest endpoints in the same file.
  2. Add functions for clone and refresh in provisioning.py by passing required parameters

Please let me know of any further clarifications.

Thanks,

Akash

No Events found!

Top