Description of problem: when writing tests that assert interactions using the ruby sdk it is often necessary to compare the Types present in the sdk for (structural) equality. However currently the `==` ruby comparison operator is not implemented for the generated Types and e.g. even a basic comparison of > OvirtSDK4::Vm.new(name: 'foo') == OvirtSDK4::Vm.new(name: 'foo') currently returns false. This of course applies to all generated Types and for complex types the structural equality should be implemented recursively - i.e. that also > OvirtSDK4::ExternalVmImport.new(vm: { name: 'foo' }) == OvirtSDK4::ExternalVmImport.new(vm: { name: 'foo' }) would return true
Version 4.0.6 of the SDK, containing the fix for this bug, has been published to rubygems.org: https://rubygems.org/gems/ovirt-engine-sdk/versions/4.0.6
The new version of the SDK, 4.0.6, is intended to support a slightly newer version of the engine than what is included in the ovirt-4.0.6 release: the SDK uses version 4.0.37 of the specification of the API, but the engine uses version 4.0.36. So I am moving the bug to the next release of the oVirt project.
4.0.6 has been the last oVirt 4.0 release, please re-target this bug.
Verified on ovirt-engine-sdk version 4.1.0.alpha3. [6] pry(main)> OvirtSDK4::Vm.new(name: 'foo') == OvirtSDK4::Vm.new(name: 'foo') => true [7] pry(main)> OvirtSDK4::ExternalVmImport.new(vm: { name: 'foo' }) == OvirtSDK4::ExternalVmImport.new(vm: { name: 'foo' }) => true