godep: update vmware/govmomi
This commit is contained in:
17
vendor/github.com/vmware/govmomi/object/datastore.go
generated
vendored
17
vendor/github.com/vmware/govmomi/object/datastore.go
generated
vendored
@@ -284,7 +284,7 @@ func (d Datastore) Upload(ctx context.Context, f io.Reader, path string, param *
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
return d.Client().Upload(f, u, p)
|
||||
return d.Client().Upload(ctx, f, u, p)
|
||||
}
|
||||
|
||||
// UploadFile via soap.Upload with an http service ticket
|
||||
@@ -293,7 +293,7 @@ func (d Datastore) UploadFile(ctx context.Context, file string, path string, par
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
return d.Client().UploadFile(file, u, p)
|
||||
return d.Client().UploadFile(ctx, file, u, p)
|
||||
}
|
||||
|
||||
// Download via soap.Download with an http service ticket
|
||||
@@ -302,7 +302,7 @@ func (d Datastore) Download(ctx context.Context, path string, param *soap.Downlo
|
||||
if err != nil {
|
||||
return nil, 0, err
|
||||
}
|
||||
return d.Client().Download(u, p)
|
||||
return d.Client().Download(ctx, u, p)
|
||||
}
|
||||
|
||||
// DownloadFile via soap.Download with an http service ticket
|
||||
@@ -311,7 +311,7 @@ func (d Datastore) DownloadFile(ctx context.Context, path string, file string, p
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
return d.Client().DownloadFile(file, u, p)
|
||||
return d.Client().DownloadFile(ctx, file, u, p)
|
||||
}
|
||||
|
||||
// AttachedHosts returns hosts that have this Datastore attached, accessible and writable.
|
||||
@@ -406,12 +406,9 @@ func (d Datastore) Stat(ctx context.Context, file string) (types.BaseFileInfo, e
|
||||
|
||||
info, err := task.WaitForResult(ctx, nil)
|
||||
if err != nil {
|
||||
if info == nil || info.Error != nil {
|
||||
_, ok := info.Error.Fault.(*types.FileNotFound)
|
||||
if ok {
|
||||
// FileNotFound means the base path doesn't exist.
|
||||
return nil, DatastoreNoSuchDirectoryError{"stat", dsPath}
|
||||
}
|
||||
if types.IsFileNotFound(err) {
|
||||
// FileNotFound means the base path doesn't exist.
|
||||
return nil, DatastoreNoSuchDirectoryError{"stat", dsPath}
|
||||
}
|
||||
|
||||
return nil, err
|
||||
|
||||
Reference in New Issue
Block a user