Skip to content

Commit 82f5e4a

Browse files
committed
Merge remote-tracking branch 'origin/sync/zed-into-2023.1' into HEAD
2 parents b7c6efc + 661c8ed commit 82f5e4a

File tree

1 file changed

+7
-4
lines changed

1 file changed

+7
-4
lines changed

tools/kolla-images.py

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -113,6 +113,12 @@ def parse_args() -> argparse.Namespace:
113113

114114
return parser.parse_args()
115115

116+
def get_distro_regex_map(openstack_release):
117+
distro_to_regex = {
118+
"rocky": re.compile(f"^{openstack_release}-rocky-9-[\d]{{8}}T[\d]{{6}}$"),
119+
"ubuntu": re.compile(f"^{openstack_release}-ubuntu-jammy-[\d]{{8}}T[\d]{{6}}$")
120+
}
121+
return distro_to_regex
116122

117123
def get_abs_path(relative_path: str) -> str:
118124
"""Return the absolute path of a file in SKC."""
@@ -223,10 +229,7 @@ def validate(kolla_image_tags: KollaImageTags):
223229
"""Validate the kolla_image_tags variable."""
224230
tag_var_re = re.compile(r"^[a-z0-9_]+$")
225231
openstack_release = get_openstack_release()
226-
tag_res = {
227-
base_distro: re.compile(f"^{openstack_release}-{base_distro}-[\d]{{8}}T[\d]{{6}}$")
228-
for base_distro in SUPPORTED_BASE_DISTROS
229-
}
232+
tag_res = get_distro_regex_map(openstack_release)
230233
errors = []
231234
if "openstack" not in kolla_image_tags:
232235
errors.append("Missing default openstack tag")

0 commit comments

Comments
 (0)