From: Chen Hanxiao <chenhanxiao@xxxxxxxxxxxxxx> Add "-c" as short option of "--connect". Replace original "-c" as "-cd" for "--cdrom" This will be much convenient if we operate non-default hypervisor. Signed-off-by: Chen Hanxiao <chenhanxiao@xxxxxxxxxxxxxx> --- man/virt-install.pod | 2 +- man/virt-xml.pod | 2 +- virt-install | 7 ++----- virtinst/cli.py | 2 +- 4 files changed, 5 insertions(+), 8 deletions(-) diff --git a/man/virt-install.pod b/man/virt-install.pod index 119b515..a74ea7d 100644 --- a/man/virt-install.pod +++ b/man/virt-install.pod @@ -48,7 +48,7 @@ Show the help message and exit Show program's version number and exit -=item --connect=URI +=item -c URI, --connect=URI Connect to a non-default hypervisor. If this isn't specified, libvirt will try and choose the most suitable default. diff --git a/man/virt-xml.pod b/man/virt-xml.pod index 177b4b9..29594f3 100644 --- a/man/virt-xml.pod +++ b/man/virt-xml.pod @@ -37,7 +37,7 @@ Show the help message and exit Show program's version number and exit -=item --connect=URI +=item -c URI, --connect=URI Connect to a non-default hypervisor. See L<virt-install(1)> for details diff --git a/virt-install b/virt-install index 9121445..c3740b2 100755 --- a/virt-install +++ b/virt-install @@ -89,12 +89,9 @@ def supports_pxe(guest): def check_cdrom_option_error(options): if options.cdrom_short and options.cdrom: - fail("Cannot specify both -c and --cdrom") + fail("Cannot specify both -cd and --cdrom") if options.cdrom_short: - if "://" in options.cdrom_short: - fail("-c specified with what looks like a URI. Did you mean " - "to use --connect? If not, use --cdrom instead") options.cdrom = options.cdrom_short if not options.cdrom: @@ -749,7 +746,7 @@ def parse_args(): cli.add_guest_xml_options(geng) insg = parser.add_argument_group(_("Installation Method Options")) - insg.add_argument("-c", dest="cdrom_short", help=argparse.SUPPRESS) + insg.add_argument("-cd", dest="cdrom_short", help=argparse.SUPPRESS) insg.add_argument("--cdrom", help=_("CD-ROM installation media")) insg.add_argument("-l", "--location", help=_("Installation source (eg, nfs:host:/path, " diff --git a/virtinst/cli.py b/virtinst/cli.py index 7811957..defe4a0 100644 --- a/virtinst/cli.py +++ b/virtinst/cli.py @@ -553,7 +553,7 @@ def set_os_variant(obj, distro_type, distro_variant): ############################# def add_connect_option(parser): - parser.add_argument("--connect", metavar="URI", + parser.add_argument("-c", "--connect", metavar="URI", help=_("Connect to hypervisor with libvirt URI")) -- 1.8.2.1 _______________________________________________ virt-tools-list mailing list virt-tools-list@xxxxxxxxxx https://www.redhat.com/mailman/listinfo/virt-tools-list