Revision fcee9675 lib/rapi/client.py

b/lib/rapi/client.py
820 820
                             ("/%s/instances/%s/startup" %
821 821
                              (GANETI_RAPI_VERSION, instance)), query, None)
822 822

  
823
  def ReinstallInstance(self, instance, os, no_startup=False):
823
  def ReinstallInstance(self, instance, os=None, no_startup=False):
824 824
    """Reinstalls an instance.
825 825

  
826 826
    @type instance: str
827
    @param instance: the instance to reinstall
828
    @type os: str
829
    @param os: the os to reinstall
827
    @param instance: The instance to reinstall
828
    @type os: str or None
829
    @param os: The operating system to reinstall. If None, the instance's
830
        current operating system will be installed again
830 831
    @type no_startup: bool
831
    @param no_startup: whether to start the instance automatically
832
    @param no_startup: Whether to start the instance automatically
832 833

  
833 834
    """
834
    query = [("os", os)]
835
    query = []
836
    if os:
837
      query.append(("os", os))
835 838
    if no_startup:
836 839
      query.append(("nostartup", 1))
837 840
    return self._SendRequest(HTTP_POST,

Also available in: Unified diff