github.com/emc-advanced-dev/unik@v0.0.0-20190717152701-a58d3e8e33b7/pkg/providers/vsphere/list_instances.go (about) 1 package vsphere 2 3 import ( 4 "github.com/solo-io/unik/pkg/types" 5 ) 6 7 func (p *VsphereProvider) ListInstances() ([]*types.Instance, error) { 8 if len(p.state.GetInstances()) < 1 { 9 return []*types.Instance{}, nil 10 } 11 var instances []*types.Instance 12 for _, v := range p.state.GetInstances() { 13 instances = append(instances, v) 14 } 15 return instances, nil 16 }