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

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


>From Juan Hernandez <juan.hernandez at redhat.com>:

Juan Hernandez 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: I211c87dba59c6c9a52858b8b0faa9ddd0cf99fda
Related-To: https://bugzilla.redhat.com/1408839
Signed-off-by: Juan Hernandez <juan.hernandez at redhat.com>
(cherry picked from commit e77ad2991a1e11e5ffd5a99ce4700ba4897d20e3)
(cherry picked from commit a047b0e8497d5e7c05ccf58d85b4854c281cdf24)
---
M generator/src/main/java/org/ovirt/sdk/ruby/WritersGenerator.java
A sdk/spec/sso_writer_spec.rb
2 files changed, 38 insertions(+), 1 deletion(-)

Approvals:
  Juan Hernandez: Verified; Looks good to me, approved
  Jenkins CI: Passed CI tests



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

Gerrit-MessageType: merged
Gerrit-Change-Id: I211c87dba59c6c9a52858b8b0faa9ddd0cf99fda
Gerrit-PatchSet: 1
Gerrit-Project: ovirt-engine-sdk-ruby
Gerrit-Branch: sdk_4.0
Gerrit-Owner: Juan Hernandez <juan.hernandez at redhat.com>
Gerrit-Reviewer: Jenkins CI
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