Login
[x]
Log in using an account from:
Fedora Account System
Red Hat Associate
Red Hat Customer
Or login using a Red Hat Bugzilla account
Forgot Password
Login:
Hide Forgot
Create an Account
Red Hat Bugzilla – Attachment 297055 Details for
Bug 434786
virt-install is now interactive
[?]
New
Simple Search
Advanced Search
My Links
Browse
Requests
Reports
Current State
Search
Tabular reports
Graphical reports
Duplicates
Other Reports
User Changes
Plotly Reports
Bug Status
Bug Severity
Non-Defaults
|
Product Dashboard
Help
Page Help!
Bug Writing Guidelines
What's new
Browser Support Policy
5.0.4.rh83 Release notes
FAQ
Guides index
User guide
Web Services
Contact
Legal
This site requires JavaScript to be enabled to function correctly, please enable it.
[patch]
add --force option to cli utilities (the actual patch this time)
virtinst-force-option.patch (text/plain), 3.60 KB, created by
Cole Robinson
on 2008-03-06 14:58:15 UTC
(
hide
)
Description:
add --force option to cli utilities (the actual patch this time)
Filename:
MIME Type:
Creator:
Cole Robinson
Created:
2008-03-06 14:58:15 UTC
Size:
3.60 KB
patch
obsolete
>diff -r faf95c934129 virt-clone >--- a/virt-clone Tue Mar 04 09:54:33 2008 -0500 >+++ b/virt-clone Wed Mar 05 16:49:08 2008 -0500 >@@ -164,6 +164,9 @@ def parse_args(): > # Misc options > parser.add_option("-d", "--debug", action="store_true", dest="debug", > help=_("Print debugging information")) >+ parser.add_option("", "--force", action="store_true", dest="force", >+ help=_("Do not prompt for input. Answers yes where applicable, terminates for all other prompts"), >+ default=False) > > (options,args) = parser.parse_args() > return options >@@ -173,6 +176,7 @@ def main(): > options = parse_args() > > cli.setupLogging("virt-clone", options.debug) >+ cli.set_force(options.force) > > logging.debug("start clone with HV " + options.connect) > >diff -r faf95c934129 virt-image >--- a/virt-image Tue Mar 04 09:54:33 2008 -0500 >+++ b/virt-image Wed Mar 05 16:49:08 2008 -0500 >@@ -139,6 +139,9 @@ def parse_args(): > help=_("Print the libvirt XML, but do not start the domain")) > parser.add_option("", "--boot", type="int", dest="boot", > help=_("The zero-based index of the boot record to use")) >+ parser.add_option("", "--force", action="store_true", dest="force", >+ help=_("Do not prompt for input. Answers yes where applicable, terminates for all other prompts"), >+ default=False) > > (options,args) = parser.parse_args() > if len(args) < 1: >@@ -162,6 +165,7 @@ def main(): > options = parse_args() > > cli.setupLogging("virt-image", options.debug) >+ cli.set_force(options.force) > > conn = cli.getConnection(options.connect) > type = None >diff -r faf95c934129 virt-install >--- a/virt-install Tue Mar 04 09:54:33 2008 -0500 >+++ b/virt-install Wed Mar 05 16:49:08 2008 -0500 >@@ -273,6 +273,9 @@ def parse_args(): > help=_("Print debugging information")) > parser.add_option("", "--noreboot", action="store_true", dest="noreboot", > help=_("Disables the automatic rebooting when the installation is complete.")) >+ parser.add_option("", "--force", action="store_true", dest="force", >+ help=_("Do not prompt for input. Answers yes where applicable, terminates for all other prompts"), >+ default=False) > > > (options,args) = parser.parse_args() >@@ -338,6 +341,7 @@ def main(): > options = parse_args() > > cli.setupLogging("virt-install", options.debug) >+ cli.set_force(options.force) > conn = cli.getConnection(options.connect) > capabilities = virtinst.CapabilitiesParser.parse(conn.getCapabilities()) > >diff -r faf95c934129 virtinst/cli.py >--- a/virtinst/cli.py Tue Mar 04 09:54:33 2008 -0500 >+++ b/virtinst/cli.py Wed Mar 05 16:49:08 2008 -0500 >@@ -29,6 +29,7 @@ import Guest > import Guest > > MIN_RAM = 64 >+force = False > > # > # Setup helpers >@@ -94,9 +95,15 @@ def getConnection(connect): > # Prompting > # > >+def set_force(val=True): >+ global force >+ force = val >+ > def prompt_for_input(prompt = "", val = None): > if val is not None: > return val >+ if force: >+ raise RuntimeError(_("Force flag is set but input was required. Prompt was: %s" % prompt)) > print prompt + " ", > return sys.stdin.readline().strip() > >@@ -110,6 +117,10 @@ def yes_or_no(s): > > def prompt_for_yes_or_no(prompt): > """catches yes_or_no errors and ensures a valid bool return""" >+ if force: >+ logging.debug("Forcing return value of True to prompt '%s'") >+ return True >+ > while 1: > input = prompt_for_input(prompt, None) > try:
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 434786
:
296947
|
296949
|
297055
|
297203
|
297204