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
10
vendor/github.com/vmware/govmomi/property/collector.go
generated
vendored
10
vendor/github.com/vmware/govmomi/property/collector.go
generated
vendored
|
|
@ -97,10 +97,16 @@ func (p *Collector) CreateFilter(ctx context.Context, req types.CreateFilter) er
|
|||
return nil
|
||||
}
|
||||
|
||||
func (p *Collector) WaitForUpdates(ctx context.Context, v string) (*types.UpdateSet, error) {
|
||||
func (p *Collector) WaitForUpdates(ctx context.Context, version string, opts ...*types.WaitOptions) (*types.UpdateSet, error) {
|
||||
req := types.WaitForUpdatesEx{
|
||||
This: p.Reference(),
|
||||
Version: v,
|
||||
Version: version,
|
||||
}
|
||||
|
||||
if len(opts) == 1 {
|
||||
req.Options = opts[0]
|
||||
} else if len(opts) > 1 {
|
||||
panic("only one option may be specified")
|
||||
}
|
||||
|
||||
res, err := methods.WaitForUpdatesEx(ctx, p.roundTripper, &req)
|
||||
|
|
|
|||
26
vendor/github.com/vmware/govmomi/property/filter.go
generated
vendored
26
vendor/github.com/vmware/govmomi/property/filter.go
generated
vendored
|
|
@ -130,7 +130,7 @@ func (f Filter) MatchPropertyList(props []types.DynamicProperty) bool {
|
|||
return len(f) == len(props) // false if a property such as VM "guest" is unset
|
||||
}
|
||||
|
||||
// MatchObjectContent returns a list of ObjectContent.Obj where the ObjectContent.PropSet matches the Filter.
|
||||
// MatchObjectContent returns a list of ObjectContent.Obj where the ObjectContent.PropSet matches all properties the Filter.
|
||||
func (f Filter) MatchObjectContent(objects []types.ObjectContent) []types.ManagedObjectReference {
|
||||
var refs []types.ManagedObjectReference
|
||||
|
||||
|
|
@ -142,3 +142,27 @@ func (f Filter) MatchObjectContent(objects []types.ObjectContent) []types.Manage
|
|||
|
||||
return refs
|
||||
}
|
||||
|
||||
// MatchAnyPropertyList returns true if any given props match the Filter.
|
||||
func (f Filter) MatchAnyPropertyList(props []types.DynamicProperty) bool {
|
||||
for _, p := range props {
|
||||
if f.MatchProperty(p) {
|
||||
return true
|
||||
}
|
||||
}
|
||||
|
||||
return false
|
||||
}
|
||||
|
||||
// MatchAnyObjectContent returns a list of ObjectContent.Obj where the ObjectContent.PropSet matches any property in the Filter.
|
||||
func (f Filter) MatchAnyObjectContent(objects []types.ObjectContent) []types.ManagedObjectReference {
|
||||
var refs []types.ManagedObjectReference
|
||||
|
||||
for _, o := range objects {
|
||||
if f.MatchAnyPropertyList(o.PropSet) {
|
||||
refs = append(refs, o.Obj)
|
||||
}
|
||||
}
|
||||
|
||||
return refs
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue