Revision 6111e296 htools/Ganeti/OpCodes.hs

b/htools/Ganeti/OpCodes.hs
62 62
            deriving (Show, Read, Eq)
63 63

  
64 64

  
65
-- | Computes the OP_ID for an OpCode.
66
opID :: OpCode -> String
67
opID (OpTestDelay _ _ _) = "OP_TEST_DELAY"
68
opID (OpInstanceReplaceDisks _ _ _ _ _) = "OP_INSTANCE_REPLACE_DISKS"
69
opID (OpInstanceFailover {}) = "OP_INSTANCE_FAILOVER"
70
opID (OpInstanceMigrate  {}) = "OP_INSTANCE_MIGRATE"
65
$(THH.genOpID ''OpCode "opID")
71 66

  
72 67
-- | Loads an OpCode from the JSON serialised form.
73 68
loadOpCode :: JSValue -> J.Result OpCode

Also available in: Unified diff