modifications for v2.0 list images tests

Needed by
Change-Id: bc785f2843d9d3438a3a1465ef368e6b849d8f81

 - rebased with master for successful merge
 - modifications to deserialization to make it safer.

Change-Id: Ia878b91a1f1fa549c4a04779983e39b61b7a283d