Change in ovirt-engine-sdk-java[master]: sdk: Support "labels" and "virtualfunctionallowedlabels"
juan.hernandez at redhat.com
juan.hernandez at redhat.com
Fri Nov 27 09:37:54 UTC 2015
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 at 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/49297
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: master
Gerrit-Owner: Juan Hernandez <juan.hernandez at redhat.com>
Gerrit-Reviewer: Juan Hernandez <juan.hernandez at redhat.com>
Gerrit-Reviewer: gerrit-hooks <automation at ovirt.org>
More information about the Engine-commits
mailing list