original_docstring: ModifyVolume enables you to modify settings on an existing volume. You can make modifications to one volume at a time and
docstring: ModifyVolume enables you to modify settings on an existing volume. You can make modifications to one volume at a time and
docstring_tokens: ModifyVolume enables you to modify settings on an existing volume . You can make modifications to one volume at a time and
code: def modify(ctx,
             # Mandatory main parameter
             volumeid,
             # Optional main parameter
             accountid = None,
             # Optional main parameter
             access = None,
             # Optional subparameter of optional main parameter.
             miniops = None,
             # Optional subparameter of optional main parameter.
             maxiops = None,
             # Optional subparameter of optional main parameter.
             burstiops = None,
             # Optional subparameter of optional main parameter.
             bursttime = None,
             # Optional subparameter of optional main parameter.
             curve = None,
             # Optional main parameter
             totalsize = None,
             # Optional main parameter
             attributes = None,
             # Optional main parameter
             associatewithqospolicy = None,
             # Optional main parameter
             qospolicyid = None,
             # Optional main parameter
             enablesnapmirrorreplication = None):
      """ModifyVolume enables you to modify settings on an existing volume. You can make modifications to one volume at a time and"""
      """changes take place immediately. If you do not specify QoS values when you modify a volume, they remain the same as before the modification. You can retrieve"""
      """default QoS values for a newly created volume by running the GetDefaultQoS method."""
      """When you need to increase the size of a volume that is being replicated, do so in the following order to prevent replication errors:"""
      """1. Increase the size of the "Replication Target" volume."""
      """2. Increase the size of the source or "Read / Write" volume."""
      """Both the target and source volumes must be of the same size."""
      """Note: If you change the "access" status to locked or target, all existing iSCSI connections are terminated."""
  
      
  
      cli_utils.establish_connection(ctx)
      
      
      
      
  
      qos = None
      if(miniops is not None or
         maxiops is not None or
         burstiops is not None or
         bursttime is not None or
         curve is not None or
         False):
          if not ( True):
              ctx.logger.error("""If you choose to provide , you must include all of the following parameters:
  """)
          kwargsDict = dict()
          kwargsDict["min_iops"] = miniops
          kwargsDict["max_iops"] = maxiops
          kwargsDict["burst_iops"] = burstiops
          kwargsDict["burst_time"] = bursttime
          kwargsDict["curve"] = curve
  
          qos = QoS(**kwargsDict)
      
      
  
      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)
      
      
      
      
  
      
  
      ctx.logger.info(""": """"""volumeid = """ + str(volumeid)+";" + """accountid = """+str(accountid)+";" + """access = """+str(access)+";" + """qos = """+str(qos)+";" + """totalsize = """+str(totalsize)+";" + """attributes = """+str(kwargsDict)+";" + """associatewithqospolicy = """+str(associatewithqospolicy)+";" + """qospolicyid = """+str(qospolicyid)+";" + """enablesnapmirrorreplication = """+str(enablesnapmirrorreplication)+""";"""+"")
      try:
          _ModifyVolumeResult = ctx.element.modify_volume(volume_id=volumeid, account_id=accountid, access=access, qos=qos, total_size=totalsize, attributes=kwargsDict, associate_with_qos_policy=associatewithqospolicy, qos_policy_id=qospolicyid, 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(_ModifyVolumeResult), indent=4))
          return
      else:
          cli_utils.print_result(_ModifyVolumeResult, ctx.logger, as_json=ctx.json, as_pickle=ctx.pickle, depth=ctx.depth, filter_tree=ctx.filter_tree)
code_tokens: def modify ( ctx , volumeid , accountid = None , access = None , miniops = None , maxiops = None , burstiops = None , bursttime = None , curve = None , totalsize = None , attributes = None , associatewithqospolicy = None , qospolicyid = None , enablesnapmirrorreplication = None ) : """changes take place immediately. If you do not specify QoS values when you modify a volume, they remain the same as before the modification. You can retrieve""" """default QoS values for a newly created volume by running the GetDefaultQoS method.""" """When you need to increase the size of a volume that is being replicated, do so in the following order to prevent replication errors:""" """1. Increase the size of the "Replication Target" volume.""" """2. Increase the size of the source or "Read / Write" volume.""" """Both the target and source volumes must be of the same size.""" """Note: If you change the "access" status to locked or target, all existing iSCSI connections are terminated.""" cli_utils . establish_connection ( ctx ) qos = None if ( miniops is not None or maxiops is not None or burstiops is not None or bursttime is not None or curve is not None or False ) : if not ( True ) : ctx . logger . error ( """If you choose to provide , you must include all of the following parameters:
  """ ) kwargsDict = dict ( ) kwargsDict [ "min_iops" ] = miniops kwargsDict [ "max_iops" ] = maxiops kwargsDict [ "burst_iops" ] = burstiops kwargsDict [ "burst_time" ] = bursttime kwargsDict [ "curve" ] = curve qos = QoS ( ** kwargsDict ) 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 ) ctx . logger . info ( """: """ """volumeid = """ + str ( volumeid ) + ";" + """accountid = """ + str ( accountid ) + ";" + """access = """ + str ( access ) + ";" + """qos = """ + str ( qos ) + ";" + """totalsize = """ + str ( totalsize ) + ";" + """attributes = """ + str ( kwargsDict ) + ";" + """associatewithqospolicy = """ + str ( associatewithqospolicy ) + ";" + """qospolicyid = """ + str ( qospolicyid ) + ";" + """enablesnapmirrorreplication = """ + str ( enablesnapmirrorreplication ) + """;""" + "" ) try : _ModifyVolumeResult = ctx . element . modify_volume ( volume_id = volumeid , account_id = accountid , access = access , qos = qos , total_size = totalsize , attributes = kwargsDict , associate_with_qos_policy = associatewithqospolicy , qos_policy_id = qospolicyid , 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 ( _ModifyVolumeResult ) , indent = 4 ) ) return else : cli_utils . print_result ( _ModifyVolumeResult , ctx . logger , as_json = ctx . json , as_pickle = ctx . pickle , depth = ctx . depth , filter_tree = ctx . filter_tree )
short_docstring: ModifyVolume enables you to modify settings on an existing volume.
short_docstring_tokens: ModifyVolume enables you to modify settings on an existing volume .
comment: # Mandatory main parameter$SEP$# Optional main parameter$SEP$# Optional main parameter$SEP$# Optional subparameter of optional main parameter.$SEP$# Optional subparameter of optional main parameter.$SEP$# Optional subparameter of optional main parameter.$SEP$# Optional subparameter of optional main parameter.$SEP$# Optional subparameter of optional main parameter.$SEP$# Optional main parameter$SEP$# Optional main parameter$SEP$# Optional main parameter$SEP$# Optional main parameter$SEP$# Optional main parameter$SEP$"""ModifyVolume enables you to modify settings on an existing volume. You can make modifications to one volume at a time and"""$SEP$"""changes take place immediately. If you do not specify QoS values when you modify a volume, they remain the same as before the modification. You can retrieve"""$SEP$"""default QoS values for a newly created volume by running the GetDefaultQoS method."""$SEP$"""When you need to increase the size of a volume that is being replicated, do so in the following order to prevent replication errors:"""$SEP$"""1. Increase the size of the "Replication Target" volume."""$SEP$"""2. Increase the size of the source or "Read / Write" volume."""$SEP$"""Both the target and source volumes must be of the same size."""$SEP$"""Note: If you change the "access" status to locked or target, all existing iSCSI connections are terminated."""