Fixed an error when caching multiple images in aggregate
Because in the process of judging whether the image id is Duplicate,there is only deduplication without sorting, so no duplicate image error is judged as duplicate and an error "Duplicate images in request" is reported.
Now it is changed to sort after deduplication and then compare.
Two unit test cases were added to verify the fix
Related-Bug: #2034702
Change-Id: I300a3e29ba56584f4c99d534a6cf8ee7dc0ed4b7
(cherry picked from commit aa500fbb31d2f7129c048460e57a3dff229cabc8)
Reviewed: https:/ /review. opendev. org/c/openstack /nova/+ /904017 /opendev. org/openstack/ nova/commit/ f9abe047f6d7fb3 0141d6cd7620877 1d512c5653
Committed: https:/
Submitter: "Zuul (22348)"
Branch: stable/2023.2
commit f9abe047f6d7fb3 0141d6cd7620877 1d512c5653
Author: liwenjian <email address hidden>
Date: Fri Sep 8 17:14:38 2023 +0800
Fixed an error when caching multiple images in aggregate
Because in the process of judging whether the image id is Duplicate,there is only deduplication without sorting, so no duplicate image error is judged as duplicate and an error "Duplicate images in request" is reported.
Now it is changed to sort after deduplication and then compare.
Two unit test cases were added to verify the fix
Related-Bug: #2034702 4f4c99d534a6cf8 ee7dc0ed4b7 29c048460e57a3d ff229cabc8)
Change-Id: I300a3e29ba5658
(cherry picked from commit aa500fbb31d2f71