diff options
Diffstat (limited to 'weed/topology/topology_info.go')
| -rw-r--r-- | weed/topology/topology_info.go | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/weed/topology/topology_info.go b/weed/topology/topology_info.go index 120ae0d42..89f9097f6 100644 --- a/weed/topology/topology_info.go +++ b/weed/topology/topology_info.go @@ -42,6 +42,15 @@ func (t *Topology) ToInfo() (info TopologyInfo) { return } +func (t *Topology) ListVolumeLyauts() (volumeLayouts []*VolumeLayout) { + for _, col := range t.collectionMap.Items() { + for _, volumeLayout := range col.(*Collection).storageType2VolumeLayout.Items() { + volumeLayouts = append(volumeLayouts, volumeLayout.(*VolumeLayout)) + } + } + return volumeLayouts +} + func (t *Topology) ToVolumeMap() interface{} { m := make(map[string]interface{}) m["Max"] = t.diskUsages.GetMaxVolumeCount() |
