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 <[email protected]>
---
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 <[email protected]>
Gerrit-Reviewer: Gilad Chaplik <[email protected]>
Gerrit-Reviewer: Jason Liao <[email protected]>
Gerrit-Reviewer: Juan Hernandez <[email protected]>
Gerrit-Reviewer: Martin Sivák <[email protected]>
Gerrit-Reviewer: [email protected]
Gerrit-Reviewer: oVirt Jenkins CI Server
_______________________________________________
Engine-patches mailing list
[email protected]
http://lists.ovirt.org/mailman/listinfo/engine-patches

Reply via email to