Esempio n. 1
0
 def __init__(self, version, os_name=None, arch=None):
     self.version = version
     if os_name is not None:
         self.os = os_name
     else:
         self.os = sysstats.os_name().lower()
     if arch is not None:
         self.arch = arch
     else:
         self.arch = sysstats.cpu_arch().lower()
Esempio n. 2
0
 def _substitute_vars(self, s):
     substitutions = {
         "{{VERSION}}": self.version,
         "{{OSNAME}}": sysstats.os_name().lower(),
         "{{ARCH}}": sysstats.cpu_arch().lower()
     }
     r = s
     for key, replacement in substitutions.items():
         r = r.replace(key, replacement)
     return r
Esempio n. 3
0
 def __init__(self, version, os_name=None, arch=None):
     self.version = version
     if os_name is not None:
         self.os = os_name
     else:
         self.os = sysstats.os_name().lower()
     if arch is not None:
         self.arch = arch
     else:
         derived_arch = sysstats.cpu_arch().lower()
         # Elasticsearch artifacts for Apple Silicon use "aarch64" as the CPU architecture
         self.arch = "aarch64" if derived_arch == "arm64" else derived_arch