[Pkg-ganeti-devel] [ganeti] 19/165: Add an option for a reason trail entry

Apollon Oikonomopoulos apoikos at moszumanska.debian.org
Tue Aug 11 13:53:09 UTC 2015


This is an automated email from the git hooks/post-receive script.

apoikos pushed a commit to branch master
in repository ganeti.

commit 2a91e3c58cd0e4ae873bcc3ba2a60a8c97239201
Author: Klaus Aehlig <aehlig at google.com>
Date:   Fri Feb 6 12:06:58 2015 +0100

    Add an option for a reason trail entry
    
    ...to be added by htools when submitting jobs via luxi.
    
    Signed-off-by: Klaus Aehlig <aehlig at google.com>
    Reviewed-by: Hrvoje Ribicic <riba at google.com>
---
 src/Ganeti/HTools/CLI.hs | 11 +++++++++++
 1 file changed, 11 insertions(+)

diff --git a/src/Ganeti/HTools/CLI.hs b/src/Ganeti/HTools/CLI.hs
index d849252..30cfd9c 100644
--- a/src/Ganeti/HTools/CLI.hs
+++ b/src/Ganeti/HTools/CLI.hs
@@ -100,6 +100,7 @@ module Ganeti.HTools.CLI
   , oPrintNodes
   , oQuiet
   , oRapiMaster
+  , oReason
   , oSaveCluster
   , oSelInst
   , oShowHelp
@@ -178,6 +179,8 @@ data Options = Options
   , optOneStepOnly :: Bool           -- ^ Only do the first step
   , optOutPath     :: FilePath       -- ^ Path to the output directory
   , optPrintMoves  :: Bool           -- ^ Whether to show the instance moves
+  , optReason      :: Maybe String   -- ^ The reason to be passed when
+                                     -- submitting jobs
   , optSaveCluster :: Maybe FilePath -- ^ Save cluster state to this file
   , optShowCmds    :: Maybe FilePath -- ^ Whether to show the command list
   , optShowHelp    :: Bool           -- ^ Just show the help
@@ -242,6 +245,7 @@ defaultOptions  = Options
   , optOneStepOnly = False
   , optOutPath     = "."
   , optPrintMoves  = False
+  , optReason      = Nothing
   , optSaveCluster = Nothing
   , optShowCmds    = Nothing
   , optShowHelp    = False
@@ -440,6 +444,13 @@ oExecJobs =
    \ it for data gathering)",
    OptComplNone)
 
+oReason :: OptType
+oReason =
+  (Option "" ["reason"]
+   (ReqArg (\ f opts -> Ok opts { optReason = Just f }) "REASON")
+   "The reason to pass to the submitted jobs",
+   OptComplNone)
+
 oForce :: OptType
 oForce =
   (Option "f" ["force"]

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-ganeti/ganeti.git



More information about the Pkg-ganeti-devel mailing list