-
Notifications
You must be signed in to change notification settings - Fork 112
New issue
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
Fix bug that causes Compute Policies to fail on VCD 10.3.0 and 10.3.1 #911
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
…filters Signed-off-by: abarreiro <abarreiro@vmware.com>
Signed-off-by: abarreiro <abarreiro@vmware.com>
Signed-off-by: abarreiro <abarreiro@vmware.com>
Signed-off-by: abarreiro <abarreiro@vmware.com>
Signed-off-by: abarreiro <abarreiro@vmware.com>
Signed-off-by: abarreiro <abarreiro@vmware.com>
…ider-vcd into fix-compute-policies Signed-off-by: abarreiro <abarreiro@vmware.com>
lvirbalas
requested changes
Sep 27, 2022
lvirbalas
approved these changes
Sep 27, 2022
dataclouder
reviewed
Sep 28, 2022
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The tests work well, but there is something to discuss
Signed-off-by: abarreiro <abarreiro@vmware.com>
Didainius
approved these changes
Oct 5, 2022
dataclouder
approved these changes
Oct 5, 2022
9 tasks
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Description
This PR amends the code added in PR #904, where the VM Placement Policies were onboarded to the Provider.
The problem that this PR fixes is that in VCD 10.3.0 and 10.3.1, vGPU Policies do not exist, hence the filter
isVgpuPolicy
causes an error when fetching VM Placement Policies.To fix this situation, I added two auxiliary functions,
getVgpuFilter
, that returns aisVgpuPolicy
filter option only if API version is greater or equal than 36.2 (VCD 10.3.2). Second function isgetVgpuFilterToPrepend
which is similar to the first one but it adds a;
to the right (The;
acts as a logical AND). This second one is intended to be used to prepend this vGPU filtering to an existing filter string.RCA
The issue was identified when executing the acceptance tests in VCD 10.3.0.
PR #904 was tested with VCD 10.3.3 and 10.4.0, which already had vGPU Policy support (this was introduced in VCD 10.3.2), so this issue got undetected.