Skip to content

Commit ebd1e09

Browse files
committed
[virt] fix base template fetching for multiarch
added arch label selector to template list generation Signed-off-by: vsibirsk <vsibirsk@redhat.com>
1 parent 836037f commit ebd1e09

File tree

1 file changed

+11
-3
lines changed

1 file changed

+11
-3
lines changed

utilities/virt.py

Lines changed: 11 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2207,13 +2207,21 @@ def get_hyperconverged_ovs_annotations(hyperconverged):
22072207
return (hyperconverged.instance.to_dict()["metadata"].get("annotations", {})).get("deployOVS")
22082208

22092209

2210-
def get_base_templates_list(client):
2211-
"""Return SSP base templates"""
2210+
def get_base_templates_list(client: DynamicClient) -> list[Template]:
2211+
"""
2212+
Return base templates list.
2213+
2214+
Args:
2215+
client (DynamicClient): Client to use for getting base templates list.
2216+
2217+
Returns:
2218+
list[Template]: List of base templates.
2219+
"""
22122220
common_templates_list = list(
22132221
Template.get(
22142222
client=client,
22152223
singular_name=Template.singular_name,
2216-
label_selector=Template.Labels.BASE,
2224+
label_selector=f"{Template.Labels.BASE},{Template.Labels.ARCHITECTURE}={py_config['cpu_arch']}",
22172225
)
22182226
)
22192227
return [

0 commit comments

Comments
 (0)