summaryrefslogtreecommitdiffstats
path: root/commands/logicalfile/lmi
diff options
context:
space:
mode:
authorMichal Minar <miminar@redhat.com>2013-11-06 12:00:19 +0100
committerMichal Minar <miminar@redhat.com>2013-11-06 12:13:17 +0100
commit98ba6b56dbc1d08e6f0971fda91b0941ff5452fe (patch)
treecfddf356f520432c1fe210b8e8848fa71900a5b0 /commands/logicalfile/lmi
parentcc8c8310c027393d7f9475f7dcb600d0102c83ef (diff)
downloadopenlmi-scripts-98ba6b56dbc1d08e6f0971fda91b0941ff5452fe.tar.gz
openlmi-scripts-98ba6b56dbc1d08e6f0971fda91b0941ff5452fe.tar.xz
openlmi-scripts-98ba6b56dbc1d08e6f0971fda91b0941ff5452fe.zip
logicalfile: do not hardcode ComputerSystem class name
Diffstat (limited to 'commands/logicalfile/lmi')
-rw-r--r--commands/logicalfile/lmi/scripts/logicalfile/logicalfile.py5
1 files changed, 3 insertions, 2 deletions
diff --git a/commands/logicalfile/lmi/scripts/logicalfile/logicalfile.py b/commands/logicalfile/lmi/scripts/logicalfile/logicalfile.py
index dc0211e..5727935 100644
--- a/commands/logicalfile/lmi/scripts/logicalfile/logicalfile.py
+++ b/commands/logicalfile/lmi/scripts/logicalfile/logicalfile.py
@@ -34,6 +34,7 @@
Logicalfile management functions.
"""
+from lmi.scripts.common import get_computer_system
from lmi.scripts.common import get_logger
from lmi.scripts.common.errors import LmiFailed
from lmi.scripts.common.formatter import command as fcmd
@@ -66,7 +67,7 @@ def get_directory_name_properties(ns, directory):
:param directory: Full path to the directory.
:rtype: LMIInstanceName
"""
- system = ns.Linux_ComputerSystem.first_instance()
+ system = get_computer_system(ns)
return {'CSCreationClassName':system.classname,
'CSName':system.name,
'CreationClassName':'LMI_UnixDirectory',
@@ -178,7 +179,7 @@ def lf_show(ns, target):
:type target: string
:param target: Full path to the target.
"""
- system = ns.Linux_ComputerSystem.first_instance()
+ system = get_computer_system(ns)
uf_name = ns.LMI_UnixFile.new_instance_name(
{'CSCreationClassName':system.classname,
'CSName':system.name,