Change in ovirt-engine-sdk[master]: Use type name as the tag for method parameters

omachace at redhat.com omachace at redhat.com
Mon Jul 11 13:11:31 UTC 2016


Ondra Machacek has submitted this change and it was merged.

Change subject: Use type name as the tag for method parameters
......................................................................


Use type name as the tag for method parameters

Currently the name of the XML tag used to represent the input parameters
of methods like "add" is the name of the parameter as described in the
model. For example, for the operation to add a disk attachment the name
of the parameter is "attachment", so the XML document generated and sent
by the SDK is something like this:

  <attachment>
    ...
  </attachment>

But the server doesn't expect this, it expects the name the XML tag
corresponding to the type of the parameter, in this case this case
"DiskAttachment", so the server expects the following:

  <disk_attachment>
    ...
  </disk_attachment>

It would be more correct to use the name of the parameter, as described
in the model, but it isn't factible to introduce such change in the
server side at this point, so we need to change the SDK to generate what
the server expects. That is what this patch does.

In the future, we will probably change the server so that it ignores the
root tag of the documents, then this patch can be reverted.

Change-Id: I18284685f5eefc981fd6769ac7e1ca998d586a81
Signed-off-by: Ondra Machacek <omachace at redhat.com>
---
M generator/src/main/java/org/ovirt/sdk/python/ServicesGenerator.java
1 file changed, 2 insertions(+), 4 deletions(-)

Approvals:
  Ondra Machacek: Verified; Looks good to me, approved
  Jenkins CI: Passed CI tests



-- 
To view, visit https://gerrit.ovirt.org/60462
To unsubscribe, visit https://gerrit.ovirt.org/settings

Gerrit-MessageType: merged
Gerrit-Change-Id: I18284685f5eefc981fd6769ac7e1ca998d586a81
Gerrit-PatchSet: 1
Gerrit-Project: ovirt-engine-sdk
Gerrit-Branch: master
Gerrit-Owner: Ondra Machacek <omachace at redhat.com>
Gerrit-Reviewer: Jenkins CI
Gerrit-Reviewer: Ondra Machacek <omachace at redhat.com>
Gerrit-Reviewer: gerrit-hooks <automation at ovirt.org>



More information about the Engine-commits mailing list