Juan Hernandez has submitted this change and it was merged.
Change subject: codegen: Handle duplicated URL segments
......................................................................
codegen: Handle duplicated URL segments
There are some entities and collections whose names can't be directly
derived by the corresponding URL segments. For example, the following
two URLs contain segments that are equal:
hosts/{host:id}/numanodes
vms/{vm:id}/numanodes
But the corresponding types are "NumaNode" in the first case and
"VirtualNumaNode" in the second, so it isn't possible to derive the type
name using only the URL segment.
To address this issue this patch introduces a table of exceptions that
the generator will lookup. This table will initially contain the
exception in the example above.
Change-Id: I7fcbfe5e490bb23aa2e1785560dd016d63e3a9ae
Bug-Url:
https://bugzilla.redhat.com/1116119
Signed-off-by: Juan Hernandez <juan.hernandez(a)redhat.com>
---
M
ovirt-engine-sdk-java-codegen/src/main/java/org/ovirt/engine/sdk/codegen/rsdl/RsdlCodegen.java
M
ovirt-engine-sdk-java-codegen/src/main/java/org/ovirt/engine/sdk/codegen/utils/ArrayUtils.java
2 files changed, 133 insertions(+), 33 deletions(-)
Approvals:
Jason Liao: Looks good to me, but someone else must approve
Juan Hernandez: Verified; Looks good to me, approved
--
To view, visit
http://gerrit.ovirt.org/29569
To unsubscribe, visit
http://gerrit.ovirt.org/settings
Gerrit-MessageType: merged
Gerrit-Change-Id: I7fcbfe5e490bb23aa2e1785560dd016d63e3a9ae
Gerrit-PatchSet: 3
Gerrit-Project: ovirt-engine-sdk-java
Gerrit-Branch: master
Gerrit-Owner: Juan Hernandez <juan.hernandez(a)redhat.com>
Gerrit-Reviewer: Gilad Chaplik <gchaplik(a)redhat.com>
Gerrit-Reviewer: Jason Liao <chuan.liao(a)hp.com>
Gerrit-Reviewer: Juan Hernandez <juan.hernandez(a)redhat.com>
Gerrit-Reviewer: Martin Sivák <msivak(a)redhat.com>
Gerrit-Reviewer: automation(a)ovirt.org
Gerrit-Reviewer: oVirt Jenkins CI Server