vexxhost / magnum-cluster-api

Cluster API driver for OpenStack Magnum
Apache License 2.0
41 stars 17 forks source link

feat: simplify and generalise get_image() #405

Open stuartgrace-bbc opened 1 week ago

stuartgrace-bbc commented 1 week ago

get_image function in image_utils.py had a hardcoded list of image names and code to modify these for use with a local target registry. It fails an assertion if an unexpected image name is passed in.

This commit simplifies the code and has default functionality for any image not explicitly handled, so that

old_registry/path/image_name

is converted to

new_registry/image_name

which will work in almost all cases.