RAPI: Fix wrong check on instance shutdown
authorMichael Hanselmann <hansmi@google.com>
Thu, 22 Sep 2011 10:19:56 +0000 (12:19 +0200)
committerMichael Hanselmann <hansmi@google.com>
Thu, 22 Sep 2011 11:31:23 +0000 (13:31 +0200)
Commit 7fa310f6d84 (April 1st, 2011) converted the RAPI resource for
shutting down an instance to FillOpCode. Unfortunately it missed the
fact that the shutdown resource gets its parameters as query arguments.

Signed-off-by: Michael Hanselmann <hansmi@google.com>
Reviewed-by: RenĂ© Nussbaumer <rn@google.com>

lib/rapi/rlib2.py

index 9e9f2a1..0a958da 100644 (file)
@@ -922,8 +922,6 @@ class R_2_instances_name_shutdown(baserlib.R_Generic):
     @return: a job id
 
     """
-    baserlib.CheckType(self.request_body, dict, "Body contents")
-
     no_remember = bool(self._checkIntVariable("no_remember"))
     op = _ParseShutdownInstanceRequest(self.items[0], self.request_body,
                                        bool(self.dryRun()), no_remember)