[PR #8889/fea0ffa5 backport][stable-9] one_image/one_image_info: refactor #8984
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.
This is a backport of PR #8889 as merged into main (fea0ffa).
SUMMARY
Refactor
one_image
andone_image_info
modules to support more parameters and make it more simillar toone_vnet
andone_template
to reuse already existing OpenNebula class frommodule_utils
Fixes #3578
ISSUE TYPE
COMPONENT NAME
one_image
one_image_info
ADDITIONAL INFORMATION
As i already mention the goal is to make these 2 modules use already existing OpenNebula class from
module_utils
to reuse already existing methods, i also added fully extended parameters that these 2 modules in return (using xsd scheme from https://github.com/privazio/pyone/blob/master/pyone/xsd/image.xsd)There were also some problems with images that have
id=0
because of incorrect if statements so i fixed them in processI also added
persistent
to images (see related issue) and tested all of these on my OpenNebula server and everything is working as intended