{-
-Copyright (C) 2009 Google Inc.
+Copyright (C) 2009, 2010 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
-- | Currently supported Luxi operations.
data LuxiOp = QueryInstances [String] [String] Bool
| QueryNodes [String] [String] Bool
+ | QueryGroups [String] [String] Bool
| QueryJobs [Int] [String]
| QueryExports [String] Bool
| QueryConfigValues [String]
-- | The serialisation of LuxiOps into strings in messages.
strOfOp :: LuxiOp -> String
strOfOp QueryNodes {} = "QueryNodes"
+strOfOp QueryGroups {} = "QueryGroups"
strOfOp QueryInstances {} = "QueryInstances"
strOfOp QueryJobs {} = "QueryJobs"
strOfOp QueryExports {} = "QueryExports"
-- | Compute the serialized form of a Luxi operation
opToArgs :: LuxiOp -> JSValue
opToArgs (QueryNodes names fields lock) = J.showJSON (names, fields, lock)
+opToArgs (QueryGroups names fields lock) = J.showJSON (names, fields, lock)
opToArgs (QueryInstances names fields lock) = J.showJSON (names, fields, lock)
opToArgs (QueryJobs ids fields) = J.showJSON (map show ids, fields)
opToArgs (QueryExports nodes lock) = J.showJSON (nodes, lock)