File tree Expand file tree Collapse file tree 1 file changed +7
-4
lines changed Expand file tree Collapse file tree 1 file changed +7
-4
lines changed Original file line number Diff line number Diff line change @@ -113,6 +113,12 @@ def parse_args() -> argparse.Namespace:
113
113
114
114
return parser .parse_args ()
115
115
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
116
122
117
123
def get_abs_path (relative_path : str ) -> str :
118
124
"""Return the absolute path of a file in SKC."""
@@ -223,10 +229,7 @@ def validate(kolla_image_tags: KollaImageTags):
223
229
"""Validate the kolla_image_tags variable."""
224
230
tag_var_re = re .compile (r"^[a-z0-9_]+$" )
225
231
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 )
230
233
errors = []
231
234
if "openstack" not in kolla_image_tags :
232
235
errors .append ("Missing default openstack tag" )
You can’t perform that action at this time.
0 commit comments