Show the auto_balance flag in the instance listing
authorIustin Pop <iustin@google.com>
Thu, 7 Apr 2011 15:00:32 +0000 (17:00 +0200)
committerIustin Pop <iustin@google.com>
Thu, 14 Apr 2011 08:33:41 +0000 (10:33 +0200)
Signed-off-by: Iustin Pop <iustin@google.com>
Reviewed-by: Adeodato Simo <dato@google.com>

htools/Ganeti/HTools/Cluster.hs

index 4ad82af..48e4b6a 100644 (file)
@@ -1010,6 +1010,7 @@ printInsts nl il =
                         in if sdx == Node.noSecondary
                            then  ""
                            else Container.nameOf nl sdx
+                      , if Instance.auto_balance inst then "Y" else "N"
                       , printf "%3d" $ Instance.vcpus inst
                       , printf "%5d" $ Instance.mem inst
                       , printf "%5d" $ Instance.dsk inst `div` 1024
@@ -1019,9 +1020,9 @@ printInsts nl il =
                       , printf "%5.3f" lN
                       ]
             where DynUtil lC lM lD lN = Instance.util inst
-        header = [ "F", "Name", "Pri_node", "Sec_node", "vcpu", "mem"
-                 , "dsk", "lCpu", "lMem", "lDsk", "lNet" ]
-        isnum = False:False:False:False:repeat True
+        header = [ "F", "Name", "Pri_node", "Sec_node", "Auto_bal"
+                 , "vcpu", "mem" , "dsk", "lCpu", "lMem", "lDsk", "lNet" ]
+        isnum = False:False:False:False:False:repeat True
     in unlines . map ((:) ' ' . intercalate " ") $
        formatTable (header:map helper sil) isnum