Revision a52978c7 lib/rapi/client.py

b/lib/rapi/client.py
753 753
                             ("/%s/instances/%s/deactivate-disks" %
754 754
                              (GANETI_RAPI_VERSION, instance)), None, None)
755 755

  
756
  def RecreateInstanceDisks(self, instance, disks=None, nodes=None):
757
    """Recreate an instance's disks.
758

  
759
    @type instance: string
760
    @param instance: Instance name
761
    @type disks: list of int
762
    @param disks: List of disk indexes
763
    @type nodes: list of string
764
    @param nodes: New instance nodes, if relocation is desired
765
    @rtype: string
766
    @return: job id
767

  
768
    """
769
    body = {}
770

  
771
    if disks is not None:
772
      body["disks"] = disks
773

  
774
    if nodes is not None:
775
      body["nodes"] = nodes
776

  
777
    return self._SendRequest(HTTP_POST,
778
                             ("/%s/instances/%s/recreate-disks" %
779
                              (GANETI_RAPI_VERSION, instance)), None, body)
780

  
756 781
  def GrowInstanceDisk(self, instance, disk, amount, wait_for_sync=None):
757 782
    """Grows a disk of an instance.
758 783

  

Also available in: Unified diff