Change in ovirt-engine-sdk[sdk_3.5]: sdk: Replace decorators before marshal

Juan Hernandez has submitted this change and it was merged. Change subject: sdk: Replace decorators before marshal ...................................................................... sdk: Replace decorators before marshal The code generated by the generateDS.py tool expects that all the objects implement the "export" method that generates the XML text. The entity and collection decorators don't implement this methods, but the user may use them in places where simple parameter objects are expected. To avoid issues with this we had an implementation of the "__setattr__" method in the base class of parameter objects that replaces references to decorators with the corresponding parameter objects. But this doesn't work when the references are set without calling the __setattr__ method, for example when adding an element to a list. To avoid this issue this patch removes the __setattr__ method and instead of that the replacement is executed recusively right before doing the conversion to XML. Change-Id: I7843dea85c9f09de5fb3439f57dba71ce6a28898 Bug-Url: https://bugzilla.redhat.com/1024696 Signed-off-by: Juan Hernandez <juan.hernandez@redhat.com> (cherry picked from commit 06862abc036073620ae1c724b758309e8ac98c54) --- M src/codegen/xsd/paramsconf.py M src/ovirtsdk/utils/parsehelper.py 2 files changed, 43 insertions(+), 52 deletions(-) Approvals: Juan Hernandez: Verified; Looks good to me, approved -- To view, visit http://gerrit.ovirt.org/28366 To unsubscribe, visit http://gerrit.ovirt.org/settings Gerrit-MessageType: merged Gerrit-Change-Id: I7843dea85c9f09de5fb3439f57dba71ce6a28898 Gerrit-PatchSet: 1 Gerrit-Project: ovirt-engine-sdk Gerrit-Branch: sdk_3.5 Gerrit-Owner: Juan Hernandez <juan.hernandez@redhat.com> Gerrit-Reviewer: Juan Hernandez <juan.hernandez@redhat.com> Gerrit-Reviewer: automation@ovirt.org
participants (1)
-
juan.hernandez@redhat.com