Compare commits
No commits in common. 'i9' and 'c9' have entirely different histories.
@ -1,55 +0,0 @@
|
||||
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-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.39.2
|
||||
|
Loading…
Reference in new issue