Juan Hernandez has submitted this change and it was merged.
Change subject: sdk: Use __module__ to check module membership
......................................................................
sdk: Use __module__ to check module membership
The SDK needs to check if the parameters given to constructors of
classes in the "params" module are brokers, as they have a special
treatment. In order to do that it checks if they belong to the brokers
module, using the "ReflectionHelper.isModuleMember" function. This
function iterates the members of the module in order to do the check. A
side effect of that is that the module needs to be loaded, and an
exception is generated if it isn't. To avoid that this patch changes the
implementation of the "isModuleMember" function so that it uses a
simpler check, using the "__module__" builtin to obtain and compare the
module name.
Change-Id: I1f10343659b1fd440e521b9981f1b359aa4fe050
Bug-Url:
https://bugzilla.redhat.com/1333889
Signed-off-by: Juan Hernandez <juan.hernandez(a)redhat.com>
---
M
generator/src/main/java/org/ovirt/engine/sdk/generator/python/templates/SuperAttributesTemplate
M src/ovirtsdk/utils/parsehelper.py
M src/ovirtsdk/utils/reflectionhelper.py
M src/ovirtsdk/xml/params.py
4 files changed, 18 insertions(+), 31 deletions(-)
Approvals:
Juan Hernandez: Verified; Looks good to me, approved
Jenkins CI: Passed CI tests
Fabrice Bacchella: Looks good to me, but someone else must approve
--
To view, visit
https://gerrit.ovirt.org/57160
To unsubscribe, visit
https://gerrit.ovirt.org/settings
Gerrit-MessageType: merged
Gerrit-Change-Id: I1f10343659b1fd440e521b9981f1b359aa4fe050
Gerrit-PatchSet: 1
Gerrit-Project: ovirt-engine-sdk
Gerrit-Branch: sdk_3.6
Gerrit-Owner: Juan Hernandez <juan.hernandez(a)redhat.com>
Gerrit-Reviewer: Fabrice Bacchella <fabrice.bacchella(a)orange.fr>
Gerrit-Reviewer: Jenkins CI
Gerrit-Reviewer: Juan Hernandez <juan.hernandez(a)redhat.com>
Gerrit-Reviewer: gerrit-hooks <automation(a)ovirt.org>