
Juan Hernandez has submitted this change and it was merged. Change subject: Remove the connection attribute from objects ...................................................................... Remove the connection attribute from objects Currently each object created by the SDK contains a "connection" attribute that is used to implement the "follow_link" method. This is problematic, because when the connection is closed there will be many objects that have a non nil but useless connection. To avoid this problem this patch removes this "connection" attribute and moves the "follow_link" method to the "Connection" class. So instead of following a link with this code: vm = ... cluster = vm.cluster.follow_link It is now necessary to explicitly use the connection: vm = ... cluster = connection.follow_link(vm.cluster) Change-Id: I29202acf545121a18acb9b1c493dc6b613b4418e Signed-off-by: Juan Hernandez <juan.hernandez@redhat.com> --- M generator/src/main/java/org/ovirt/sdk/ruby/ReadersGenerator.java M generator/src/main/java/org/ovirt/sdk/ruby/ServicesGenerator.java M sdk/examples/follow_vm_links.rb M sdk/lib/ovirtsdk4/http.rb M sdk/lib/ovirtsdk4/type.rb M sdk/spec/vm_reader_spec.rb 6 files changed, 51 insertions(+), 195 deletions(-) Approvals: Juan Hernandez: Verified; Looks good to me, approved; Passed CI tests -- To view, visit https://gerrit.ovirt.org/54614 To unsubscribe, visit https://gerrit.ovirt.org/settings Gerrit-MessageType: merged Gerrit-Change-Id: I29202acf545121a18acb9b1c493dc6b613b4418e Gerrit-PatchSet: 4 Gerrit-Project: ovirt-engine-sdk-ruby Gerrit-Branch: master Gerrit-Owner: Juan Hernandez <juan.hernandez@redhat.com> Gerrit-Reviewer: Jenkins CI Gerrit-Reviewer: Juan Hernandez <juan.hernandez@redhat.com> Gerrit-Reviewer: gerrit-hooks <automation@ovirt.org>