Fix validate failed with an image_name in uuid format

We should support to get the image_id by an image_name which is in uuid
format.

Change-Id: I471ee57ea55f990f852398a43762899dbc3d8692
Closes-Bug: #1312523
Merge "Fix validate failed with an image_name in uuid format"