Revision d752eb39 hspace.hs
b/hspace.hs | ||
---|---|---|
56 | 56 |
, optOffline :: [String] -- ^ Names of offline nodes |
57 | 57 |
, optIMem :: Int -- ^ Instance memory |
58 | 58 |
, optIDsk :: Int -- ^ Instance disk |
59 |
, optIVCPUs :: Int -- ^ Instance VCPUs |
|
59 | 60 |
, optINodes :: Int -- ^ Nodes required for an instance |
60 | 61 |
, optShowVer :: Bool -- ^ Just show the program version |
61 | 62 |
, optShowHelp :: Bool -- ^ Just show the help |
... | ... | |
86 | 87 |
, optOffline = [] |
87 | 88 |
, optIMem = 4096 |
88 | 89 |
, optIDsk = 102400 |
90 |
, optIVCPUs = 1 |
|
89 | 91 |
, optINodes = 2 |
90 | 92 |
, optShowVer = False |
91 | 93 |
, optShowHelp = False |
... | ... | |
121 | 123 |
, Option [] ["disk"] |
122 | 124 |
(ReqArg (\ d opts -> opts { optIDsk = read d }) "DISK") |
123 | 125 |
"disk size for instances" |
126 |
, Option [] ["vcpus"] |
|
127 |
(ReqArg (\ p opts -> opts { optIVCPUs = read p }) "NUM") |
|
128 |
"number of virtual cpus for instances" |
|
124 | 129 |
, Option [] ["req-nodes"] |
125 | 130 |
(ReqArg (\ n opts -> opts { optINodes = read n }) "NODES") |
126 | 131 |
"number of nodes for the new instances (1=plain, 2=mirrored)" |
... | ... | |
236 | 241 |
|
237 | 242 |
let nmlen = Container.maxNameLen nl |
238 | 243 |
newinst = Instance.create "new" (optIMem opts) (optIDsk opts) |
239 |
"ADMIN_down" (-1) (-1) |
|
244 |
(optIVCPUs opts) "ADMIN_down" (-1) (-1)
|
|
240 | 245 |
|
241 | 246 |
let (fin_nl, ixes) = iterateDepth nl il newinst req_nodes [] |
242 | 247 |
allocs = length ixes |
Also available in: Unified diff