summaryrefslogtreecommitdiffstats
path: root/commands/storage/lmi
diff options
context:
space:
mode:
authorJan Safranek <jsafrane@redhat.com>2014-01-21 10:01:52 +0100
committerJan Safranek <jsafrane@redhat.com>2014-01-21 10:01:52 +0100
commite881002cc2f46a953858c1ff02ca9f1a4787c355 (patch)
treea4caa2815b1ad9bcf15ee106a3cfc0be666fa45c /commands/storage/lmi
parentd8f62d1768cb10693966c7e9da1ff7f140f8984d (diff)
downloadopenlmi-scripts-e881002cc2f46a953858c1ff02ca9f1a4787c355.tar.gz
openlmi-scripts-e881002cc2f46a953858c1ff02ca9f1a4787c355.tar.xz
openlmi-scripts-e881002cc2f46a953858c1ff02ca9f1a4787c355.zip
Add option descriptions to storage commands.
All commands should have description of all arguments in its help, nobody seems to read documentation.
Diffstat (limited to 'commands/storage/lmi')
-rw-r--r--commands/storage/lmi/scripts/storage/lv_cmd.py15
-rw-r--r--commands/storage/lmi/scripts/storage/partition_cmd.py24
-rw-r--r--commands/storage/lmi/scripts/storage/partitiontable_cmd.py20
-rw-r--r--commands/storage/lmi/scripts/storage/raid_cmd.py19
-rw-r--r--commands/storage/lmi/scripts/storage/storage_cmd.py21
-rw-r--r--commands/storage/lmi/scripts/storage/vg_cmd.py26
6 files changed, 121 insertions, 4 deletions
diff --git a/commands/storage/lmi/scripts/storage/lv_cmd.py b/commands/storage/lmi/scripts/storage/lv_cmd.py
index b7c9ffe..191ce10 100644
--- a/commands/storage/lmi/scripts/storage/lv_cmd.py
+++ b/commands/storage/lmi/scripts/storage/lv_cmd.py
@@ -46,13 +46,22 @@ Commands:
create Create a logical volume on given volume group.
- Size can be specified as number of extents using 'e' suffix,
- e.g. '100e' is 100 extents.
-
delete Delete given logical volume.
show Show detailed information about given Logical Volumes. If no
Logical Volumes are provided, all of them are displayed.
+
+Options:
+ vg Name of the volume group, with or without `/dev/` prefix.
+
+ size Size of the new logical volume, by default in bytes.
+ 'T', 'G', 'M' or 'K' suffix can be used to use specify other
+ units (TiB, GiB, MiB and KiB) - '1K' specifies 1 KiB
+ (= 1024 bytes).
+ The suffix is case insensitive, i.e. 1g = 1G = 1073741824 bytes.
+
+ 'E' suffix can be used to specify number of volume group
+ extents, '100e' means 100 extents.
"""
from lmi.scripts.common import command
diff --git a/commands/storage/lmi/scripts/storage/partition_cmd.py b/commands/storage/lmi/scripts/storage/partition_cmd.py
index ce11120..325d6a0 100644
--- a/commands/storage/lmi/scripts/storage/partition_cmd.py
+++ b/commands/storage/lmi/scripts/storage/partition_cmd.py
@@ -70,7 +70,29 @@ Commands:
partitions are provided, all of them are displayed.
Options:
- size Size of the partition in sectors.
+ size Size of the new partition volume, by default in sectors.
+ 'T', 'G', 'M' or 'K' suffix can be used to use specify other
+ units (TiB, GiB, MiB and KiB) - '1K' specifies 1 KiB
+ (= 1024 bytes).
+ The suffix is case insensitive, i.e. 1g = 1G = 1073741824 bytes.
+
+ device,
+ partition Identifier of the device/partition. Either one of:
+
+ * DeviceID of appropriate CIM_StorageExtent object. This is
+ internal OpenLMI ID of the device and it should be stable
+ across system reboots.
+
+ * Device name directly in /dev directory, such as '/dev/sda'.
+ This device name is available as Name property of
+ CIM_StorageExtent object.
+
+ * Name of MD RAID or logical volume. This method cannot be used
+ when the name is not unique, for example when there are two
+ logical volumes with the same name, allocated from different
+ volume groups. This name is available as ElementName
+ property of CIM_StorageExtent object.
+
--logical Override the automatic behavior and request logical partition.
--extended Override the automatic behavior and request extended partition.
"""
diff --git a/commands/storage/lmi/scripts/storage/partitiontable_cmd.py b/commands/storage/lmi/scripts/storage/partitiontable_cmd.py
index 407c921..a87f339 100644
--- a/commands/storage/lmi/scripts/storage/partitiontable_cmd.py
+++ b/commands/storage/lmi/scripts/storage/partitiontable_cmd.py
@@ -48,6 +48,26 @@ Commands:
show Show detailed information about partition table on given
devices. If no devices are provided, all of them are displayed.
+
+Options:
+ device Identifier of the device. Either one of:
+
+ * DeviceID of appropriate CIM_StorageExtent object. This is
+ internal OpenLMI ID of the device and it should be stable
+ across system reboots.
+
+ * Device name directly in /dev directory, such as '/dev/sda'.
+ This device name is available as Name property of
+ CIM_StorageExtent object.
+
+ * Name of MD RAID or logical volume. This method cannot be used
+ when the name is not unique, for example when there are two
+ logical volumes with the same name, allocated from different
+ volume groups. This name is available as ElementName
+ property of CIM_StorageExtent object.
+
+ --gpt Create GPT partition table (default).
+ --msdos Create MS-DOS partition table.
"""
from lmi.scripts.common import command
diff --git a/commands/storage/lmi/scripts/storage/raid_cmd.py b/commands/storage/lmi/scripts/storage/raid_cmd.py
index c33596f..6acfb33 100644
--- a/commands/storage/lmi/scripts/storage/raid_cmd.py
+++ b/commands/storage/lmi/scripts/storage/raid_cmd.py
@@ -48,6 +48,25 @@ Commands:
show Show detailed information about given MD RAID devices. If no
devices are provided, all MD RAID devices are displayed.
+
+Options:
+ device Identifier of the device. Either one of:
+
+ * DeviceID of appropriate CIM_StorageExtent object. This is
+ internal OpenLMI ID of the device and it should be stable
+ across system reboots.
+
+ * Device name directly in /dev directory, such as '/dev/sda'.
+ This device name is available as Name property of
+ CIM_StorageExtent object.
+
+ * Name of MD RAID or logical volume. This method cannot be used
+ when the name is not unique, for example when there are two
+ logical volumes with the same name, allocated from different
+ volume groups. This name is available as ElementName
+ property of CIM_StorageExtent object.
+
+ level RAID level. Supported levels are: 0, 1, 4, 5, 6, 10.
"""
from lmi.scripts.common import command
diff --git a/commands/storage/lmi/scripts/storage/storage_cmd.py b/commands/storage/lmi/scripts/storage/storage_cmd.py
index 5024edc..3493a00 100644
--- a/commands/storage/lmi/scripts/storage/storage_cmd.py
+++ b/commands/storage/lmi/scripts/storage/storage_cmd.py
@@ -71,6 +71,27 @@ Commands:
If a device is provided, tree starts with the device
and all dependent devices are shown.
+
+Options:
+
+ device Identifier of the device. Either one of:
+
+ * DeviceID of appropriate CIM_StorageExtent object. This is
+ internal OpenLMI ID of the device and it should be stable
+ across system reboots.
+
+ * Device name directly in /dev directory, such as '/dev/sda'.
+ This device name is available as Name property of
+ CIM_StorageExtent object.
+
+ * Name of MD RAID or logical volume. This method cannot be used
+ when the name is not unique, for example when there are two
+ logical volumes with the same name, allocated from different
+ volume groups. This name is available as ElementName
+ property of CIM_StorageExtent object.
+
+ --deep Show all ancestors/children the device, not only the immediate
+ ones.
"""
from lmi.shell.LMIUtil import lmi_isinstance
diff --git a/commands/storage/lmi/scripts/storage/vg_cmd.py b/commands/storage/lmi/scripts/storage/vg_cmd.py
index 5d8bf7e..fda25bc 100644
--- a/commands/storage/lmi/scripts/storage/vg_cmd.py
+++ b/commands/storage/lmi/scripts/storage/vg_cmd.py
@@ -48,6 +48,32 @@ Commands:
show Show detailed information about given Volume Groups. If no
Volume Groups are provided, all of them are displayed.
+
+Options:
+
+ device Identifier of the device. Either one of:
+
+ * DeviceID of appropriate CIM_StorageExtent object. This is
+ internal OpenLMI ID of the device and it should be stable
+ across system reboots.
+
+ * Device name directly in /dev directory, such as '/dev/sda'.
+ This device name is available as Name property of
+ CIM_StorageExtent object.
+
+ * Name of MD RAID or logical volume. This method cannot be used
+ when the name is not unique, for example when there are two
+ logical volumes with the same name, allocated from different
+ volume groups. This name is available as ElementName
+ property of CIM_StorageExtent object.
+
+ vg Name of the volume group, with or without `/dev/` prefix.
+
+ size Requested extent size of the new volume group, by default in
+ bytes. 'T', 'G', 'M' or 'K' suffix can be used to use specify
+ other units (TiB, GiB, MiB and KiB) - '1K' specifies 1 KiB
+ (=1024 bytes).
+ The suffix is case insensitive, i.e. 1g = 1G = 1073741824 bytes.
"""
from lmi.scripts.common import command