From a5ec6d88a435c14b732b319bd1bb18590a17bd69 Mon Sep 17 00:00:00 2001 From: Michele Tartara <mtartara@google.com> Date: Thu, 28 Mar 2013 09:14:46 +0000 Subject: [PATCH] Update JSON serialization for "category" Change the JSON serialization for the "category" field of data collectors, in accordance to the latest version of the design document. Signed-off-by: Michele Tartara <mtartara@google.com> Reviewed-by: Helga Velroyen <helgav@google.com> --- src/Ganeti/DataCollectors/Types.hs | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/Ganeti/DataCollectors/Types.hs b/src/Ganeti/DataCollectors/Types.hs index 8a119ab86..06263638f 100644 --- a/src/Ganeti/DataCollectors/Types.hs +++ b/src/Ganeti/DataCollectors/Types.hs @@ -36,6 +36,7 @@ module Ganeti.DataCollectors.Types , buildReport ) where +import Data.Char import Text.JSON import Ganeti.Constants as C @@ -48,7 +49,7 @@ data DCCategory = DCInstance | DCStorage | DCDaemon | DCHypervisor -- | The JSON instance for DCCategory. instance JSON DCCategory where - showJSON = showJSON . show + showJSON = showJSON . map toLower . drop 2 . show readJSON = error "JSON read instance not implemented for type DCCategory" -- GitLab