Revision dfe40bf8

b/lib/rapi/client.py
831 831
    return self._SendRequest(HTTP_POST, "/%s/instances" % GANETI_RAPI_VERSION,
832 832
                             query, body)
833 833

  
834
  def DeleteInstance(self, instance, dry_run=False):
834
  def DeleteInstance(self, instance, dry_run=False, **kwargs):
835 835
    """Deletes an instance.
836 836

  
837 837
    @type instance: str
......
842 842

  
843 843
    """
844 844
    query = []
845
    body = kwargs
846

  
845 847
    _AppendDryRunIf(query, dry_run)
846 848

  
847 849
    return self._SendRequest(HTTP_DELETE,
848 850
                             ("/%s/instances/%s" %
849
                              (GANETI_RAPI_VERSION, instance)), query, None)
851
                              (GANETI_RAPI_VERSION, instance)), query, body)
850 852

  
851 853
  def ModifyInstance(self, instance, **kwargs):
852 854
    """Modifies an instance.
......
1001 1003
                              (GANETI_RAPI_VERSION, instance)), query, None)
1002 1004

  
1003 1005
  def RebootInstance(self, instance, reboot_type=None, ignore_secondaries=None,
1004
                     dry_run=False, reason=None):
1006
                     dry_run=False, reason=None, **kwargs):
1005 1007
    """Reboots an instance.
1006 1008

  
1007 1009
    @type instance: str
......
1020 1022

  
1021 1023
    """
1022 1024
    query = []
1025
    body = kwargs
1026

  
1023 1027
    _AppendDryRunIf(query, dry_run)
1024 1028
    _AppendIf(query, reboot_type, ("type", reboot_type))
1025 1029
    _AppendIf(query, ignore_secondaries is not None,
......
1028 1032

  
1029 1033
    return self._SendRequest(HTTP_POST,
1030 1034
                             ("/%s/instances/%s/reboot" %
1031
                              (GANETI_RAPI_VERSION, instance)), query, None)
1035
                              (GANETI_RAPI_VERSION, instance)), query, body)
1032 1036

  
1033 1037
  def ShutdownInstance(self, instance, dry_run=False, no_remember=False,
1034 1038
                       reason=None, **kwargs):
b/lib/rapi/rlib2.py
995 995

  
996 996
    """
997 997
    assert len(self.items) == 1
998
    return ({}, {
998
    return (self.request_body, {
999 999
      "instance_name": self.items[0],
1000 1000
      "ignore_failures": False,
1001 1001
      "dry_run": self.dryRun(),
......
1034 1034
    ignore_secondaries=[False|True] parameters.
1035 1035

  
1036 1036
    """
1037
    return ({}, {
1037
    return (self.request_body, {
1038 1038
      "instance_name": self.items[0],
1039 1039
      "reboot_type":
1040 1040
        self.queryargs.get("type", [constants.INSTANCE_REBOOT_HARD])[0],

Also available in: Unified diff