original_docstring: CopyVolume enables you to overwrite the data contents of an existing volume with the data contents of another volume (or
docstring: CopyVolume enables you to overwrite the data contents of an existing volume with the data contents of another volume (or
docstring_tokens: CopyVolume enables you to overwrite the data contents of an existing volume with the data contents of another volume ( or
code: def copy(ctx,
             # Mandatory main parameter
             volumeid,
             # Mandatory main parameter
             dstvolumeid,
             # Optional main parameter
             snapshotid = None):
      """CopyVolume enables you to overwrite the data contents of an existing volume with the data contents of another volume (or"""
      """snapshot). Attributes of the destination volume such as IQN, QoS settings, size, account, and volume access group membership are"""
      """not changed. The destination volume must already exist and must be the same size as the source volume."""
      """NetApp strongly recommends that clients unmount the destination volume before the CopyVolume operation begins. If the"""
      """destination volume is modified during the copy operation, the changes will be lost."""
      """This method is asynchronous and may take a variable amount of time to complete. You can use the GetAsyncResult method to"""
      """determine when the process has finished, and ListSyncJobs to see the progress of the copy."""
  
      
  
      cli_utils.establish_connection(ctx)
      
      
      
      
  
      
  
      ctx.logger.info(""": """"""volumeid = """ + str(volumeid)+";"+"""dstvolumeid = """ + str(dstvolumeid)+";" + """snapshotid = """+str(snapshotid)+""";"""+"")
      try:
          _CopyVolumeResult = ctx.element.copy_volume(volume_id=volumeid, dst_volume_id=dstvolumeid, snapshot_id=snapshotid)
      except common.ApiServerError as e:
          ctx.logger.error(e.message)
          exit()
      except BaseException as e:
          ctx.logger.error(e.__str__())
          exit()
      if ctx.json:
          print(simplejson.dumps(simplejson.loads(_CopyVolumeResult), indent=4))
          return
      else:
          cli_utils.print_result(_CopyVolumeResult, ctx.logger, as_json=ctx.json, as_pickle=ctx.pickle, depth=ctx.depth, filter_tree=ctx.filter_tree)
code_tokens: def copy ( ctx , volumeid , dstvolumeid , snapshotid = None ) : """snapshot). Attributes of the destination volume such as IQN, QoS settings, size, account, and volume access group membership are""" """not changed. The destination volume must already exist and must be the same size as the source volume.""" """NetApp strongly recommends that clients unmount the destination volume before the CopyVolume operation begins. If the""" """destination volume is modified during the copy operation, the changes will be lost.""" """This method is asynchronous and may take a variable amount of time to complete. You can use the GetAsyncResult method to""" """determine when the process has finished, and ListSyncJobs to see the progress of the copy.""" cli_utils . establish_connection ( ctx ) ctx . logger . info ( """: """ """volumeid = """ + str ( volumeid ) + ";" + """dstvolumeid = """ + str ( dstvolumeid ) + ";" + """snapshotid = """ + str ( snapshotid ) + """;""" + "" ) try : _CopyVolumeResult = ctx . element . copy_volume ( volume_id = volumeid , dst_volume_id = dstvolumeid , snapshot_id = snapshotid ) except common . ApiServerError as e : ctx . logger . error ( e . message ) exit ( ) except BaseException as e : ctx . logger . error ( e . __str__ ( ) ) exit ( ) if ctx . json : print ( simplejson . dumps ( simplejson . loads ( _CopyVolumeResult ) , indent = 4 ) ) return else : cli_utils . print_result ( _CopyVolumeResult , ctx . logger , as_json = ctx . json , as_pickle = ctx . pickle , depth = ctx . depth , filter_tree = ctx . filter_tree )
short_docstring: CopyVolume enables you to overwrite the data contents of an existing volume with the data contents of another volume (or
short_docstring_tokens: CopyVolume enables you to overwrite the data contents of an existing volume with the data contents of another volume ( or
comment: # Mandatory main parameter$SEP$# Mandatory main parameter$SEP$# Optional main parameter$SEP$"""CopyVolume enables you to overwrite the data contents of an existing volume with the data contents of another volume (or"""$SEP$"""snapshot). Attributes of the destination volume such as IQN, QoS settings, size, account, and volume access group membership are"""$SEP$"""not changed. The destination volume must already exist and must be the same size as the source volume."""$SEP$"""NetApp strongly recommends that clients unmount the destination volume before the CopyVolume operation begins. If the"""$SEP$"""destination volume is modified during the copy operation, the changes will be lost."""$SEP$"""This method is asynchronous and may take a variable amount of time to complete. You can use the GetAsyncResult method to"""$SEP$"""determine when the process has finished, and ListSyncJobs to see the progress of the copy."""