Added MSVSphere policy implementation

i10-beta changed/i10-beta/sos-4.7.2-2.el10.inferit
Sergey Cherevko 2 days ago
parent 01dc3e7c78
commit 636e9dd29d
Signed by: scherevko
GPG Key ID: D87CBBC16D2E4A72

@ -0,0 +1,55 @@
From a9de62e64652cfb3d92352b70da8bcd6df7b1b80 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..41ae374
--- /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-os.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.43.5

@ -5,7 +5,7 @@
Summary: A set of tools to gather troubleshooting information from a system Summary: A set of tools to gather troubleshooting information from a system
Name: sos Name: sos
Version: 4.7.2 Version: 4.7.2
Release: 2%{?dist} Release: 2%{?dist}.inferit
Group: Applications/System Group: Applications/System
Source0: https://github.com/sosreport/sos/archive/%{version}/sos-%{version}.tar.gz Source0: https://github.com/sosreport/sos/archive/%{version}/sos-%{version}.tar.gz
Source1: sos-audit-%{auditversion}.tgz Source1: sos-audit-%{auditversion}.tgz
@ -23,6 +23,8 @@ Recommends: python3-pyyaml
Conflicts: vdsm < 4.40 Conflicts: vdsm < 4.40
Obsoletes: sos-collector <= 1.9 Obsoletes: sos-collector <= 1.9
Patch0: sos-RHEL-22732-reverted.patch Patch0: sos-RHEL-22732-reverted.patch
# MSVSphere patches
Patch1001: 0001-Add-MSVSphere-policy-implementation.patch
%description %description
Sos is a set of tools that gathers information about system Sos is a set of tools that gathers information about system
@ -34,6 +36,7 @@ support technicians and developers.
%setup -qn %{name}-%{version} %setup -qn %{name}-%{version}
%setup -T -D -a1 -q %setup -T -D -a1 -q
%patch0 -p1 -R %patch0 -p1 -R
%patch1001 -p1
%build %build
%py3_build %py3_build
@ -106,6 +109,9 @@ of the system. Currently storage and filesystem commands are audited.
%changelog %changelog
* Tue Dec 24 2024 Sergey Cherevko <s.cherevko@msvsphere-os.ru> - 4.7.2-2.inferit
- Added MSVSphere policy implementation
* Tue Nov 26 2024 MSVSphere Packaging Team <packager@msvsphere-os.ru> - 4.7.2-2 * Tue Nov 26 2024 MSVSphere Packaging Team <packager@msvsphere-os.ru> - 4.7.2-2
- Rebuilt for MSVSphere 10 - Rebuilt for MSVSphere 10

Loading…
Cancel
Save