
Juan Hernandez has submitted this change and it was merged. Change subject: Add generic reader ...................................................................... Add generic reader Currently the SDK doesn't provide any mechanism to read an XML object without explicitly specifying its type. For example, to read a virtual machine the only method available is "VmReader.read_one". But there are situations where the SDK can't know in advance what type of object is going to be received from the server, for example "action" or "fault". To support that, this patch adds a new "Reader.read" method that decides the type of object based on the name of the first tag, and invokes the corresponding specific reader to read it. Change-Id: I3b8c9a4c1118e7b261a589e8185861c9acf36921 Signed-off-by: Juan Hernandez <juan.hernandez@redhat.com> (cherry picked from commit 66ad419477cb644727cecaf62815bf4fe46d84ac) --- M generator/src/main/java/org/ovirt/sdk/ruby/ReadersGenerator.java M sdk/lib/ovirtsdk4/reader.rb M sdk/spec/reader_spec.rb 3 files changed, 164 insertions(+), 0 deletions(-) Approvals: Juan Hernandez: Verified; Looks good to me, approved; Passed CI tests -- To view, visit https://gerrit.ovirt.org/62998 To unsubscribe, visit https://gerrit.ovirt.org/settings Gerrit-MessageType: merged Gerrit-Change-Id: I3b8c9a4c1118e7b261a589e8185861c9acf36921 Gerrit-PatchSet: 1 Gerrit-Project: ovirt-engine-sdk-ruby Gerrit-Branch: sdk_4.0 Gerrit-Owner: Juan Hernandez <juan.hernandez@redhat.com> Gerrit-Reviewer: Juan Hernandez <juan.hernandez@redhat.com> Gerrit-Reviewer: gerrit-hooks <automation@ovirt.org>
participants (1)
-
juan.hernandez@redhat.com