build(deps): bump github.com/vmware/govmomi from 0.26.1 to 0.27.4
Bumps [github.com/vmware/govmomi](https://github.com/vmware/govmomi) from 0.26.1 to 0.27.4. - [Release notes](https://github.com/vmware/govmomi/releases) - [Changelog](https://github.com/vmware/govmomi/blob/master/CHANGELOG.md) - [Commits](https://github.com/vmware/govmomi/compare/v0.26.1...v0.27.4) --- updated-dependencies: - dependency-name: github.com/vmware/govmomi dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] <support@github.com>
This commit is contained in:
parent
1ded72b4dc
commit
2ba68442d3
37 changed files with 1535 additions and 237 deletions
17
vendor/github.com/vmware/govmomi/view/container_view.go
generated
vendored
17
vendor/github.com/vmware/govmomi/view/container_view.go
generated
vendored
|
|
@ -126,3 +126,20 @@ func (v ContainerView) Find(ctx context.Context, kind []string, filter property.
|
|||
|
||||
return filter.MatchObjectContent(content), nil
|
||||
}
|
||||
|
||||
// FindAny returns object references for entities of type kind, matching any property the given filter.
|
||||
func (v ContainerView) FindAny(ctx context.Context, kind []string, filter property.Filter) ([]types.ManagedObjectReference, error) {
|
||||
if len(filter) == 0 {
|
||||
// Ensure we have at least 1 filter to avoid retrieving all properties.
|
||||
filter = property.Filter{"name": "*"}
|
||||
}
|
||||
|
||||
var content []types.ObjectContent
|
||||
|
||||
err := v.Retrieve(ctx, kind, filter.Keys(), &content)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
|
||||
return filter.MatchAnyObjectContent(content), nil
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue