-
Notifications
You must be signed in to change notification settings - Fork 492
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
[GOCA] fix template and enhance dynamic template parsing/building #3219
Comments
I closed the related pull request because I reworked some part and I work with a more complete and up to date version, rebased on top of #2940. |
I submit a new pull request with my changes, rebased on master. I'm testing it, but as it remains a lot of work to do on the tests, I could miss some errors anyway. |
Known limitation of current implementation of templates (not necessarily a bug but I prefer leave a note on this behaviour): This concern only people that may want to generate XML format from dynamic templates, instead of generate strings. For instance, this code sample on VMs:
Give:
It's broken and shouldn't be used as an OpenNebula input (create, update ... methods). But, for now, it's possible to work with current templates:
Give:
This work properly as OpenNebula input. |
Signed-off-by: Pierre Lafievre <pierre.lafievre@iguanesolutions.com>
Description
/!\ breaking changes /!\
What's inside:
Use getter/setters with keys instead (see point below). It will simply a bit the GOCA code
Overall it's more flexible, and it's more compliant with OpenNebula templates.
Among others, it should also reduce developer code size with less type conversions (string to int or float ... )
A side note:
The code to unmarshal the XML could be a bit complex, I'll see if I can simplify it but if anyone has a better idea, please share :)
Potential improvements:
It may still contains some problems or bugs, I tested it, but it lacks a lot of automatic testing, so I could miss some errors.
/!\ breaking changes /!
It breaks due to the rework of the dynamic parsing/building of template parts. Some elements are renamed etc.
And also because there is a commit fixing the XML structures.
To Reproduce
Create a vector in the template of any entity with custom tag names.
Expected behavior
Better parsing, building, and better code reuse and more flexible
Details
Additional context
Add any other context about the problem here.
Progress Status
The text was updated successfully, but these errors were encountered: