cli: Shorten some long --help examples
This commit is contained in:
parent
d0f44491ff
commit
ac6706208d
|
@ -766,9 +766,8 @@ def parse_args():
|
|||
insg.add_argument("--initrd-inject", action="append",
|
||||
help=_("Add given file to root of initrd from --location"))
|
||||
cli.add_distro_options(insg)
|
||||
cli.add_boot_option(insg)
|
||||
cli.add_boot_options(insg)
|
||||
insg.add_argument("--init", help=argparse.SUPPRESS)
|
||||
cli.add_idmap_option(insg)
|
||||
|
||||
stog = parser.add_argument_group(_("Storage Configuration"))
|
||||
cli.add_disk_option(stog)
|
||||
|
|
3
virt-xml
3
virt-xml
|
@ -346,8 +346,7 @@ def parse_args():
|
|||
cli.add_memory_option(g)
|
||||
cli.vcpu_cli_options(g, editexample=True)
|
||||
cli.add_guest_xml_options(g)
|
||||
cli.add_boot_option(g)
|
||||
cli.add_idmap_option(g)
|
||||
cli.add_boot_options(g)
|
||||
cli.add_fs_option(g)
|
||||
cli.add_device_options(g)
|
||||
|
||||
|
|
|
@ -742,8 +742,7 @@ def add_device_options(devg, sound_back_compat=False):
|
|||
"--tpm /dev/tpm"))
|
||||
devg.add_argument("--rng", action="append",
|
||||
help=_("Configure a guest RNG device. Ex:\n"
|
||||
"--rng /dev/random\n"
|
||||
"--rng egd,backend_host=localhost,backend_service=708,backend_type=tcp"))
|
||||
"--rng /dev/random"))
|
||||
devg.add_argument("--panic", action="append",
|
||||
help=_("Configure a guest panic device. Ex:\n"
|
||||
"--panic default"))
|
||||
|
@ -791,12 +790,14 @@ def add_guest_xml_options(geng):
|
|||
geng.add_argument("--pm", help=_("Config power management features"))
|
||||
|
||||
|
||||
def add_boot_option(insg):
|
||||
def add_boot_options(insg):
|
||||
insg.add_argument("--boot",
|
||||
help=_("Optionally configure post-install boot order, "
|
||||
"menu, permanent kernel boot, etc. Ex:\n"
|
||||
"--boot hd,cdrom,menu=on\n"
|
||||
"--boot init=/sbin/init (for containers)"))
|
||||
help=_("Configure guest boot settings. Ex:\n"
|
||||
"--boot hd,cdrom,menu=on\n"
|
||||
"--boot init=/sbin/init (for containers)"))
|
||||
insg.add_argument("--idmap",
|
||||
help=_("Enable user namespace for LXC container. Ex.\n"
|
||||
"--idmap uid_start=0,uid_target=1000,uid_count=10"))
|
||||
|
||||
|
||||
def add_disk_option(stog, editexample=False):
|
||||
|
@ -811,12 +812,6 @@ def add_disk_option(stog, editexample=False):
|
|||
"--disk=?") + editmsg)
|
||||
|
||||
|
||||
def add_idmap_option(insg):
|
||||
insg.add_argument("--idmap",
|
||||
help=_("Enable user namespace for LXC container. Ex.\n"
|
||||
"--idmap uid_start=0,uid_target=1000,uid_count=10,gid_start=0,gid_target=1000,gid_count=10"))
|
||||
|
||||
|
||||
#############################################
|
||||
# CLI complex parsing helpers #
|
||||
# (for options like --disk, --network, etc. #
|
||||
|
|
Loading…
Reference in New Issue