github.com/emc-advanced-dev/unik@v0.0.0-20190717152701-a58d3e8e33b7/pkg/providers/vsphere/list_volumes.go (about)

     1  package vsphere
     2  
     3  import (
     4  	"github.com/solo-io/unik/pkg/types"
     5  )
     6  
     7  func (p *VsphereProvider) ListVolumes() ([]*types.Volume, error) {
     8  	volumes := []*types.Volume{}
     9  	for _, volume := range p.state.GetVolumes() {
    10  		volumes = append(volumes, volume)
    11  	}
    12  	return volumes, nil
    13  }