Change in ovirt-engine-sdk[sdk_4.1]: Fix writing 'id' attribute for enum values

Code Review gerrit at ovirt.org
Mon Jan 2 09:42:12 UTC 2017


>From Ondra Machacek <omachace at redhat.com>:

Ondra Machacek has submitted this change and it was merged.

Change subject: Fix writing 'id' attribute for enum values
......................................................................


Fix writing 'id' attribute for enum values

Currently the SDK doesn't generate correctly the XML for attributes
named 'id' that contain enum values. For example, when writing the list
of SSO methods of a virtual machine it generates the following:

  <sso>
    <methods>
      <method>
        <id>guest_agent</id>
      </method>
    </methods>
  </sso>

But it should write the following instead, as the 'id' model attribute
should always be represented as an XML attribute:

  <sso>
    <methods>
      <method id="guest_agent"/>
    </methods>
  </sso>

This patch addresses that issue, which was mostly a typo in the
generator of the XML writing code.

Change-Id: I52065c9aeba4628155cbdc638bf0334834f4a15d
Bug-Url: https://bugzilla.redhat.com/1408839
Signed-off-by: Juan Hernandez <juan.hernandez at redhat.com>
(cherry picked from commit 7aaafb7bac31622d351b5921e30266656128cfc3)
---
M generator/src/main/java/org/ovirt/sdk/python/WritersGenerator.java
A sdk/tests/test_sso_writer.py
2 files changed, 68 insertions(+), 1 deletion(-)

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



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

Gerrit-MessageType: merged
Gerrit-Change-Id: I52065c9aeba4628155cbdc638bf0334834f4a15d
Gerrit-PatchSet: 2
Gerrit-Project: ovirt-engine-sdk
Gerrit-Branch: sdk_4.1
Gerrit-Owner: Ondra Machacek <omachace at redhat.com>
Gerrit-Reviewer: Jenkins CI
Gerrit-Reviewer: Juan Hernandez <juan.hernandez at redhat.com>
Gerrit-Reviewer: Ondra Machacek <omachace at redhat.com>
Gerrit-Reviewer: gerrit-hooks <automation at ovirt.org>


More information about the Engine-commits mailing list