Revision 2ba39b8f lib/rapi/client.py

b/lib/rapi/client.py
1 1
#
2 2
#
3 3

  
4
# Copyright (C) 2010 Google Inc.
4
# Copyright (C) 2010, 2011 Google Inc.
5 5
#
6 6
# This program is free software; you can redistribute it and/or modify
7 7
# it under the terms of the GNU General Public License as published by
......
908 908
                             ("/%s/instances/%s/reboot" %
909 909
                              (GANETI_RAPI_VERSION, instance)), query, None)
910 910

  
911
  def ShutdownInstance(self, instance, dry_run=False):
911
  def ShutdownInstance(self, instance, dry_run=False, no_remember=False):
912 912
    """Shuts down an instance.
913 913

  
914 914
    @type instance: str
915 915
    @param instance: the instance to shut down
916 916
    @type dry_run: bool
917 917
    @param dry_run: whether to perform a dry run
918
    @type no_remember: bool
919
    @param no_remember: if true, will not record the state change
918 920

  
919 921
    """
920 922
    query = []
921 923
    if dry_run:
922 924
      query.append(("dry-run", 1))
925
    if no_remember:
926
      query.append(("no-remember", 1))
923 927

  
924 928
    return self._SendRequest(HTTP_PUT,
925 929
                             ("/%s/instances/%s/shutdown" %
926 930
                              (GANETI_RAPI_VERSION, instance)), query, None)
927 931

  
928
  def StartupInstance(self, instance, dry_run=False):
932
  def StartupInstance(self, instance, dry_run=False, no_remember=False):
929 933
    """Starts up an instance.
930 934

  
931 935
    @type instance: str
932 936
    @param instance: the instance to start up
933 937
    @type dry_run: bool
934 938
    @param dry_run: whether to perform a dry run
939
    @type no_remember: bool
940
    @param no_remember: if true, will not record the state change
935 941

  
936 942
    """
937 943
    query = []
938 944
    if dry_run:
939 945
      query.append(("dry-run", 1))
946
    if no_remember:
947
      query.append(("no-remember", 1))
940 948

  
941 949
    return self._SendRequest(HTTP_PUT,
942 950
                             ("/%s/instances/%s/startup" %

Also available in: Unified diff