Don't change the default attach-method

Don't change the default attach-method.  The one configured by the
libguestfs packager is supposed to be correct for all libguestfs
users, and making ad hoc changes to it is not advisable.

For more information, see:
https://bugzilla.redhat.com/show_bug.cgi?id=984409#c8

Fixes bug: 1220102
Change-Id: Ie7726c37dd579e2c95b6156a9ddfdff9e855af83
This commit is contained in:
Richard W.M. Jones 2013-07-16 16:24:11 +01:00 committed by Joshua Hesketh
parent 4e842e38a2
commit 4325ee3432
2 changed files with 0 additions and 11 deletions

View File

@ -24,7 +24,6 @@ class GuestFS(object):
self.mounts = []
self.files = {}
self.auginit = False
self.attach_method = 'libvirt'
self.root_mounted = False
def launch(self):
@ -41,12 +40,6 @@ class GuestFS(object):
def add_drive_opts(self, file, *args, **kwargs):
self.drives.append((file, kwargs['format']))
def get_attach_method(self):
return self.attach_method
def set_attach_method(self, attach_method):
self.attach_method = attach_method
def inspect_os(self):
return ["/dev/guestvgf/lv_root"]

View File

@ -21,7 +21,6 @@ from nova import exception
from nova.openstack.common.gettextutils import _
from nova.openstack.common import log as logging
from nova.virt.disk.vfs import api as vfs
from nova.virt.libvirt import driver as libvirt_driver
LOG = logging.getLogger(__name__)
@ -113,9 +112,6 @@ class VFSGuestFS(vfs.VFS):
try:
self.handle.add_drive_opts(self.imgfile, format=self.imgfmt)
if self.handle.get_attach_method() == 'libvirt':
libvirt_url = 'libvirt:' + libvirt_driver.LibvirtDriver.uri()
self.handle.set_attach_method(libvirt_url)
self.handle.launch()
self.setup_os()