Skip to content

Commit

Permalink
Add aarch64 supported distros for AMA Linux (#3027)
Browse files Browse the repository at this point in the history
* Add aarch64 supported distros for AMA Linux

* Update AzureMonitorAgentLinux.py

* fix test

* fix test

* fix test

* address comment

* address comments
  • Loading branch information
simathih authored Nov 10, 2023
1 parent 9c43722 commit a32bc67
Showing 1 changed file with 20 additions and 4 deletions.
24 changes: 20 additions & 4 deletions microsoft/testsuites/vm_extensions/AzureMonitorAgentLinux.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@
SLES,
CBLMariner,
CentOs,
CpuArchitecture,
Debian,
Oracle,
Redhat,
Expand Down Expand Up @@ -71,20 +72,35 @@ def verify_azuremonitoragent_linux(self, log: Logger, node: Node) -> None:
).is_false()

def _is_supported_linux_distro(self, node: Node) -> bool:
supported_major_versions = {
supported_major_versions_x86_64 = {
Redhat: [7, 8, 9],
CentOs: [7, 8],
Oracle: [7, 8, 9],
Debian: [9, 10, 11],
Ubuntu: [16, 18, 20, 22],
Ubuntu: [16, 18, 20],
Suse: [12, 15],
SLES: [12, 15],
CBLMariner: [2],
}

for distro in supported_major_versions:
supported_major_versions_arm64 = {
Redhat: [8],
CentOs: [7],
Debian: [11],
Ubuntu: [18, 20],
SLES: [15],
CBLMariner: [2],
}

for distro in supported_major_versions_x86_64:
if type(node.os) == distro:
version_list = supported_major_versions.get(distro)
version_list = None
arch = node.os.get_kernel_information().hardware_platform
if arch == CpuArchitecture.ARM64:
version_list = supported_major_versions_arm64.get(distro)
else:
version_list = supported_major_versions_x86_64.get(distro)

if (
version_list is not None
and node.os.information.version.major in version_list
Expand Down

0 comments on commit a32bc67

Please sign in to comment.