Created
March 9, 2016 23:27
-
-
Save WaltHP/d8c8071bb9006b217fb1 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| diff --git a/hpe3parclient/client.py b/hpe3parclient/client.py | |
| index 7272f70..9ad988f 100644 | |
| --- a/hpe3parclient/client.py | |
| +++ b/hpe3parclient/client.py | |
| @@ -711,7 +711,7 @@ class HPE3ParClient(object): | |
| response, body = self.http.put('/volumes/%s' % name, body=info) | |
| return body | |
| - def copyVolume(self, src_name, dest_name, dest_cpg, optional=None): | |
| + def copyVolume(self, src_name, dest_name, dest_cpg=None, optional=None): | |
| """Copy/Clone a volume. | |
| :param src_name: the source volume name | |
| @@ -829,6 +829,10 @@ class HPE3ParClient(object): | |
| if optional: | |
| parameters = self._mergeDict(parameters, optional) | |
| + if 'online' not in paramaters or parameters['online'] == False: | |
| + # 3Par won't allot destCPG to be set if it's not an online copy. | |
| + parameters.pop('destCPG', None) | |
| + | |
| info = {'action': 'createPhysicalCopy', | |
| 'parameters': parameters} | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment