We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Describe the bug When FetchDVPorts is requested to vcsim, criteria field is ignored and all ports are responded
FetchDVPorts
criteria
To Reproduce Steps to reproduce the behavior:
var vCenterURL = "https://user:pass@127.0.0.1:8989/sdk" func main() { ctx := context.TODO() url, _ := url.Parse(vCenterURL) c, _ := govmomi.NewClient(ctx, url, true) f := find.NewFinder(c.Client) n, _ := f.Network(ctx, "/DC0/network/DVS0") dvs := object.NewDistributedVirtualSwitch(c.Client, n.Reference()) criteria := &types.DistributedVirtualSwitchPortCriteria{ PortgroupKey: []string{"dvportgroup-11"}, Inside: types.NewBool(true), } ports, err := dvs.FetchDVPorts(ctx, criteria) if err != nil { fmt.Printf("%+v\n", err) return } for _, port := range ports { fmt.Printf("key: %s, portgroupKey: %s\n", port.Key, port.PortgroupKey) } }
Expected behavior A clear and concise description of what you expected to happen.
> go run main.go key: 0, portgroupKey: dvportgroup-11
Affected version Please provide details on the version used, e.g. release tag, commit, module version, etc.
Screenshots/Debug Output If applicable, add screenshots or debug output to help explain your problem.
> go run main.go key: dvportgroup-11, portgroupKey: key: dvportgroup-13, portgroupKey:
Additional context Add any other context about the problem here.
The text was updated successfully, but these errors were encountered:
vcsim: Fix port filtering by criteria in FetchDVPorts
811b829
Closes: vmware#2733 Signed-off-by: syuparn <s.hello.spagetti@gmail.com>
Successfully merging a pull request may close this issue.
Describe the bug
When
FetchDVPorts
is requested to vcsim,criteria
field is ignored and all ports are respondedTo Reproduce
Steps to reproduce the behavior:
FetchDVPorts
with criteria as belowExpected behavior
A clear and concise description of what you expected to happen.
Affected version
Please provide details on the version used, e.g. release tag, commit, module version, etc.
Screenshots/Debug Output
If applicable, add screenshots or debug output to help explain your problem.
Additional context
Add any other context about the problem here.
The text was updated successfully, but these errors were encountered: