aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAadhar Agarwal <aadagarwal@microsoft.com>2024-03-19 11:19:38 -0700
committerJake Hunsaker <jacob.r.hunsaker@gmail.com>2024-03-20 11:38:42 -0400
commit8a7fdf7f3e1194fa4674eea1d5442ca1660c0a67 (patch)
tree41d8206b5e247120038f156bc067028bc780c5be
parent43c3cfa692eb19377afc0f9499d8a7892a3d5a65 (diff)
downloadsos-8a7fdf7f3e1194fa4674eea1d5442ca1660c0a67.tar.gz
[Plugin,Policy] Make an AzurePlugin class, Update the vendor url,
Update the check function Signed-off-by: Aadhar Agarwal <aadagarwal@microsoft.com>
-rw-r--r--sos/policies/distros/azure.py6
-rw-r--r--sos/report/plugins/__init__.py5
2 files changed, 10 insertions, 1 deletions
diff --git a/sos/policies/distros/azure.py b/sos/policies/distros/azure.py
index 950799fa..b521d1e1 100644
--- a/sos/policies/distros/azure.py
+++ b/sos/policies/distros/azure.py
@@ -8,6 +8,7 @@
#
# See the LICENSE file in the source distribution for further information.
+from sos.report.plugins import AzurePlugin
from sos.policies.distros.redhat import RedHatPolicy, OS_RELEASE
import os
@@ -17,7 +18,7 @@ class AzurePolicy(RedHatPolicy):
distro = "Azure Linux"
vendor = "Microsoft"
vendor_urls = [
- ('Distribution Website', 'https://github.com/microsoft/CBL-Mariner')
+ ('Distribution Website', 'https://github.com/microsoft/azurelinux')
]
def __init__(self, sysroot=None, init=None, probe_runtime=True,
@@ -25,6 +26,7 @@ class AzurePolicy(RedHatPolicy):
super(AzurePolicy, self).__init__(sysroot=sysroot, init=init,
probe_runtime=probe_runtime,
remote_exec=remote_exec)
+ self.valid_subclasses += [AzurePlugin]
@classmethod
def check(cls, remote=''):
@@ -40,6 +42,8 @@ class AzurePolicy(RedHatPolicy):
if line.startswith('NAME'):
if 'Common Base Linux Mariner' in line:
return True
+ if 'Microsoft Azure Linux' in line:
+ return True
return False
# vim: set et ts=4 sw=4 :
diff --git a/sos/report/plugins/__init__.py b/sos/report/plugins/__init__.py
index 94ee50d7..fc674be0 100644
--- a/sos/report/plugins/__init__.py
+++ b/sos/report/plugins/__init__.py
@@ -3528,6 +3528,11 @@ class ExperimentalPlugin(PluginDistroTag):
pass
+class AzurePlugin(PluginDistroTag):
+ """Tagging class for Azure Linux"""
+ pass
+
+
def import_plugin(name, superclasses=None):
"""Import name as a module and return a list of all classes defined in that
module. superclasses should be a tuple of valid superclasses to import,