Add hw_type for Ampere Falcon server 58/2058/4
authorAlexandru Antone <Alexandru.Antone@enea.com>
Wed, 27 Nov 2019 14:05:53 +0000 (16:05 +0200)
committerAlexandru Antone <Alexandru.Antone@enea.com>
Mon, 9 Dec 2019 09:50:49 +0000 (11:50 +0200)
Signed-off-by: Alexandru Antone <Alexandru.Antone@enea.com>
Change-Id: Iacc648267aa9663e9dcf9750b5a23f5eb1e07d64

hw-detector.spec
src/hw_detector/hw_ipmi_lib.py
src/hw_detector/hw_types/hw_ampere.py [new file with mode: 0644]

index 268292e..2613522 100644 (file)
@@ -14,7 +14,7 @@
 
 Name:           hw-detector
 Version:        %{_version}
-Release:        2%{?dist}
+Release:        3%{?dist}
 Summary:        Hardware detector
 Group:          Nokia
 License:        %{_platform_licence}
@@ -22,7 +22,7 @@ Source0:        %{name}-%{version}.tar.gz
 BuildArch:      noarch
 Vendor:         %{_platform_vendor}
 
-Requires: python 
+Requires: python
 BuildRequires: python
 BuildRequires: python-setuptools
 
index ec7eca3..8d076fc 100755 (executable)
@@ -31,6 +31,7 @@ def _load_ipmi_drivers():
         subprocess.call('modprobe ipmi_msghandler', stderr=devnull, shell=True)
         subprocess.call('modprobe ipmi_devintf', stderr=devnull, shell=True)
         subprocess.call('modprobe ipmi_si', stderr=devnull, shell=True)
+        subprocess.call('modprobe ipmi_ssif', stderr=devnull, shell=True)
 
 def get_local_ipmi_info():
     _load_ipmi_drivers()
diff --git a/src/hw_detector/hw_types/hw_ampere.py b/src/hw_detector/hw_types/hw_ampere.py
new file mode 100644 (file)
index 0000000..bd045b9
--- /dev/null
@@ -0,0 +1,30 @@
+# Copyright 2019 Nokia
+# Copyright 2019 ENEA
+
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+#
+#     http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+
+from hw_detector.hw_type import HWType
+
+class HWFALCON(HWType):
+    def __init__(self):
+        super(HWFALCON, self).__init__()
+        self.matches = {'Board Product' : 'FALCON'}
+        self.hwtype = 'AMPERE'
+        self.vendor_name = 'AMPERE'
+        self.productfamily = 'FALCON'
+        self.disk_map = {'os': '/dev/sda',
+                         'osd' : ['/dev/sdb',
+                                  '/dev/sdc',
+                                  '/dev/sdd'
+                                 ]
+                        }