Deprecate showing drive capacity and total free (#5976)

This addresses a situation that we shouldn't be
displaying Total/Free anymore, instead we should simply
show the total usage.
This commit is contained in:
Harshavardhana
2018-05-23 17:30:25 -07:00
committed by kannappanr
parent e6ec645035
commit 000e360196
15 changed files with 54 additions and 163 deletions

View File

@@ -173,19 +173,19 @@ func printObjectAPIMsg() {
// Get formatted disk/storage info message.
func getStorageInfoMsg(storageInfo StorageInfo) string {
msg := fmt.Sprintf("%s %s Free, %s Total", colorBlue("Drive Capacity:"),
humanize.IBytes(uint64(storageInfo.Free)),
humanize.IBytes(uint64(storageInfo.Total)))
var msg string
if storageInfo.Backend.Type == Erasure {
diskInfo := fmt.Sprintf(" %d Online, %d Offline. ", storageInfo.Backend.OnlineDisks, storageInfo.Backend.OfflineDisks)
msg += colorBlue("\nStatus:") + fmt.Sprintf(getFormatStr(len(diskInfo), 8), diskInfo)
msg += colorBlue("Status:") + fmt.Sprintf(getFormatStr(len(diskInfo), 8), diskInfo)
}
return msg
}
// Prints startup message of storage capacity and erasure information.
func printStorageInfo(storageInfo StorageInfo) {
logger.StartupMessage(getStorageInfoMsg(storageInfo) + "\n")
if msg := getStorageInfoMsg(storageInfo); msg != "" {
logger.StartupMessage(msg)
}
}
func printCacheStorageInfo(storageInfo StorageInfo) {