
From Juan Hernandez <juan.hernandez@redhat.com>:
Juan Hernandez has submitted this change and it was merged. Change subject: restapi: Fix NPE when requesting ticket on a down VM ...................................................................... restapi: Fix NPE when requesting ticket on a down VM When the VM is down, the vm_dynamic-dependent `deriveGraphicsType()` returns null which caused NPE when forwarding to a subresource of a given console type. Fixed by forwarding the null graphics type to the backend where the down VM case is already handled. In order to do this the ticket invocation code was extracted to the Ticketer helper class that encapsulates the single operation and is used both by the old BackendVmResource endpoint and the newer BackendVmGraphicsConsoleResource subresource endpoints. Change-Id: I58250c34a5624f8be39b84e7eed1956dc589d995 Bug-Url: https://bugzilla.redhat.com/show_bug.cgi?id=1428863 Signed-off-by: Martin Betak <mbetak@redhat.com> --- M backend/manager/modules/restapi/jaxrs/src/main/java/org/ovirt/engine/api/restapi/resource/BackendGraphicsConsoleHelper.java M backend/manager/modules/restapi/jaxrs/src/main/java/org/ovirt/engine/api/restapi/resource/BackendResource.java M backend/manager/modules/restapi/jaxrs/src/main/java/org/ovirt/engine/api/restapi/resource/BackendVmGraphicsConsoleResource.java M backend/manager/modules/restapi/jaxrs/src/main/java/org/ovirt/engine/api/restapi/resource/BackendVmResource.java 4 files changed, 51 insertions(+), 47 deletions(-) Approvals: Juan Hernandez: Looks good to me, approved Jenkins CI: Passed CI tests Martin Betak: Verified -- To view, visit https://gerrit.ovirt.org/73594 To unsubscribe, visit https://gerrit.ovirt.org/settings Gerrit-MessageType: merged Gerrit-Change-Id: I58250c34a5624f8be39b84e7eed1956dc589d995 Gerrit-PatchSet: 4 Gerrit-Project: ovirt-engine Gerrit-Branch: master Gerrit-Owner: Martin Betak <mbetak@redhat.com> Gerrit-Reviewer: Jenkins CI Gerrit-Reviewer: Juan Hernandez <juan.hernandez@redhat.com> Gerrit-Reviewer: Martin Betak <mbetak@redhat.com> Gerrit-Reviewer: gerrit-hooks <automation@ovirt.org>