Comment 10 for bug 1843023

Reviewed: https://review.opendev.org/683066
Committed: https://git.openstack.org/cgit/openstack/tripleo-upgrade/commit/?id=67f82ef005c816acd759037ae1257ddb7e292686
Submitter: Zuul
Branch: stable/stein

commit 67f82ef005c816acd759037ae1257ddb7e292686
Author: Sofer Athlan-Guyot <email address hidden>
Date: Wed Sep 18 12:14:53 2019 +0200

    Fix image validation when AP services get several images.

    When AP (Actif/Passif) service get several images back from the host
    the script is broken because it wrongly tests any left over image.

    We fix that by sorting them by tag (the higher being at bottom of the
    list) and taking only the last one.

    We ensure as well that re-running the script doesn't unnecessarily
    increase the number of hosts we test for AP services.

    Change-Id: I24e05a15975fb5a696d195d87257bc7b7e1c561b
    Related-Bug: #1843023
    (cherry picked from commit cece0f85d471114b07d4d5082e841fc97b7a59af)