toolkit/mangle/generators/common.py

63 lines
1.9 KiB
Python
Raw Normal View History

2023-02-28 09:46:58 +00:00
import sys
2022-09-26 02:31:40 +00:00
class common:
2023-02-28 09:46:58 +00:00
def rlver(self, rlver, stream=False, all_repo=False):
2022-09-26 02:31:40 +00:00
default = "Not Supported"
2023-02-28 09:46:58 +00:00
if stream and all_repo:
print("incompatible options used")
sys.exit(1)
if stream:
return getattr(self, 'c' + str(rlver) + 's', lambda: default)()
if all_repo:
return getattr(self, 'rl' + str(rlver) + 'all', lambda: default)()
2022-09-26 02:31:40 +00:00
return getattr(self, 'rl' + str(rlver), lambda: default)()
def rl8(self):
REPOS = {
'AppStream': ['aarch64', 'x86_64'],
'BaseOS': ['aarch64', 'x86_64'],
'HighAvailability': ['aarch64', 'x86_64'],
'PowerTools': ['aarch64', 'x86_64'],
'ResilientStorage': ['aarch64', 'x86_64'],
'RT': ['x86_64'],
}
return REPOS
def rl9(self):
REPOS = {
'AppStream': ['aarch64', 'ppc64le', 's390x', 'x86_64'],
'BaseOS': ['aarch64', 'ppc64le', 's390x', 'x86_64'],
'CRB': ['aarch64', 'ppc64le', 's390x', 'x86_64'],
'HighAvailability': ['aarch64', 'ppc64le', 's390x', 'x86_64'],
'NFV': ['x86_64'],
'ResilientStorage': ['ppc64le', 's390x', 'x86_64'],
'RT': ['x86_64'],
'SAP': ['ppc64le', 's390x', 'x86_64'],
'SAPHANA': ['ppc64le', 'x86_64']
}
return REPOS
2023-02-28 09:46:58 +00:00
def rl9all(self):
REPOS = {
'all': ['aarch64', 'ppc64le', 's390x', 'x86_64'],
}
return REPOS
# Parse tags of koji
def c8s(self):
REPOS = {
'c8s-build': ['aarch64', 'ppc64le', 'x86_64'],
}
return REPOS
def c9s(self):
REPOS = {
'c9s-build': ['aarch64', 'ppc64le', 's390x', 'x86_64'],
}
return REPOS
2022-09-26 02:31:40 +00:00
switcher = common()