Skip to content

Commit b99804f

Browse files
committed
add ARCH constants class
1 parent 053c3e8 commit b99804f

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

ocp_resources/template.py

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,11 @@ class Labels:
1414
WORKLOAD = "workload.template.kubevirt.io"
1515
ARCHITECTURE = f"{NamespacedResource.ApiGroup.TEMPLATE_KUBEVIRT_IO}/architecture"
1616

17+
class Architecture:
18+
AMD64 = "amd64"
19+
ARM64 = "arm64"
20+
S390X = "s390x"
21+
1722
class Workload:
1823
DESKTOP = "desktop"
1924
HIGHPERFORMANCE = "highperformance"
@@ -69,5 +74,5 @@ def generate_template_labels(os, workload, flavor, architecture=None):
6974
f"{Template.Labels.FLAVOR}/{getattr(Template.Flavor, flavor.upper())}=true",
7075
]
7176
if architecture:
72-
labels.append(f"{Template.Labels.ARCHITECTURE}={architecture}")
77+
labels.append(f"{Template.Labels.ARCHITECTURE}={getattr(Template.Architecture, architecture.upper())}")
7378
return labels

0 commit comments

Comments
 (0)