vmware / govmomi

Go library for the VMware vSphere API
Apache License 2.0
2.26k stars 896 forks source link

Add PbmCheckCompatibility method in pbm simulator #3431

Closed vdkotkar closed 1 month ago

vdkotkar commented 2 months ago

Description

Add PbmCheckCompatibility method in pbm simulator code similar to PbmCheckRequirements. This simulator function is getting called from the vSphere CSI plugin unit tests. Without this function following error is observed.

“failed to find datastore compatibility with storage policy ID <storage-policy-ID>. Error: ServerFaultCode: PbmPlacementSolver:placementSolver does not implement: PbmCheckCompatibility”

Closes: #(issue-number)

Type of change

Please mark options that are relevant:

How Has This Been Tested?

Unit tests in vSphere CSI plugin using Storage Policy were using workaround till now, so PbmCheckCompatibility function in simulator was not getting called. But to test the relevant code in CSI, we are planning to remove this workaround. So, we need to implement simulated function PbmCheckCompatibility. After locally adding this code, unit tests are passing in CSI plugin.

Checklist:

vmwclabot commented 2 months ago

@vdkotkar, you must sign our contributor license agreement before your changes are merged. Click here to sign the agreement. If you are a VMware employee, read this for further instruction.

vmwclabot commented 2 months ago

@vdkotkar, we have received your signed contributor license agreement. The review is usually completed within a week, but may take longer under certain circumstances. Another comment will be added to the pull request to notify you when the merge can proceed.

vmwclabot commented 1 month ago

@vdkotkar, your company's legal contact did not review your signed contributor license agreement within the 14 day limit. The merge can not proceed. Click here to resign the agreement.