virt-image: Print warning that it is planned for removal

This commit is contained in:
Cole Robinson 2014-02-10 15:24:12 -05:00
parent f6de5331ba
commit cd0ab0d217
2 changed files with 16 additions and 1 deletions

View File

@ -10,6 +10,10 @@ B<virt-image> [OPTION]... IMAGE.XML
=head1 DESCRIPTION
WARNING: B<virt-image> is planned for removal in the near future. If you are depending on this tool, please contact the developers at virt-tools-list@redhat.com
B<virt-image> is a command line tool for creating virtual machines from an
XML image descriptor C<IMAGE.XML> (L<virt-image(5)>). Most attributes of
the virtual machine are taken from the XML descriptor (e.g., where the

View File

@ -21,7 +21,10 @@
# MA 02110-1301 USA.
import argparse
import logging
import os
import sys
import time
import urlgrabber.progress as progress
@ -95,7 +98,6 @@ def main(conn=None):
fail(_("The index for --boot must be between 0 and %d") %
(nboots - 1))
# Build the Installer instance
installer = virtimage.ImageInstaller(conn, image, boot_index=options.boot)
guest = conn.caps.build_virtinst_guest(conn, *installer.get_caps_guest())
@ -125,6 +127,15 @@ def main(conn=None):
guest.add_default_devices()
msg = _("\nvirt-image is planned for removal in the near future. "
"If you are depending on this tool, please contact the developers "
"at virt-tools-list@redhat.com\n")
logging.warning(msg)
if "VIRTINST_TEST_SUITE" not in os.environ:
if options.quiet:
print msg
time.sleep(3)
# we've got everything -- try to start the install
if options.xmlonly:
start_xml, final_xml = guest.start_install(return_xml=True)