Skip to content

Commit 1504c13

Browse files
[spyre] Run sos checks only on RHEL
Run sosreport plugin checks only on RHEL systems where they are fully supported. All Spyre checks continue to run when a Spyre card is present, while sos checks are now gated by the RHEL scheme. Signed-off-by: Sahithi Ravindranath <Sahithi.Ravindranath@ibm.com>
1 parent 82cbb07 commit 1504c13

1 file changed

Lines changed: 18 additions & 0 deletions

File tree

  • servicereportpkg/validate/plugins

servicereportpkg/validate/plugins/spyre.py

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,7 @@
2020
from servicereportpkg.utils import is_package_installed
2121
from servicereportpkg.check import ConfigurationFileCheck
2222
from servicereportpkg.utils import is_read_write_to_owner_group_users
23+
from servicereportpkg.validate.schemes.schemes import RHELScheme
2324

2425

2526
class Spyre(Plugin, Scheme):
@@ -59,6 +60,14 @@ def is_applicable(cls):
5960

6061
return Spyre.is_spyre_card_exists()
6162

63+
class SpyreAll(Spyre, Plugin, Scheme):
64+
"""Spyre All configuration checks"""
65+
66+
def __init__(self):
67+
Plugin.__init__(self)
68+
self.name = Spyre.__name__
69+
self.description = Spyre.__doc__
70+
6271
def check_driver_config(self):
6372
"""VFIO Driver configuration"""
6473

@@ -290,6 +299,14 @@ def check_vfio_access_permission(self):
290299
perm_check.set_status(status)
291300
return perm_check
292301

302+
class SpyreRHEL(Spyre, Plugin, RHELScheme):
303+
"""Spyre sos configuration checks"""
304+
305+
def __init__(self):
306+
Plugin.__init__(self)
307+
self.name = Spyre.__name__
308+
self.description = Spyre.__doc__
309+
293310
def check_sos_package(self):
294311
"""sos package"""
295312

@@ -319,6 +336,7 @@ def check_sos_config(self):
319336
pattern_logs = re.compile(r'^\s*podman\.logs\s*=\s*true\s*$', re.IGNORECASE)
320337
pattern_all = re.compile(r'^\s*podman\.all\s*=\s*true\s*$', re.IGNORECASE)
321338

339+
in_plugin_options = False
322340
try:
323341
with open(sos_config_file, 'r', encoding="utf-8") as f:
324342
for line in f:

0 commit comments

Comments
 (0)