packer-cn/driver/datastore.go

22 lines
334 B
Go
Raw Normal View History

2017-08-23 20:06:50 -04:00
package driver
import (
"github.com/vmware/govmomi/object"
)
type Datastore struct {
ds *object.Datastore
driver *Driver
}
func (d *Driver) FindDatastore(name string) (*Datastore, error) {
ds, err := d.finder.Datastore(d.ctx, name)
if err != nil {
return nil, err
}
return &Datastore{
ds: ds,
driver: d,
}, nil
}