Change in ovirt-engine[master]: restapi: Don't fail with unexpected version numbers

juan.hernandez at redhat.com juan.hernandez at redhat.com
Thu Mar 3 17:35:06 UTC 2016


Juan Hernandez has submitted this change and it was merged.

Change subject: restapi: Don't fail with unexpected version numbers
......................................................................


restapi: Don't fail with unexpected version numbers

Currently the API assumes that the format of version numbers is
something like 4.3.1-100, and it fails due to an array index out of
bounds exception if it has a different format. This patch makes this
code more tolerant, and avoids the failures.

Change-Id: Icaf19907ee09b8e4db731c3516520abce2527d50
Bug-Url: https://bugzilla.redhat.com/1311616
Signed-off-by: Juan Hernandez <juan.hernandez at redhat.com>
---
M backend/manager/modules/restapi/types/src/main/java/org/ovirt/engine/api/restapi/types/VersionMapper.java
M backend/manager/modules/restapi/types/src/main/java/org/ovirt/engine/api/restapi/types/VmMapper.java
A backend/manager/modules/restapi/types/src/test/java/org/ovirt/engine/api/restapi/types/VersionMapperTest.java
3 files changed, 236 insertions(+), 61 deletions(-)

Approvals:
  Juan Hernandez: Verified; Looks good to me, approved
  Jenkins CI: Passed CI tests
  Oved Ourfali: Looks good to me, but someone else must approve



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

Gerrit-MessageType: merged
Gerrit-Change-Id: Icaf19907ee09b8e4db731c3516520abce2527d50
Gerrit-PatchSet: 4
Gerrit-Project: ovirt-engine
Gerrit-Branch: master
Gerrit-Owner: Juan Hernandez <juan.hernandez at redhat.com>
Gerrit-Reviewer: Eli Mesika <emesika at redhat.com>
Gerrit-Reviewer: Jenkins CI
Gerrit-Reviewer: Juan Hernandez <juan.hernandez at redhat.com>
Gerrit-Reviewer: Ori Liel <oliel at redhat.com>
Gerrit-Reviewer: Oved Ourfali <oourfali at redhat.com>
Gerrit-Reviewer: gerrit-hooks <automation at ovirt.org>



More information about the Engine-commits mailing list