hypervisors: add hvparams to GetNodeInfo
[ganeti-local] / lib / client / gnt_os.py
index 890becc..f522633 100644 (file)
@@ -1,7 +1,7 @@
 #
 #
 
-# Copyright (C) 2006, 2007, 2010 Google Inc.
+# Copyright (C) 2006, 2007, 2010, 2013 Google Inc.
 #
 # This program is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
@@ -45,10 +45,6 @@ def ListOS(opts, args):
   op = opcodes.OpOsDiagnose(output_fields=["name", "variants"], names=[])
   result = SubmitOpCode(op, opts=opts)
 
-  if not result:
-    ToStderr("Can't get the OS list")
-    return 1
-
   if not opts.no_headers:
     headers = {"name": "Name"}
   else:
@@ -274,7 +270,7 @@ def ModifyOS(opts, args):
                                   osparams=osp,
                                   hidden_os=ohid,
                                   blacklisted_os=oblk)
-  SubmitOpCode(op, opts=opts)
+  SubmitOrSend(op, opts)
 
   return 0
 
@@ -293,7 +289,7 @@ commands = {
   "modify": (
     ModifyOS, ARGS_ONE_OS,
     [HVLIST_OPT, OSPARAMS_OPT, DRY_RUN_OPT, PRIORITY_OPT,
-     HID_OS_OPT, BLK_OS_OPT],
+     HID_OS_OPT, BLK_OS_OPT] + SUBMIT_OPTS,
     "", "Modify the OS parameters"),
   }