Revision c4bb977b

b/htools/Ganeti/HTools/CLI.hs
38 38
    -- * The options
39 39
    , oDataFile
40 40
    , oDiskMoves
41
    , oSelInst
42
    , oInstMoves
41
    , oDiskTemplate
43 42
    , oDynuFile
44 43
    , oEvacMode
45 44
    , oExInst
......
50 49
    , oIMem
51 50
    , oINodes
52 51
    , oIVcpus
52
    , oInstMoves
53 53
    , oLuxiSocket
54 54
    , oMaxCpu
55 55
    , oMaxSolLength
......
69 69
    , oRapiMaster
70 70
    , oReplay
71 71
    , oSaveCluster
72
    , oSelInst
72 73
    , oShowHelp
73 74
    , oShowVer
74 75
    , oTieredSpec
......
104 105
    { optDataFile    :: Maybe FilePath -- ^ Path to the cluster data file
105 106
    , optDiskMoves   :: Bool           -- ^ Allow disk moves
106 107
    , optInstMoves   :: Bool           -- ^ Allow instance moves
108
    , optDiskTemplate :: DiskTemplate  -- ^ The requested disk template
107 109
    , optDynuFile    :: Maybe FilePath -- ^ Optional file with dynamic use data
108 110
    , optEvacMode    :: Bool           -- ^ Enable evacuation mode
109 111
    , optExInst      :: [String]       -- ^ Instances to be excluded
......
143 145
 { optDataFile    = Nothing
144 146
 , optDiskMoves   = True
145 147
 , optInstMoves   = True
148
 , optDiskTemplate = DTDrbd8
146 149
 , optDynuFile    = Nothing
147 150
 , optEvacMode    = False
148 151
 , optExInst      = []
......
192 195
             "disallow disk moves from the list of allowed instance changes,\
193 196
             \ thus allowing only the 'cheap' failover/migrate operations"
194 197

  
198
oDiskTemplate :: OptType
199
oDiskTemplate = Option "" ["disk-template"]
200
                (ReqArg (\ t opts -> do
201
                           dt <- dtFromString t
202
                           return $ opts { optDiskTemplate = dt }) "TEMPLATE")
203
                "select the desired disk template"
204

  
195 205
oSelInst :: OptType
196 206
oSelInst = Option "" ["select-instances"]
197 207
          (ReqArg (\ f opts -> Ok opts { optSelInst = sepSplit ',' f }) "INSTS")

Also available in: Unified diff