Revision 8fcfb767 htools/Ganeti/HTools/CLI.hs
b/htools/Ganeti/HTools/CLI.hs | ||
---|---|---|
38 | 38 |
-- * The options |
39 | 39 |
, oDataFile |
40 | 40 |
, oDiskMoves |
41 |
, oInstMoves |
|
41 | 42 |
, oDynuFile |
42 | 43 |
, oEvacMode |
43 | 44 |
, oExInst |
... | ... | |
94 | 95 |
data Options = Options |
95 | 96 |
{ optDataFile :: Maybe FilePath -- ^ Path to the cluster data file |
96 | 97 |
, optDiskMoves :: Bool -- ^ Allow disk moves |
98 |
, optInstMoves :: Bool -- ^ Allow instance moves |
|
97 | 99 |
, optDynuFile :: Maybe FilePath -- ^ Optional file with dynamic use data |
98 | 100 |
, optEvacMode :: Bool -- ^ Enable evacuation mode |
99 | 101 |
, optExInst :: [String] -- ^ Instances to be excluded |
... | ... | |
130 | 132 |
defaultOptions = Options |
131 | 133 |
{ optDataFile = Nothing |
132 | 134 |
, optDiskMoves = True |
135 |
, optInstMoves = True |
|
133 | 136 |
, optDynuFile = Nothing |
134 | 137 |
, optEvacMode = False |
135 | 138 |
, optExInst = [] |
... | ... | |
175 | 178 |
"disallow disk moves from the list of allowed instance changes,\ |
176 | 179 |
\ thus allowing only the 'cheap' failover/migrate operations" |
177 | 180 |
|
181 |
oInstMoves :: OptType |
|
182 |
oInstMoves = Option "" ["no-instance-moves"] |
|
183 |
(NoArg (\ opts -> Ok opts { optInstMoves = False})) |
|
184 |
"disallow instance (primary node) moves from the list of allowed,\ |
|
185 |
\ instance changes, thus allowing only slower, but sometimes\ |
|
186 |
\ safer, drbd secondary changes" |
|
187 |
|
|
178 | 188 |
oDynuFile :: OptType |
179 | 189 |
oDynuFile = Option "U" ["dynu-file"] |
180 | 190 |
(ReqArg (\ f opts -> Ok opts { optDynuFile = Just f }) "FILE") |
Also available in: Unified diff