From 3ff890a1258eb47476f8520536114c7be2ad022f Mon Sep 17 00:00:00 2001
From: Michele Tartara <mtartara@google.com>
Date: Thu, 25 Apr 2013 07:16:03 +0000
Subject: [PATCH] Add the reason trail type definition in Haskell

It will be added to the haskell definition of opcodes, to keep it aligned to
the python one, and it will be used for fetching the reason trail by the
instance status data collector.

Signed-off-by: Michele Tartara <mtartara@google.com>
Reviewed-by: Helga Velroyen <helgav@google.com>
---
 src/Ganeti/Types.hs | 8 ++++++++
 1 file changed, 8 insertions(+)

diff --git a/src/Ganeti/Types.hs b/src/Ganeti/Types.hs
index 6bd3ade4c..c0fa6bd51 100644
--- a/src/Ganeti/Types.hs
+++ b/src/Ganeti/Types.hs
@@ -92,6 +92,8 @@ module Ganeti.Types
   , opStatusToRaw
   , opStatusFromRaw
   , ELogType(..)
+  , ReasonElem
+  , ReasonTrail
   ) where
 
 import Control.Monad (liftM)
@@ -485,3 +487,9 @@ $(THH.declareSADT "ELogType"
   , ("ELogJqueueTest",   'C.elogJqueueTest)
   ])
 $(THH.makeJSONInstance ''ELogType)
+
+-- | Type of one element of a reason trail.
+type ReasonElem = (String, String, Integer)
+
+-- | Type representing a reason trail.
+type ReasonTrail = [ReasonElem]
-- 
GitLab