original_docstring: CloneVolume enables you to create a copy of a volume. This method is asynchronous and might take a variable amount of time to complete. The cloning process begins immediately when you make the CloneVolume request and is representative of the state of the volume when the API method is issued. You can use the GetAsyncResult method to determine when the cloning process is complete and the new volume is available for connections. You can use ListSyncJobs to see the progress of creating the clone.
docstring: CloneVolume enables you to create a copy of a volume. This method is asynchronous and might take a variable amount of time to complete. The cloning process begins immediately when you make the CloneVolume request and is representative of the state of the volume when the API method is issued. You can use the GetAsyncResult method to determine when the cloning process is complete and the new volume is available for connections. You can use ListSyncJobs to see the progress of creating the clone.
docstring_tokens: CloneVolume enables you to create a copy of a volume . This method is asynchronous and might take a variable amount of time to complete . The cloning process begins immediately when you make the CloneVolume request and is representative of the state of the volume when the API method is issued . You can use the GetAsyncResult method to determine when the cloning process is complete and the new volume is available for connections . You can use ListSyncJobs to see the progress of creating the clone .
code: def clone(ctx,
             # Mandatory main parameter
             volumeid,
             # Mandatory main parameter
             name,
             # Optional main parameter
             newaccountid = None,
             # Optional main parameter
             newsize = None,
             # Optional main parameter
             access = None,
             # Optional main parameter
             snapshotid = None,
             # Optional main parameter
             attributes = None,
             # Optional main parameter
             enable512e = None,
             # Optional main parameter
             enablesnapmirrorreplication = None):
      """CloneVolume enables you to create a copy of a volume. This method is asynchronous and might take a variable amount of time to complete. The cloning process begins immediately when you make the CloneVolume request and is representative of the state of the volume when the API method is issued. You can use the GetAsyncResult method to determine when the cloning process is complete and the new volume is available for connections. You can use ListSyncJobs to see the progress of creating the clone."""
      """Note: The initial attributes and QoS settings for the volume are inherited from the volume being cloned. You can change these settings with ModifyVolume."""
      """Note: Cloned volumes do not inherit volume access group memberships from the source volume."""
  
      
  
      cli_utils.establish_connection(ctx)
      
      
      
      
      
      
      
  
      kwargsDict = None
      if(attributes is not None and attributes != ()):
          try:
              kwargsDict = simplejson.loads(attributes)
          except Exception as e:
              ctx.logger.error(e.__str__())
              exit(1)
      
      
      
  
      
      if access is not None:
          access = access.get_value()
  
      ctx.logger.info(""": """"""volumeid = """ + str(volumeid)+";"+"""name = """ + str(name)+";" + """newaccountid = """+str(newaccountid)+";" + """newsize = """+str(newsize)+";" + """access = """+str(access)+";" + """snapshotid = """+str(snapshotid)+";" + """attributes = """+str(kwargsDict)+";" + """enable512e = """+str(enable512e)+";" + """enablesnapmirrorreplication = """+str(enablesnapmirrorreplication)+""";"""+"")
      try:
          _CloneVolumeResult = ctx.element.clone_volume(volume_id=volumeid, name=name, new_account_id=newaccountid, new_size=newsize, access=access, snapshot_id=snapshotid, attributes=kwargsDict, enable512e=enable512e, enable_snap_mirror_replication=enablesnapmirrorreplication)
      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(_CloneVolumeResult), indent=4))
          return
      else:
          cli_utils.print_result(_CloneVolumeResult, ctx.logger, as_json=ctx.json, as_pickle=ctx.pickle, depth=ctx.depth, filter_tree=ctx.filter_tree)
code_tokens: def clone ( ctx , volumeid , name , newaccountid = None , newsize = None , access = None , snapshotid = None , attributes = None , enable512e = None , enablesnapmirrorreplication = None ) : """Note: The initial attributes and QoS settings for the volume are inherited from the volume being cloned. You can change these settings with ModifyVolume.""" """Note: Cloned volumes do not inherit volume access group memberships from the source volume.""" cli_utils . establish_connection ( ctx ) kwargsDict = None if ( attributes is not None and attributes != ( ) ) : try : kwargsDict = simplejson . loads ( attributes ) except Exception as e : ctx . logger . error ( e . __str__ ( ) ) exit ( 1 ) if access is not None : access = access . get_value ( ) ctx . logger . info ( """: """ """volumeid = """ + str ( volumeid ) + ";" + """name = """ + str ( name ) + ";" + """newaccountid = """ + str ( newaccountid ) + ";" + """newsize = """ + str ( newsize ) + ";" + """access = """ + str ( access ) + ";" + """snapshotid = """ + str ( snapshotid ) + ";" + """attributes = """ + str ( kwargsDict ) + ";" + """enable512e = """ + str ( enable512e ) + ";" + """enablesnapmirrorreplication = """ + str ( enablesnapmirrorreplication ) + """;""" + "" ) try : _CloneVolumeResult = ctx . element . clone_volume ( volume_id = volumeid , name = name , new_account_id = newaccountid , new_size = newsize , access = access , snapshot_id = snapshotid , attributes = kwargsDict , enable512e = enable512e , enable_snap_mirror_replication = enablesnapmirrorreplication ) 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 ( _CloneVolumeResult ) , indent = 4 ) ) return else : cli_utils . print_result ( _CloneVolumeResult , ctx . logger , as_json = ctx . json , as_pickle = ctx . pickle , depth = ctx . depth , filter_tree = ctx . filter_tree )
short_docstring: CloneVolume enables you to create a copy of a volume.
short_docstring_tokens: CloneVolume enables you to create a copy of a volume .
comment: # Mandatory main parameter$SEP$# Mandatory main parameter$SEP$# Optional main parameter$SEP$# Optional main parameter$SEP$# Optional main parameter$SEP$# Optional main parameter$SEP$# Optional main parameter$SEP$# Optional main parameter$SEP$# Optional main parameter$SEP$"""CloneVolume enables you to create a copy of a volume. This method is asynchronous and might take a variable amount of time to complete. The cloning process begins immediately when you make the CloneVolume request and is representative of the state of the volume when the API method is issued. You can use the GetAsyncResult method to determine when the cloning process is complete and the new volume is available for connections. You can use ListSyncJobs to see the progress of creating the clone."""$SEP$"""Note: The initial attributes and QoS settings for the volume are inherited from the volume being cloned. You can change these settings with ModifyVolume."""$SEP$"""Note: Cloned volumes do not inherit volume access group memberships from the source volume."""