Sys::VirtConvert::GuesUseraContributed Perl Sys::VirtConvert::GuestfsHandle(3)NAMESys::VirtConvert::GuestfsHandle - Proxy Sys::Guestfs with custom close
behaviour
SYNOPSIS
use Sys::VirtConvert::GuestfsHandle;
my $g = new Sys::VirtConvert::GuestfsHandle($storage, $transferiso);
# GuestfsHandle proxies all Sys::Guestfs methods
print join("\n", $g->list_devices());
# GuestfsHandle adds 2 new methods
$g->add_on_close(sub { print "Bye!\n"; });
$g->close();
DESCRIPTIONSys::VirtConvert::GuestfsHandle is a proxy to Sys::Guestfs which adds a
custom close() method, and the ability to register pre-close callbacks.
METHODS
new(disks, transferiso, isrhev)
Create a new object. Open a new Sys::Guestfs handle to proxy, using
the disks defined in disks, which is list of disk metadata defined
as: [ [ name, path, format ], ... ]. Add transferiso as a read-only
drive if it is given. If isrhev is true, the handle will use user
and group vdsm:kvm.
is_alive
Return 1 if the underlying Sys::Guestfs handle is still connected
to a running daemon, 0 otherwise.
add_on_close
Register a callback to be called before closing the underlying
Sys::Guestfs handle.
close
Call all registered close callbacks, then close the Sys::Guestfs
handle.
COPYRIGHT
Copyright (C) 2010 Red Hat Inc.
LICENSE
Please see the file COPYING.LIB for the full license.
SEE ALSOvirt-v2v(1), <http://libguestfs.org/>.
perl v5.10.12013-11-21Sys::VirtConvert::GuestfsHandle(3)