Description of problem:
When moving a LUN disk attached to a VM using REST API - getting NPE.
The same scenario with a floating disk should also result in an NPE, as well as copy disk.
Version-Release number of selected component (if applicable):
Steps to Reproduce:
1. Move a LUN disk, example:
There was always an NPE in this unreasonable scenario.
Both try to extract guid from imageId, which is null:
Guid imageId = asGuid(getDisk().getImageId()); //(BackendVmDiskResource)
Guid imageId = asGuid(get().getImageId()); //(BackendDiskResource X 2)
The operation should fail in any event, just with a better error than NPE. Pushing out to 3.5.1
This requires moving around a LOT of code, for a small benefit.
Pushing out to 3.6.0.
Idan - please create a tracker and open bugs for the similar issues we have in other Disks actions.
Tracking - Bug 1147860.
VM LUN disks:
Export - Bug 1147861.
Move - Bug 1147863.
Export - Bug 1147870
Move - Bug 1147873
Copy - Bug 1147874
[Cannot move Virtual Machine Disk. Action is unsupported for the specified disk type (LUN).]
oVirt 3.6.0 has been released on November 4th, 2015 and should fix this issue.
If problems still persist, please open a new BZ and reference this one.