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

tnisan at redhat.com tnisan at redhat.com
Mon Mar 7 14:02:36 UTC 2016


Tal Nisan 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>
(cherry picked from commit 430b799dc656e51244ae97a32340370f4469c6ad)
---
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(+), 64 deletions(-)

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



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

Gerrit-MessageType: merged
Gerrit-Change-Id: Icaf19907ee09b8e4db731c3516520abce2527d50
Gerrit-PatchSet: 1
Gerrit-Project: ovirt-engine
Gerrit-Branch: ovirt-engine-3.6.4
Gerrit-Owner: Juan Hernandez <juan.hernandez at redhat.com>
Gerrit-Reviewer: Jenkins CI
Gerrit-Reviewer: Juan Hernandez <juan.hernandez at redhat.com>
Gerrit-Reviewer: Oved Ourfali <oourfali at redhat.com>
Gerrit-Reviewer: Tal Nisan <tnisan at redhat.com>
Gerrit-Reviewer: gerrit-hooks <automation at ovirt.org>



More information about the Engine-commits mailing list