_extract_amp_image_id_by_tag should return last created image
_extract_amp_image_id_by_tag should always return the last created
image_id, with the amp_image_tag ("amphora" by default), but it won't.
For the sort='created_at' to work, we should use 'desc' as sorting
direction and take the first element from the images list.
In addition, we now limit the length of the returned images list to 2.
The reason is that we don't need the whole list in order to warn the
system administrator that more than one image has the amp_image_tag.
Reviewed: https:/ /review. openstack. org/363713 /git.openstack. org/cgit/ openstack/ octavia/ commit/ ?id=c4017ae4138 5caac294405a2d4 8b31153408433b
Committed: https:/
Submitter: Jenkins
Branch: master
commit c4017ae41385caa c294405a2d48b31 153408433b
Author: Nir Magnezi <email address hidden>
Date: Wed Aug 31 17:22:18 2016 +0300
_extract_ amp_image_ id_by_tag should return last created image
_extract_ amp_image_ id_by_tag should always return the last created
image_id, with the amp_image_tag ("amphora" by default), but it won't.
For the sort='created_at' to work, we should use 'desc' as sorting
direction and take the first element from the images list.
In addition, we now limit the length of the returned images list to 2.
The reason is that we don't need the whole list in order to warn the
system administrator that more than one image has the amp_image_tag.
Closes-Bug #1618921
Change-Id: Ic36213962cf38b 032c2d1d8a2ee4a bebab3dd82f