Warn that --prompt mode will likely be removed in the future.
This commit is contained in:
parent
4c15da439b
commit
d414beb3a9
|
@ -18,9 +18,7 @@ uniqueness will be updated to avoid a clash between old and new guests.
|
|||
|
||||
By default, virt-clone will show an error if the necessary information to
|
||||
clone the guest is not provided. The --auto-clone option will generate
|
||||
all needed input, aside from the source guest to clone. An interactive mode
|
||||
is available with the --prompt option, but this will only ask for the
|
||||
minimum required options.
|
||||
all needed input, aside from the source guest to clone.
|
||||
|
||||
=head1 OPTIONS
|
||||
|
||||
|
@ -149,16 +147,6 @@ Print debugging information to the terminal when running the install process.
|
|||
The debugging information is also stored in C<$HOME/.virtinst/virt-clone.log>
|
||||
even if this parameter is omitted.
|
||||
|
||||
=item --force
|
||||
|
||||
Prevent interactive prompts. If the intended prompt was a yes/no prompt, always
|
||||
say yes. For any other prompts, the application will exit.
|
||||
|
||||
=item --prompt
|
||||
|
||||
Specifically enable prompting for required information. Default prompting
|
||||
is off.
|
||||
|
||||
=back
|
||||
|
||||
=head1 EXAMPLES
|
||||
|
|
|
@ -27,9 +27,7 @@ an existing disk image (thus skipping the install phase) are also supported.
|
|||
|
||||
Given suitable command line arguments, C<virt-install> is capable of running
|
||||
completely unattended, with the guest 'kickstarting' itself too. This allows
|
||||
for easy automation of guest installs. An interactive mode is also available
|
||||
with the --prompt option, but this will only ask for the minimum required
|
||||
options.
|
||||
for easy automation of guest installs.
|
||||
|
||||
=head1 OPTIONS
|
||||
|
||||
|
@ -1325,11 +1323,6 @@ value will make virt-install wait indefinitely, a value of 0 triggers the
|
|||
same results as noautoconsole. If the time limit is exceeded, virt-install
|
||||
simply exits, leaving the virtual machine in its current state.
|
||||
|
||||
=item --force
|
||||
|
||||
Prevent interactive prompts. If the intended prompt was a yes/no prompt, always
|
||||
say yes. For any other prompts, the application will exit.
|
||||
|
||||
=item --dry-run
|
||||
|
||||
Proceed through the guest creation process, but do NOT create storage devices,
|
||||
|
@ -1337,11 +1330,6 @@ change host device configuration, or actually teach libvirt about the guest.
|
|||
virt-install may still fetch install media, since this is required to
|
||||
properly detect the OS to install.
|
||||
|
||||
=item --prompt
|
||||
|
||||
Specifically enable prompting for required information. Default prompting
|
||||
is off (as of virtinst 0.400.0)
|
||||
|
||||
=item --check-cpu
|
||||
|
||||
Check that the number virtual cpus requested does not exceed physical CPUs and
|
||||
|
|
|
@ -83,7 +83,6 @@ def main(conn=None):
|
|||
|
||||
options.quiet = options.xmlonly or options.quiet
|
||||
cli.setupLogging("virt-image", options.debug, options.quiet)
|
||||
cli.set_prompt(False)
|
||||
|
||||
if conn is None:
|
||||
conn = cli.getConnection(options.connect)
|
||||
|
|
|
@ -312,10 +312,13 @@ def set_force(val=True):
|
|||
force = val
|
||||
|
||||
|
||||
def set_prompt(prompt=True):
|
||||
def set_prompt(prompt):
|
||||
# Set whether we allow prompts, or fail if a prompt pops up
|
||||
global doprompt
|
||||
doprompt = prompt
|
||||
if prompt:
|
||||
logging.warning("--prompt mode is barely supported and likely to "
|
||||
"be removed in a future release.\n")
|
||||
|
||||
|
||||
def is_prompt():
|
||||
|
@ -363,7 +366,7 @@ def prompt_for_yes_no(warning, question):
|
|||
logging.debug("Forcing return value of True to prompt '%s'")
|
||||
return True
|
||||
|
||||
errmsg = warning + _(" (Use --prompt or --force to override)")
|
||||
errmsg = warning + _(" (Use --force to override)")
|
||||
|
||||
while 1:
|
||||
msg = warning
|
||||
|
|
Loading…
Reference in New Issue