Fix reference to vcs version in query server
authorJose A. Lopes <jabolopes@google.com>
Thu, 7 Nov 2013 08:56:34 +0000 (09:56 +0100)
committerJose A. Lopes <jabolopes@google.com>
Fri, 8 Nov 2013 16:57:19 +0000 (17:57 +0100)
Fix reference to vcs version in query server to take its value from
the Haskell constant in 'Ganeti.Version' instead of using the constant
generated from Python.

Signed-off-by: Jose A. Lopes <jabolopes@google.com>
Reviewed-by: Klaus Aehlig <aehlig@google.com>

src/Ganeti/Query/Server.hs

index e28c6aa..20ccc4c 100644 (file)
@@ -59,6 +59,7 @@ import qualified Ganeti.Query.Cluster as QCluster
 import Ganeti.Query.Query
 import Ganeti.Query.Filter (makeSimpleFilter)
 import Ganeti.Types
+import qualified Ganeti.Version as Version
 
 -- | Helper for classic queries.
 handleClassicQuery :: ConfigData      -- ^ Cluster config
@@ -102,7 +103,7 @@ handleCall cdata QueryClusterInfo =
                                  Set.toList . ConstantUtils.unFrozenSet $
                                  C.osApiVersions)
             , ("export_version", showJSON C.exportVersion)
-            , ("vcs_version", showJSON C.vcsVersion)
+            , ("vcs_version", showJSON Version.version)
             , ("architecture", showJSON arch_tuple)
             , ("name", showJSON $ clusterClusterName cluster)
             , ("master", showJSON (case master of