Skip to content

Commit bb7f9a2

Browse files
committed
Added createSnapshotOfRemoteCopyGroup
Signed-off-by: Kristian Feldsam <feldsam@gmail.com>
1 parent 26094f3 commit bb7f9a2

File tree

1 file changed

+28
-0
lines changed

1 file changed

+28
-0
lines changed

hpe3parclient/client.py

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4214,6 +4214,34 @@ def toggleRemoteCopyConfigMirror(self, target, mirror_config=True):
42144214
except exceptions.HTTPBadRequest as ex:
42154215
pass
42164216

4217+
def createSnapshotOfRemoteCopyGroup(
4218+
self, name, rcg_name, read_only=False):
4219+
"""Create a snapshot of an existing Remote Copy Group Volume Set.
4220+
4221+
:param name: Name of the Snapshot. The vvname pattern is described in
4222+
"VV Name Patterns" in the HPE 3PAR Command Line Interface
4223+
Reference, which is available at the following
4224+
website: http://www.hp.com/go/storage/docs
4225+
4226+
:param rcg_name: Name of the remote copy group
4227+
:type rcg_name: string
4228+
4229+
:param read_only: Read-Only
4230+
:type read_only: bool
4231+
"""
4232+
cmd = ['createsv', '-rcopy']
4233+
4234+
if read_only:
4235+
cmd.append('-ro')
4236+
4237+
cmd.append(name)
4238+
cmd.append(rcg_name)
4239+
4240+
response = self._run(cmd)
4241+
if response != []:
4242+
raise exceptions.SSHException(response)
4243+
return response
4244+
42174245
def getVolumeSnapshots(self, name, live_test=True):
42184246
"""
42194247
Shows all snapshots associated with a given volume.

0 commit comments

Comments
 (0)