summaryrefslogtreecommitdiffstats
path: root/commands/storage/doc
diff options
context:
space:
mode:
authorMichal Minar <miminar@redhat.com>2013-09-28 15:46:45 +0200
committerMichal Minar <miminar@redhat.com>2013-09-28 16:44:40 +0200
commit5c06e633987e982af476b44afd1284d9780f74d3 (patch)
treefc1d090da237ec0abd20944a73e23fabf54126bd /commands/storage/doc
parent30315e94cedff6e9ba29504d759cacb330accbeb (diff)
downloadopenlmi-scripts-5c06e633987e982af476b44afd1284d9780f74d3.tar.gz
openlmi-scripts-5c06e633987e982af476b44afd1284d9780f74d3.tar.xz
openlmi-scripts-5c06e633987e982af476b44afd1284d9780f74d3.zip
improved makefiles for generating cmd line doc
Determine the command names from setup.py for particular command libraries. Updated storage command line documentation.
Diffstat (limited to 'commands/storage/doc')
-rw-r--r--commands/storage/doc/Makefile28
-rw-r--r--commands/storage/doc/cmdline.generated203
2 files changed, 94 insertions, 137 deletions
diff --git a/commands/storage/doc/Makefile b/commands/storage/doc/Makefile
index e55c3b1..59e8f7c 100644
--- a/commands/storage/doc/Makefile
+++ b/commands/storage/doc/Makefile
@@ -6,6 +6,7 @@ SPHINXOPTS =
SPHINXBUILD = sphinx-build
PAPER =
BUILDDIR = _build
+COMMAND_NAME := storage
# Internal variables.
PAPEROPT_a4 = -D latex_paper_size=a4
@@ -14,7 +15,7 @@ ALLSPHINXOPTS = -d $(BUILDDIR)/doctrees $(PAPEROPT_$(PAPER)) $(SPHINXOPTS) .
# the i18n builder cannot share the environment and doctrees with the others
I18NSPHINXOPTS = $(PAPEROPT_$(PAPER)) $(SPHINXOPTS) .
-.PHONY: help clean html dirhtml singlehtml pickle json htmlhelp qthelp devhelp epub latex latexpdf text man changes linkcheck doctest gettext
+.PHONY: help clean html dirhtml singlehtml pickle json htmlhelp qthelp devhelp epub latex latexpdf text man changes linkcheck doctest gettext cmdregen cmdline.generated
help:
@echo "Please use \`make <target>' where <target> is one of"
@@ -40,16 +41,25 @@ help:
@echo " "
@echo " cmdregen to regenerate cmdline.generate with actual content from installed lmi help"
-cmdregen:
+cmdregen: cmdline.generated
+
+cmdline.generated:
+ if ! python -c 'import lmi.scripts.$(COMMAND_NAME)' >/dev/null; then \
+ echo "Please install install the command library first." >&2; \
+ exit 1; \
+ fi
( \
- echo "!!!!!!!!!"; \
- echo ".. This is generated file. Use 'make cmdregen' to regenerate it from installed 'lmi help XXX'"; \
- echo "!!!!!!!!!"; \
- echo ;\
- for i in device partition-table partition raid vg lv fs; \
- do lmi help $$i | python ../../../tools/help2rst $$i | tr -d '\033' |sed 's/..1034h//' ; \
+ echo ".."; \
+ echo " !!!!!!!!!"; \
+ echo " This is generated file. Use 'make cmdregen' to regenerate it from installed 'lmi help XXX'"; \
+ echo " !!!!!!!!!"; \
+ echo ; \
+ for i in `sed -n '/entry_points/,/)/p' ../setup.py | \
+ sed -n "s/\s*,\?['\"]\s*\([a-z-]\+\)\s*=.*/\1/p"`; do \
+ lmi help $$i | python ../../../tools/help2rst $$i | \
+ tr -d '\033' |sed 's/..1034h//'; \
done \
- ) > cmdline.generated
+ ) > $@
clean:
-rm -rf $(BUILDDIR)/*
diff --git a/commands/storage/doc/cmdline.generated b/commands/storage/doc/cmdline.generated
index bf21255..a226ec4 100644
--- a/commands/storage/doc/cmdline.generated
+++ b/commands/storage/doc/cmdline.generated
@@ -1,24 +1,23 @@
-!!!!!!!!!
-.. This is generated file. Use 'make cmdregen' to regenerate it from installed 'lmi help XXX'
-!!!!!!!!!
+..
+ !!!!!!!!!
+ This is generated file. Use 'make cmdregen' to regenerate it from installed 'lmi help XXX'
+ !!!!!!!!!
-device
-------
+fs
+--
-Basic device information.
+Filesystem and other data format management.
**Usage:**
- **lmi** **device** **list** [ \ *<device>*\ ...]
-
- **lmi** **device** **show** [ \ *<device>*\ ...]
+ **lmi** **fs** **list** [\ **--all**\ ] [ \ *<device>*\ ...]
- **lmi** **device** **depends** [ \ **--deep**\ ] [ \ *<device>*\ ...]
+ **lmi** **fs** **create** [ \ **--label**\ =\ *<label>*\ ] \ *<fstype>*\ \ *<device>*\ ...
- **lmi** **device** **provides** [ \ **--deep**\ ] [ \ *<device>*\ ...]
+ **lmi** **fs** **delete** \ *<device>*\ ...
- **lmi** **device** **tree** [ \ *<device>*\ ]
+ **lmi** **fs** list-supported
@@ -26,77 +25,32 @@ Basic device information.
**list**
- List short information about given device. If no devices
- are given, all devices are listed.
-
-
- **show**
- Show detailed information about given devices. If no devices
- are provided, all of them are displayed.
-
-
- **provides**
- Show devices, which are created from given devices
- (= show children of the devices).
-
- For example, if disk is provided, all partitions on it are
- returned. If 'deep' is used, all RAIDs, Volume Groups and
- Logical Volumes indirectly allocated from it are returned too.
-
-
- **depends**
- Show devices, which are required by given devices to operate
- correctly (= show parents of the devices).
-
- For example, if a Logical Volume is provided, its Volume Group
- is returned. If 'deep' is used, also all Physical Volumes and
- disk are returned.
-
-
- **tree**
- Show tree of devices, similar to lsblk.
- (Note that the output is really crude and needs to be worked
- on).
-
- If no device is provided, all devices are shown, starting
- with physical disks.
-
- If a device is provided, tree starts with the device
- and all dependent devices are shown.
-
-partition-table
----------------
-
-Partition management.
-
-
-**Usage:**
-
- **lmi** **partition-table** **list** [ \ *<device>*\ ...]
-
- **lmi** **partition-table** **create** [ \ **--gpt**\ | \ **--msdos**\ ] \ *<device>*\ ...
-
- **lmi** **partition-table** **show** [ \ *<device>*\ ...]
-
-
+ List filesystems and and other data formats (RAID metadata, ...)
+ on given devices.
+ If no devices are provided, all filesystems are listed.
+ If --all option is set, all filesystem, including system ones
+ like tmpfs, cgroups, procfs, sysfs etc are listed.
-**Commands:**
+ **create**
+ Format device(s) with given filesystem.
+ If more devices are given, the filesystem will span
+ over these devices (currently supported only by btrfs).
- **list**
- List partition tables on given device.
- If no devices are provided, all partition tables are listed.
+ For list of available filesystem types, see output of
+ lmi fs list-supported.
- **create**
- Create a partition table on given devices. The devices must be
- empty, i.e. must not have any partitions on them. GPT partition
- table is created by default.
+ **delete**
+ Delete given filesystem or data format (like partition table,
+ RAID metadata, LUKS, physical volume metadata etc)
+ on given devices.
- **show**
- Show detailed information about partition table on given
- devices. If no devices are provided, all of them are displayed.
+ **list-supported**
+
+ List supported filesystems, which can be used as
+ lmi fs create <fstype> option.
partition
---------
@@ -167,21 +121,19 @@ Partition management.
**--extended**
Override the automatic behavior and request extended partition.
-raid
-----
+partition-table
+---------------
-MD RAID management.
+Partition management.
**Usage:**
- **lmi** **raid** list
-
- **lmi** **raid** **create** [ \ **--name**\ =\ *<name>*\ ] \ *<level>*\ \ *<device>*\ ...
+ **lmi** **partition-table** **list** [ \ *<device>*\ ...]
- **lmi** **raid** **delete** \ *<device>*\ ...
+ **lmi** **partition-table** **create** [ \ **--gpt**\ | \ **--msdos**\ ] \ *<device>*\ ...
- **lmi** **raid** **show** [ \ *<device>*\ ...]
+ **lmi** **partition-table** **show** [ \ *<device>*\ ...]
@@ -189,36 +141,35 @@ MD RAID management.
**list**
- List all MD RAID devices on the system.
+ List partition tables on given device.
+ If no devices are provided, all partition tables are listed.
**create**
- Create MD RAID array with given RAID level from list of devices.
-
-
- **delete**
- Delete given MD RAID devices.
+ Create a partition table on given devices. The devices must be
+ empty, i.e. must not have any partitions on them. GPT partition
+ table is created by default.
**show**
- Show detailed information about given MD RAID devices. If no
- devices are provided, all MD RAID devices are displayed.
+ Show detailed information about partition table on given
+ devices. If no devices are provided, all of them are displayed.
-vg
---
+raid
+----
-Volume Group management.
+MD RAID management.
**Usage:**
- **lmi** **vg** list
+ **lmi** **raid** list
- **lmi** **vg** **create** [ \ **--extent-size**\ =\ *<size>*\ ] \ *<name>*\ \ *<device>*\ ...
+ **lmi** **raid** **create** [ \ **--name**\ =\ *<name>*\ ] \ *<level>*\ \ *<device>*\ ...
- **lmi** **vg** **delete** \ *<vg>*\ ...
+ **lmi** **raid** **delete** \ *<device>*\ ...
- **lmi** **vg** **show** [ \ *<vg>*\ ...]
+ **lmi** **raid** **show** [ \ *<device>*\ ...]
@@ -226,20 +177,20 @@ Volume Group management.
**list**
- List all volume groups on the system.
+ List all MD RAID devices on the system.
**create**
- Create Volume Group with given name from list of devices.
+ Create MD RAID array with given RAID level from list of devices.
**delete**
- Delete given Volume Groups.
+ Delete given MD RAID devices.
**show**
- Show detailed information about given Volume Groups. If no
- Volume Groups are provided, all of them are displayed.
+ Show detailed information about given MD RAID devices. If no
+ devices are provided, all MD RAID devices are displayed.
lv
--
@@ -283,21 +234,21 @@ Logical Volume management.
Show detailed information about given Logical Volumes. If no
Logical Volumes are provided, all of them are displayed.
-fs
+vg
--
-Filesystem and other data format management.
+Volume Group management.
**Usage:**
- **lmi** **fs** **list** [\ **--all**\ ] [ \ *<device>*\ ...]
+ **lmi** **vg** list
- **lmi** **fs** **create** [ \ **--label**\ =\ *<label>*\ ] \ *<type>*\ \ *<device>*\ ...
+ **lmi** **vg** **create** [ \ **--extent-size**\ =\ *<size>*\ ] \ *<name>*\ \ *<device>*\ ...
- **lmi** **fs** **delete** \ *<device>*\ ...
+ **lmi** **vg** **delete** \ *<vg>*\ ...
- **lmi** **fs** list-supported
+ **lmi** **vg** **show** [ \ *<vg>*\ ...]
@@ -305,30 +256,26 @@ Filesystem and other data format management.
**list**
- List filesystems and and other data formats (RAID metadata, ...)
- on given devices.
- If no devices are provided, all filesystems are listed.
- If --all option is set, all filesystem, including system ones
- like tmpfs, cgroups, procfs, sysfs etc are listed.
+ List all volume groups on the system.
**create**
- Format device(s) with given filesystem.
- If more devices are given, the filesystem will span
- over these devices (currently supported only by btrfs).
-
- For list of available filesystem types, see output of
- lmi fs list-supported.
+ Create Volume Group with given name from list of devices.
**delete**
- Delete given filesystem or data format (like partition table,
- RAID metadata, LUKS, physical volume metadata etc)
- on given devices.
+ Delete given Volume Groups.
- **list-supported**
-
- List supported filesystems, which can be used as
- lmi fs create <type> option.
+ **show**
+ Show detailed information about given Volume Groups. If no
+ Volume Groups are provided, all of them are displayed.
+
+storage
+-------
+
+
+mount
+-----
+