Skip to content

Commit 015f102

Browse files
author
Michal Minar
committed
hardware: do not hardcode ComputerSystem class name
1 parent 98ba6b5 commit 015f102

File tree

2 files changed

+4
-2
lines changed

2 files changed

+4
-2
lines changed

commands/hardware/lmi/scripts/hardware/__init__.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,8 @@
2828
LMI hardware provider client library.
2929
"""
3030

31+
from lmi.scripts.common import get_computer_system
32+
3133
def get_single_instance(ns, instance_name):
3234
"""
3335
Returns single instance of instance_name.
@@ -80,7 +82,7 @@ def get_system_info(ns):
8082
:returns: Tabular data of system info.
8183
:rtype: List of tuples
8284
"""
83-
i = get_single_instance(ns, 'CIM_ComputerSystem')
85+
i = get_computer_system(ns)
8486
return [('Hostname:', i.Name)]
8587

8688
def get_chassis_info(ns):

commands/hardware/setup.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@
3030
'Environment :: Console',
3131
],
3232

33-
install_requires=['openlmi-scripts'],
33+
install_requires=['openlmi-scripts >= 0.2.4'],
3434

3535
namespace_packages=['lmi', 'lmi.scripts'],
3636
packages=['lmi', 'lmi.scripts', 'lmi.scripts.hardware'],

0 commit comments

Comments
 (0)