X-Git-Url: https://code.grnet.gr/git/ganeti-local/blobdiff_plain/6a28e02cbb101dcf47f2114ced2babf99e100e53..c2d3219b7e51320143f90ef557e93149eac4c94e:/htools/Ganeti/Types.hs diff --git a/htools/Ganeti/Types.hs b/htools/Ganeti/Types.hs index 4420d47..1b4e9f5 100644 --- a/htools/Ganeti/Types.hs +++ b/htools/Ganeti/Types.hs @@ -53,12 +53,16 @@ module Ganeti.Types , MigrationMode(..) , VerifyOptionalChecks(..) , DdmSimple(..) + , DdmFull(..) , CVErrorCode(..) , cVErrorCodeToRaw , Hypervisor(..) , OobCommand(..) , StorageType(..) , NodeEvacMode(..) + , FileDriver(..) + , InstCreateMode(..) + , RebootType(..) ) where import qualified Text.JSON as JSON @@ -215,6 +219,14 @@ $(THH.declareSADT "DdmSimple" ]) $(THH.makeJSONInstance ''DdmSimple) +-- | Dynamic device modification, all operations version. +$(THH.declareSADT "DdmFull" + [ ("DdmFullAdd", 'C.ddmAdd) + , ("DdmFullRemove", 'C.ddmRemove) + , ("DdmFullModify", 'C.ddmModify) + ]) +$(THH.makeJSONInstance ''DdmFull) + -- | Hypervisor type definitions. $(THH.declareSADT "Hypervisor" [ ( "Kvm", 'C.htKvm ) @@ -251,3 +263,26 @@ $(THH.declareSADT "NodeEvacMode" , ("NEvacAll", 'C.iallocatorNevacAll) ]) $(THH.makeJSONInstance ''NodeEvacMode) + +-- | The file driver type. +$(THH.declareSADT "FileDriver" + [ ("FileLoop", 'C.fdLoop) + , ("FileBlktap", 'C.fdBlktap) + ]) +$(THH.makeJSONInstance ''FileDriver) + +-- | The instance create mode. +$(THH.declareSADT "InstCreateMode" + [ ("InstCreate", 'C.instanceCreate) + , ("InstImport", 'C.instanceImport) + , ("InstRemoteImport", 'C.instanceRemoteImport) + ]) +$(THH.makeJSONInstance ''InstCreateMode) + +-- | Reboot type. +$(THH.declareSADT "RebootType" + [ ("RebootSoft", 'C.instanceRebootSoft) + , ("RebootHard", 'C.instanceRebootHard) + , ("RebootFull", 'C.instanceRebootFull) + ]) +$(THH.makeJSONInstance ''RebootType)