summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMichal Minar <miminar@redhat.com>2014-04-09 08:05:43 +0200
committerMichal Minar <miminar@redhat.com>2014-04-09 08:05:43 +0200
commit8f91c6731265fc66d176bbfda170875c4347d823 (patch)
tree59c4c779782e1160e25821943597e749ae20f189
parent9a5c4e5672cb006d3d6af8f07e551c2df93401d4 (diff)
parent1e421da13b9f44de3a1f4a3980f4ff0bee2e9717 (diff)
downloadopenlmi-scripts-8f91c6731265fc66d176bbfda170875c4347d823.tar.gz
openlmi-scripts-8f91c6731265fc66d176bbfda170875c4347d823.tar.xz
openlmi-scripts-8f91c6731265fc66d176bbfda170875c4347d823.zip
Merge pull request #79 from jsafrane/devel/fix-mount-delete
Fixed 'lmi storage mount delete <target>'
-rw-r--r--commands/storage/lmi/scripts/storage/cmd/mount.py9
1 files changed, 9 insertions, 0 deletions
diff --git a/commands/storage/lmi/scripts/storage/cmd/mount.py b/commands/storage/lmi/scripts/storage/cmd/mount.py
index 3a3c9ed..c59d7cc 100644
--- a/commands/storage/lmi/scripts/storage/cmd/mount.py
+++ b/commands/storage/lmi/scripts/storage/cmd/mount.py
@@ -201,6 +201,15 @@ class MountCreate(command.LmiCheckResult):
class MountDelete(command.LmiCheckResult):
EXPECT = None
+ def transform_options(self, options):
+ """
+ There is only one <target> option, but docopt passes it as array
+ (because in other commands it is used with '...'). So let's
+ transform it to scalar.
+ """
+ options['<target>'] = options.pop('<target>')[0]
+
+
def execute(self, ns, target):
"""
Implementation of 'mount delete' command.