Rightname confd's HMAC key
[ganeti-local] / scripts / gnt-backup
index 4d65648..f5598cb 100755 (executable)
@@ -20,8 +20,9 @@
 
 """Backup related commands"""
 
-# pylint: disable-msg=W0401,W0614,C0103
+# pylint: disable-msg=W0401,W0613,W0614,C0103
 # W0401: Wildcard import ganeti.cli
+# W0613: Unused argument, since all functions follow the same API
 # W0614: Unused import %s from wildcard import (since we need cli)
 # C0103: Invalid name gnt-backup
 
@@ -30,8 +31,6 @@ import sys
 from ganeti.cli import *
 from ganeti import opcodes
 from ganeti import constants
-from ganeti import errors
-from ganeti import utils
 
 
 _VALUE_TRUE = "true"
@@ -77,11 +76,10 @@ def ExportInstance(opts, args):
                                 shutdown=opts.shutdown,
                                 shutdown_timeout=opts.shutdown_timeout)
 
-  fin_resu, dlist = SubmitOpCode(op)
+  fin_resu, dlist = SubmitOpCode(op, opts=opts)
   if not isinstance(dlist, list):
     ToStderr("Cannot parse execution results")
     return 1
-  tot_dsk = len(dlist)
   # TODO: handle diskless instances
   if dlist.count(False) == 0:
     # all OK
@@ -119,10 +117,9 @@ def RemoveExport(opts, args):
   @return: the desired exit code
 
   """
-  instance = args[0]
   op = opcodes.OpRemoveExport(instance_name=args[0])
 
-  SubmitOpCode(op)
+  SubmitOpCode(op, opts=opts)
   return 0