mirror of
https://github.com/pgsty/minio.git
synced 2026-07-20 12:40:24 +03:00
api: Add diskInfo as part of StatVol and ListVols. (#1349)
It is the bucket and volumes which needs to have this value rather than the DiskInfo API itself. Eventually this can be extended to show disk usage per Buckets/Volumes whenever we have that functionality. For now since buckets/volumes are thinly provisioned this is the right approach.
This commit is contained in:
committed by
Anand Babu (AB) Periasamy
parent
1284ecc6f2
commit
4cf73caf02
@@ -72,6 +72,8 @@ func (o objectAPI) GetBucketInfo(bucket string) (BucketInfo, *probe.Error) {
|
||||
return BucketInfo{
|
||||
Name: bucket,
|
||||
Created: vi.Created,
|
||||
Total: vi.Total,
|
||||
Free: vi.Free,
|
||||
}, nil
|
||||
}
|
||||
|
||||
@@ -91,6 +93,8 @@ func (o objectAPI) ListBuckets() ([]BucketInfo, *probe.Error) {
|
||||
bucketInfos = append(bucketInfos, BucketInfo{
|
||||
Name: vol.Name,
|
||||
Created: vol.Created,
|
||||
Total: vol.Total,
|
||||
Free: vol.Free,
|
||||
})
|
||||
}
|
||||
return bucketInfos, nil
|
||||
|
||||
Reference in New Issue
Block a user