Change in ovirt-engine-sdk-java[sdk_3.6]: sdk: Support "labels" and "virtualfunctionallowedlabels"

Juan Hernandez has submitted this change and it was merged. Change subject: sdk: Support "labels" and "virtualfunctionallowedlabels" ...................................................................... sdk: Support "labels" and "virtualfunctionallowedlabels" The generator of the SDK derives the name of collection getter methods from the type of the elements of the collection. For example, the type of "/hosts/{host:id}/nics/{nic:id}/labels" collection is "Labels", so the name of the getter in the generated "HostNIC" class is "getLabels". Recently a new "virtualfunctionallowedlabels" collection has been introduced, that uses the same "Labels" type. As a result the code generated for the "HostNIC" class contains two methods named "getLabels", which generates a compilation error. The right way to fix this would be to derive the name the collection getter methods from the names of the collections, not the types. But this would introduce many backwards compatibility problems, so it is impossible. This patch introduces an exception for this specific case. Change-Id: I35bb52ebc6a3e8f0eb4faa376667813e50981f2f Signed-off-by: Juan Hernandez <juan.hernandez@redhat.com> --- M generator/src/main/java/org/ovirt/engine/sdk/generator/java/templates/SubCollectionGetterTemplate M generator/src/main/java/org/ovirt/engine/sdk/generator/java/templates/SubCollectionGetterTemplate.java 2 files changed, 13 insertions(+), 3 deletions(-) Approvals: Juan Hernandez: Verified; Looks good to me, approved; Passed CI tests -- To view, visit https://gerrit.ovirt.org/49293 To unsubscribe, visit https://gerrit.ovirt.org/settings Gerrit-MessageType: merged Gerrit-Change-Id: I35bb52ebc6a3e8f0eb4faa376667813e50981f2f Gerrit-PatchSet: 1 Gerrit-Project: ovirt-engine-sdk-java Gerrit-Branch: sdk_3.6 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