Skip to content
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

B #331: fixing template filtering function, removing has_xxx parameters #349

Closed
wants to merge 2 commits into from

Conversation

onenhansen
Copy link

@onenhansen onenhansen commented Sep 21, 2022

Signed-off-by: Neal Hansen nhansen@opennebula.io

Community Note

  • Please vote on this issue by adding a 👍 reaction to the original issue to help the community and maintainers prioritize this request
  • Please do not leave "+1" or other comments that do not add relevant new information or questions, they generate extra noise for PR followers and do not help prioritize the request

Description

Changes the template list function call to grab from all templates instead of just owned ones (group and other permissions in OpenNebula allow use when not owned)
Changes the template filter to filter based on present parameters, should not need the has_XXX parameter any longer. Instead, it uses the second returned value from GetOk which will indicate whether the value is present in the configuration or not. The value cannot be set to 0 in the config file, due to the schema ValidateFunc in each resource parameter throwing an error, so there should not be a case where the value is 0 and the Ok is true.

References

#331
#287 (This PR essentially undoes these changes)

Checklist

  • I have mentioned the issue in References
  • My code follows the style guidelines of this project (use go fmt)
  • My changes generate no new warnings or errors
  • I have updated the unit tests and they pass successfuly
  • I have commented my code, particularly in hard-to-understand areas
  • I have updated the documentation (if needed)
  • I have updated the changelog file

Signed-off-by: Neal Hansen <nhansen@opennebula.io>
Signed-off-by: Neal Hansen <nhansen@opennebula.io>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

data sources with use flag on OTHER permissions cannot be read
1 participant