Commit bdb7d4e8 authored by Michael Hanselmann's avatar Michael Hanselmann

Update command line help and manpages with mandatory options

Reviewed-by: ultrotter
parent 3cf7c9fa
...@@ -94,19 +94,22 @@ ...@@ -94,19 +94,22 @@
<command>import</command> <command>import</command>
<arg choice="req">-n <replaceable>node<optional>:secondary-node</optional></replaceable></arg> <arg choice="req">-n <replaceable>node<optional>:secondary-node</optional></replaceable></arg>
<arg>-s <replaceable>disksize</replaceable></arg> <arg>-s <replaceable>disksize</replaceable></arg>
<sbr>
<arg>--swap-size <replaceable>disksize</replaceable></arg> <arg>--swap-size <replaceable>disksize</replaceable></arg>
<arg>-m <replaceable>memsize</replaceable></arg> <arg>-m <replaceable>memsize</replaceable></arg>
<arg>-b <replaceable>bridge</replaceable></arg> <arg>-b <replaceable>bridge</replaceable></arg>
<sbr> <sbr>
<arg choice="req">-t<group> <arg choice="req">-t<group>
<arg>diskless</arg> <arg>diskless</arg>
<arg>plain</arg> <arg>plain</arg>
<arg>local_raid1</arg> <arg>local_raid1</arg>
<arg>remote_raid1</arg> <arg>remote_raid1</arg>
<arg>drbd</arg> <arg>drbd</arg>
</group> </group></arg>
</arg>
<sbr> <sbr>
<arg choice="req">--src-node=<replaceable>source-node</replaceable></arg> <arg choice="req">--src-node=<replaceable>source-node</replaceable></arg>
<arg choice="req">--src-dir=<replaceable>source-dir</replaceable></arg> <arg choice="req">--src-dir=<replaceable>source-dir</replaceable></arg>
<arg choice="req"><replaceable>instance</replaceable></arg> <arg choice="req"><replaceable>instance</replaceable></arg>
......
...@@ -66,37 +66,46 @@ ...@@ -66,37 +66,46 @@
<arg>--swap-size <replaceable>disksize</replaceable></arg> <arg>--swap-size <replaceable>disksize</replaceable></arg>
<arg>-m <replaceable>memsize</replaceable></arg> <arg>-m <replaceable>memsize</replaceable></arg>
<sbr> <sbr>
<arg>-o <replaceable>os-type</replaceable></arg>
<arg>-b <replaceable>bridge</replaceable></arg> <arg>-b <replaceable>bridge</replaceable></arg>
<arg>--mac <replaceable>MAC-address</replaceable></arg> <arg>--mac <replaceable>MAC-address</replaceable></arg>
<sbr>
<arg>--hvm-boot-order <replaceable>boot-order</replaceable></arg> <arg>--hvm-boot-order <replaceable>boot-order</replaceable></arg>
<sbr> <sbr>
<arg>--kernel <group choice="req">
<arg>--kernel<group choice="req">
<arg>default</arg> <arg>default</arg>
<arg><replaceable>kernel_path</replaceable></arg> <arg><replaceable>kernel_path</replaceable></arg>
</group></arg> </group></arg>
<sbr> <sbr>
<arg>--initrd <group choice="req">
<arg>--initrd<group choice="req">
<arg>default</arg> <arg>default</arg>
<arg>none</arg> <arg>none</arg>
<arg><replaceable>initrd_path</replaceable></arg> <arg><replaceable>initrd_path</replaceable></arg>
</group> </arg> </group></arg>
<sbr> <sbr>
<arg>--file-storage-dir <replaceable>dir_path</replaceable></arg> <arg>--file-storage-dir <replaceable>dir_path</replaceable></arg>
<arg>--file-driver <group choice="req"> <arg>--file-driver<group choice="req">
<arg>loop</arg> <arg>loop</arg>
<arg>blktap</arg> <arg>blktap</arg>
</group></arg> </group></arg>
<sbr> <sbr>
<arg choice="req">-t<group>
<arg choice="req">-t<group choice="req">
<arg>diskless</arg> <arg>diskless</arg>
<arg>file</arg> <arg>file</arg>
<arg>plain</arg> <arg>plain</arg>
<arg>drbd</arg> <arg>drbd</arg>
</group> </group></arg>
</arg>
<sbr> <sbr>
<arg choice="req">-n <replaceable>node<optional>:secondary-node</optional></replaceable></arg> <arg choice="req">-n <replaceable>node<optional>:secondary-node</optional></replaceable></arg>
<arg choice="req">-o <replaceable>os-type</replaceable></arg>
<sbr>
<arg choice="req"><replaceable>instance</replaceable></arg> <arg choice="req"><replaceable>instance</replaceable></arg>
</cmdsynopsis> </cmdsynopsis>
......
...@@ -187,7 +187,10 @@ commands = { ...@@ -187,7 +187,10 @@ commands = {
help="Don't shutdown the instance (unsafe)"), ], help="Don't shutdown the instance (unsafe)"), ],
"-n <target_node> [opts...] <name>", "-n <target_node> [opts...] <name>",
"Exports an instance to an image"), "Exports an instance to an image"),
'import': (ImportInstance, ARGS_ONE, import_opts, "[opts...] <name>", 'import': (ImportInstance, ARGS_ONE, import_opts,
("[...] -t disk-type -n node[:secondary-node]"
" --src-node node --src-dir dir"
" <name>"),
"Imports an instance from an exported image"), "Imports an instance from an exported image"),
'remove': (RemoveExport, ARGS_ONE, 'remove': (RemoveExport, ARGS_ONE,
[DEBUG_OPT], [DEBUG_OPT],
......
...@@ -44,6 +44,7 @@ _LIST_DEF_FIELDS = [ ...@@ -44,6 +44,7 @@ _LIST_DEF_FIELDS = [
"name", "os", "pnode", "status", "oper_ram", "name", "os", "pnode", "status", "oper_ram",
] ]
def _ExpandMultiNames(mode, names): def _ExpandMultiNames(mode, names):
"""Expand the given names using the passed mode. """Expand the given names using the passed mode.
...@@ -795,7 +796,7 @@ add_opts = [ ...@@ -795,7 +796,7 @@ add_opts = [
commands = { commands = {
'add': (AddInstance, ARGS_ONE, add_opts, 'add': (AddInstance, ARGS_ONE, add_opts,
"[opts...] <name>", "[...] -t disk-type -n node[:secondary-node] -o os-type <name>",
"Creates and adds a new instance to the cluster"), "Creates and adds a new instance to the cluster"),
'console': (ConnectToInstanceConsole, ARGS_ONE, 'console': (ConnectToInstanceConsole, ARGS_ONE,
[DEBUG_OPT, [DEBUG_OPT,
......
...@@ -295,7 +295,7 @@ commands = { ...@@ -295,7 +295,7 @@ commands = {
default=False, action="store_true", default=False, action="store_true",
help="Readd old node after replacing it"), help="Readd old node after replacing it"),
], ],
"[-s ip] <node_name>", "Add a node to the cluster"), "[-s ip] [--readd] <node_name>", "Add a node to the cluster"),
'evacuate': (EvacuateNode, ARGS_FIXED(2), 'evacuate': (EvacuateNode, ARGS_FIXED(2),
[DEBUG_OPT, FORCE_OPT], [DEBUG_OPT, FORCE_OPT],
"[-f] <src> <dst>", "[-f] <src> <dst>",
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment