Skip to content
Snippets Groups Projects
Commit fae980e5 authored by Iustin Pop's avatar Iustin Pop
Browse files

Replace hardcoded constants with Constants.hs names


Now that luxi.py constants are exported, we can use them for more
consistency.

Signed-off-by: default avatarIustin Pop <iustin@google.com>
Reviewed-by: default avatarRené Nussbaumer <rn@google.com>
parent f11e524b
No related branches found
No related tags found
No related merge requests found
...@@ -6,7 +6,7 @@ ...@@ -6,7 +6,7 @@
{- {-
Copyright (C) 2009, 2010, 2011 Google Inc. Copyright (C) 2009, 2010, 2011, 2012 Google Inc.
This program is free software; you can redistribute it and/or modify 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 it under the terms of the GNU General Public License as published by
...@@ -77,69 +77,69 @@ $(makeJSONInstance ''QrViaLuxi) ...@@ -77,69 +77,69 @@ $(makeJSONInstance ''QrViaLuxi)
-- | Currently supported Luxi operations and JSON serialization. -- | Currently supported Luxi operations and JSON serialization.
$(genLuxiOp "LuxiOp" $(genLuxiOp "LuxiOp"
[("Query" , [(luxiReqQuery,
[ ("what", [t| QrViaLuxi |], [| id |]) [ ("what", [t| QrViaLuxi |], [| id |])
, ("fields", [t| [String] |], [| id |]) , ("fields", [t| [String] |], [| id |])
, ("qfilter", [t| () |], [| const JSNull |]) , ("qfilter", [t| () |], [| const JSNull |])
]) ])
, ("QueryNodes", , (luxiReqQueryNodes,
[ ("names", [t| [String] |], [| id |]) [ ("names", [t| [String] |], [| id |])
, ("fields", [t| [String] |], [| id |]) , ("fields", [t| [String] |], [| id |])
, ("lock", [t| Bool |], [| id |]) , ("lock", [t| Bool |], [| id |])
]) ])
, ("QueryGroups", , (luxiReqQueryGroups,
[ ("names", [t| [String] |], [| id |]) [ ("names", [t| [String] |], [| id |])
, ("fields", [t| [String] |], [| id |]) , ("fields", [t| [String] |], [| id |])
, ("lock", [t| Bool |], [| id |]) , ("lock", [t| Bool |], [| id |])
]) ])
, ("QueryInstances", , (luxiReqQueryInstances,
[ ("names", [t| [String] |], [| id |]) [ ("names", [t| [String] |], [| id |])
, ("fields", [t| [String] |], [| id |]) , ("fields", [t| [String] |], [| id |])
, ("lock", [t| Bool |], [| id |]) , ("lock", [t| Bool |], [| id |])
]) ])
, ("QueryJobs", , (luxiReqQueryJobs,
[ ("ids", [t| [Int] |], [| map show |]) [ ("ids", [t| [Int] |], [| map show |])
, ("fields", [t| [String] |], [| id |]) , ("fields", [t| [String] |], [| id |])
]) ])
, ("QueryExports", , (luxiReqQueryExports,
[ ("nodes", [t| [String] |], [| id |]) [ ("nodes", [t| [String] |], [| id |])
, ("lock", [t| Bool |], [| id |]) , ("lock", [t| Bool |], [| id |])
]) ])
, ("QueryConfigValues", , (luxiReqQueryConfigValues,
[ ("fields", [t| [String] |], [| id |]) ] [ ("fields", [t| [String] |], [| id |]) ]
) )
, ("QueryClusterInfo", []) , (luxiReqQueryClusterInfo, [])
, ("QueryTags", , (luxiReqQueryTags,
[ ("kind", [t| String |], [| id |]) [ ("kind", [t| String |], [| id |])
, ("name", [t| String |], [| id |]) , ("name", [t| String |], [| id |])
]) ])
, ("SubmitJob", , (luxiReqSubmitJob,
[ ("job", [t| [OpCode] |], [| id |]) ] [ ("job", [t| [OpCode] |], [| id |]) ]
) )
, ("SubmitManyJobs", , (luxiReqSubmitManyJobs,
[ ("ops", [t| [[OpCode]] |], [| id |]) ] [ ("ops", [t| [[OpCode]] |], [| id |]) ]
) )
, ("WaitForJobChange", , (luxiReqWaitForJobChange,
[ ("job", [t| Int |], [| id |]) [ ("job", [t| Int |], [| id |])
, ("fields", [t| [String]|], [| id |]) , ("fields", [t| [String]|], [| id |])
, ("prev_job", [t| JSValue |], [| id |]) , ("prev_job", [t| JSValue |], [| id |])
, ("prev_log", [t| JSValue |], [| id |]) , ("prev_log", [t| JSValue |], [| id |])
, ("tmout", [t| Int |], [| id |]) , ("tmout", [t| Int |], [| id |])
]) ])
, ("ArchiveJob", , (luxiReqArchiveJob,
[ ("job", [t| Int |], [| show |]) ] [ ("job", [t| Int |], [| show |]) ]
) )
, ("AutoArchiveJobs", , (luxiReqAutoArchiveJobs,
[ ("age", [t| Int |], [| id |]) [ ("age", [t| Int |], [| id |])
, ("tmout", [t| Int |], [| id |]) , ("tmout", [t| Int |], [| id |])
]) ])
, ("CancelJob", , (luxiReqCancelJob,
[ ("job", [t| Int |], [| show |]) ] [ ("job", [t| Int |], [| show |]) ]
) )
, ("SetDrainFlag", , (luxiReqSetDrainFlag,
[ ("flag", [t| Bool |], [| id |]) ] [ ("flag", [t| Bool |], [| id |]) ]
) )
, ("SetWatcherPause", , (luxiReqSetWatcherPause,
[ ("duration", [t| Double |], [| id |]) ] [ ("duration", [t| Double |], [| id |]) ]
) )
]) ])
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment