, oPrintInsts
, oPrintCommands
, oOneline
- , oNodeFile
- , oInstFile
+ , oDataFile
, oRapiMaster
, oLuxiSocket
, oExecJobs
, oMinDisk
, oDiskMoves
, oDynuFile
+ , oExTags
, oShowVer
, oShowHelp
]
let oneline = optOneline opts
verbose = optVerbose opts
+ shownodes = optShowNodes opts
- (fixed_nl, il, csf) <- loadExternalData opts
+ (fixed_nl, il, ctags, csf) <- loadExternalData opts
let offline_names = optOffline opts
all_nodes = Container.elems fixed_nl
nl = Container.map (flip Node.setMdsk m_dsk . flip Node.setMcpu m_cpu)
nm
+ when (not oneline && verbose > 1) $
+ putStrLn $ "Loaded cluster tags: " ++ intercalate "," ctags
+
when (Container.size il == 0) $ do
(if oneline then putStrLn $ formatOneline 0 0 0
else printf "Cluster is empty, exiting.\n")
putStrLn "Initial instance map:"
putStrLn $ Cluster.printInsts nl il
- when (optShowNodes opts) $
+ when (isJust shownodes) $
do
putStrLn "Initial cluster status:"
- putStrLn $ Cluster.printNodes nl
+ putStrLn $ Cluster.printNodes nl (fromJust shownodes)
let ini_cv = Cluster.compCV nl
ini_tbl = Cluster.Table nl il ini_cv []
putStrLn "Final instance map:"
putStr $ Cluster.printInsts fin_nl fin_il
- when (optShowNodes opts) $
+ when (isJust shownodes) $
do
let ini_cs = Cluster.totalResources nl
fin_cs = Cluster.totalResources fin_nl
putStrLn ""
putStrLn "Final cluster status:"
- putStrLn $ Cluster.printNodes fin_nl
+ putStrLn $ Cluster.printNodes fin_nl (fromJust shownodes)
when (verbose > 3) $
do
printf "Original: mem=%d disk=%d\n"