summaryrefslogtreecommitdiffstats
path: root/commands/logicalfile/lmi
diff options
context:
space:
mode:
authorJan Synacek <jsynacek@redhat.com>2013-09-16 10:33:04 +0200
committerJan Synacek <jsynacek@redhat.com>2013-09-16 10:33:28 +0200
commitfa47a845588fe1265c0d5a4e0e60be9dc48ad72b (patch)
treecfe3c6312853fc85c578f10c481346221498281f /commands/logicalfile/lmi
parent8c134afdc924980a6d6af9f8f93fe6e51c16031a (diff)
downloadopenlmi-scripts-fa47a845588fe1265c0d5a4e0e60be9dc48ad72b.tar.gz
openlmi-scripts-fa47a845588fe1265c0d5a4e0e60be9dc48ad72b.tar.xz
openlmi-scripts-fa47a845588fe1265c0d5a4e0e60be9dc48ad72b.zip
logicalfile: improve doc and simplify callables in classes
Diffstat (limited to 'commands/logicalfile/lmi')
-rw-r--r--commands/logicalfile/lmi/scripts/logicalfile/lf_cmd.py41
1 files changed, 10 insertions, 31 deletions
diff --git a/commands/logicalfile/lmi/scripts/logicalfile/lf_cmd.py b/commands/logicalfile/lmi/scripts/logicalfile/lf_cmd.py
index 3a072f8..bbe8c28 100644
--- a/commands/logicalfile/lmi/scripts/logicalfile/lf_cmd.py
+++ b/commands/logicalfile/lmi/scripts/logicalfile/lf_cmd.py
@@ -46,12 +46,12 @@ Commands:
The files and directories are listed in a tree-like structure.
Possible listed file types are:
- F : Regular data file.
- Dev : Device file. Can be either block or character device.
- Dir : Directory.
- P : Pipe file.
- L : Symbolic link.
- S : Unix socket.
+ * F : Regular data file.
+ * Dev : Device file. Can be either block or character device.
+ * Dir : Directory.
+ * P : Pipe file.
+ * L : Symbolic link.
+ * S : Unix socket.
createdir Create a directory. The parent directory must exist.
@@ -67,41 +67,20 @@ from lmi.scripts.logicalfile import logicalfile
class Lister(command.LmiLister):
COLUMNS = ('Type', 'Name', 'Mode', 'Current SELinux Context')
OPT_NO_UNDERSCORES = True
-
- def execute(self, ns, directory, depth=0):
- """
- Implementation of 'lf list' command.
- """
- return logicalfile.lf_list(ns, directory, depth)
-
+ CALLABLE = logicalfile.lf_list
class Show(command.LmiLister):
COLUMNS = ('Name', 'Value')
OPT_NO_UNDERSCORES = True
-
- def execute(self, ns, target):
- """
- Implementation of 'lf show' command.
- """
- return logicalfile.lf_show(ns, target)
+ CALLABLE = logicalfile.lf_show
class CreateDir(command.LmiCheckResult):
EXPECT = None
-
- def execute(self, ns, directory):
- """
- Implementation of 'lf createdir' command.
- """
- return logicalfile.lf_createdir(ns, directory)
+ CALLABLE = logicalfile.lf_createdir
class DeleteDir(command.LmiCheckResult):
EXPECT = None
-
- def execute(self, ns, directory):
- """
- Implementation of 'lf deletedir' command.
- """
- return logicalfile.lf_deletedir(ns, directory)
+ CALLABLE = logicalfile.lf_deletedir
Lf = command.register_subcommands(
'Lf', __doc__,