Added MSVSphere policy implementation

i8 changed/i8/sos-4.5.1-3.el8.inferit
Sergey Cherevko 1 year ago
parent 058696d88c
commit a04768af62
Signed by: scherevko
GPG Key ID: D87CBBC16D2E4A72

@ -0,0 +1,55 @@
From 962bdc46472a45c0dd0dacbf358fe78427346783 Mon Sep 17 00:00:00 2001
From: Eugene Zamriy <eugene@zamriy.info>
Date: Sat, 1 Apr 2023 00:38:19 +0300
Subject: [PATCH] Add MSVSphere policy implementation
---
sos/policies/distros/msvsphere.py | 36 +++++++++++++++++++++++++++++++
1 file changed, 36 insertions(+)
create mode 100644 sos/policies/distros/msvsphere.py
diff --git a/sos/policies/distros/msvsphere.py b/sos/policies/distros/msvsphere.py
new file mode 100644
index 0000000..12abf55
--- /dev/null
+++ b/sos/policies/distros/msvsphere.py
@@ -0,0 +1,36 @@
+# Copyright (C) Eugene Zamriy <ezamriy@msvsphere.ru>
+
+# This file is part of the sos project: https://github.com/sosreport/sos
+#
+# This copyrighted material is made available to anyone wishing to use,
+# modify, copy, or redistribute it subject to the terms and conditions of
+# version 2 of the GNU General Public License.
+#
+# See the LICENSE file in the source distribution for further information.
+
+from sos.policies.distros.redhat import RedHatPolicy, OS_RELEASE
+import os
+
+
+class MSVSpherePolicy(RedHatPolicy):
+
+ distro = 'MSVSphere'
+
+ vendor = 'LLC "NCSD"'
+
+ vendor_urls = [
+ ('Distribution Website', 'https://msvsphere.ru'),
+ ('Vendor Website', 'http://ncpr.su/')
+ ]
+
+ @classmethod
+ def check(cls, remote=''):
+ if remote:
+ return cls.distro in remote
+ elif not os.path.exists(OS_RELEASE):
+ return False
+ with open(OS_RELEASE, 'r') as fd:
+ for line in fd:
+ if line.startswith('NAME') and 'MSVSphere' in line:
+ return True
+ return False
--
2.39.2

@ -5,7 +5,7 @@
Summary: A set of tools to gather troubleshooting information from a system
Name: sos
Version: 4.5.1
Release: 3%{?dist}
Release: 3%{?dist}.inferit
Group: Applications/System
Source0: https://github.com/sosreport/sos/archive/%{version}/sos-%{version}.tar.gz
Source1: sos-audit-%{auditversion}.tgz
@ -27,6 +27,8 @@ Patch1: sos-bz2175650-microshift-plugin-oc-command.patch
Patch2: sos-bz2176086-iprconfig-sg-kmod.patch
Patch3: sos-bz2176218-sos-clean-tmp.patch
# MSVSphere patches
Patch1001: 0001-Add-MSVSphere-policy-implementation.patch
%description
Sos is a set of tools that gathers information about system
@ -40,7 +42,7 @@ support technicians and developers.
%patch1 -p1
%patch2 -p1
%patch3 -p1
%patch1001 -p1
%build
%py3_build
@ -110,6 +112,10 @@ of the system. Currently storage and filesystem commands are audited.
%ghost /etc/audit/rules.d/40-sos-storage.rules
%changelog
* Tue Aug 15 2023 Sergey Cherevko <s.cherevko@msvsphere.ru> - 4.5.1-3.inferit
- Added MSVSphere policy implementation
- Rebuilt for MSVSphere 8.8
* Wed Jul 26 2023 MSVSphere Packaging Team <packager@msvsphere.ru> - 4.5.1-3
- Rebuilt for MSVSphere 8.8

Loading…
Cancel
Save