Updated openstack/openstack
Project: openstack/glance  e8fc1aec2148392ff74028c0839ab208eda613b6
null
checking length of argument list in "glance-cache-image" command

Currently, "image id" is got by "pop" method without checking length
of argument list in "queue_image" method(glance/cmd/cache_manage.py)

Consequently, only last element of argument list is used,
other elements are ignored.
 ex)
  glance-cache-image queue-image <image-id1> <image-id2> <image-id3>
  -> <image-id3> is selected and queued.
     <image-id1>/<image-id2> is ignored.

Because "glance-cache-image" command is user command(*),
I think that elements which are ignored should not be existed
and checking of length is essential.

In order to check length, I replaced "try/except" statement with
"if/else" statement.

Also, I modified 2 methods at the same point.
 -delete_queued_image
 -delete_cached_image

 * http://docs.openstack.org/developer/glance/cache.html

Change-Id: I5cff1f9b5fe8f718ca74f1c9f58dba469396dc8f
Closes-Bug: #1236709