search for: can_handle

Displaying 20 results from an estimated 24 matches for "can_handle".

Did you mean: ae_handle
2014 Oct 06
1
[PATCH] log: tests: skip fedora.img if journal is not available
--- cat/test-virt-log.sh | 27 ++++++++++++++++++++++++++- 1 file changed, 26 insertions(+), 1 deletion(-) diff --git a/cat/test-virt-log.sh b/cat/test-virt-log.sh index af6bb95..d4fa0ed 100755 --- a/cat/test-virt-log.sh +++ b/cat/test-virt-log.sh @@ -19,7 +19,32 @@ export LANG=C set -e +can_handle () +{ + fn=$(basename $1) + case "$fn" in + fedora.img) + guestfish -a /dev/null run : available journal + ;; + *) + return 0 + ;; + esac +} + # Read out the log files from the image using virt-log. for f in ../tests/guests/{fedora,debian,ubunt...
2010 May 06
1
[PATCH v2v] Pre-convert Windows guests.
...sion. +The actual changes are made by the L<Sys::VirtV2V::GuestOS::Windows(3)> +module. We've agreed that the separation of GuestOS and Converter is +wrong; they should be combined, but we haven't done that yet. + +=head1 METHODS + +=over + +=item Sys::VirtV2V::Converter::Windows->can_handle(desc) + +Return 1 if Sys::VirtV2V::Converter::Windows can convert the guest +described by I<desc>, 0 otherwise. + +=cut + +sub can_handle +{ + my $class = shift; + + my $desc = shift; + carp("can_handle called without desc argument") unless defined($desc); + + return ($d...
2013 Oct 31
6
[PATCH 0/4] virt-v2v: Convert RedHat.pm to Linux.pm
In preparation for an upcoming patch which adds support for SUSE guest conversions, it makes sense to have an intermediate steps that changes the RedHat.pm converter into a more generic Linux converter. The SUSE changes will then be limited in scope to only what is required for SUSE support. This series of patches accomplishes the following: - Renames RedHat.pm to Linux.pm - Modifies Linux.pm
2011 Apr 26
7
[PATCH 1/7] Push $desc creation into Sys::VirtConvert::Converter->convert
...ect_get_major_version($root); + $desc{minor_version} = $g->inspect_get_minor_version($root); + $desc{arch} = $g->inspect_get_arch($root); + # Find a module which can convert the guest and run it foreach my $module ($class->modules()) { - if($module->can_handle($desc)) { - $guestcaps = $module->convert($g, $config, $desc, $meta); + if($module->can_handle(\%desc)) { + $guestcaps = $module->convert($g, $root, $config, \%desc, $meta); last; } } diff --git a/lib/Sys/VirtConvert/Converter/RedHat....
2009 Dec 21
4
Refactor virt-v2v to be more like a 'big script'
These patches combine HVSource and HVTarget into a single Converter. This should make it more obvious where to hack without losing any practical flexibility. GuestOS remains separate. GuestOS is now a misnomer, because it's really only a Linux distro abstraction. It will be useless for Windows, for example. Functions which you'd expect to be different on a non-RH distro should live in
2013 Oct 12
0
Re: [PATCH] virt-v2v: Convert RedHat.pm to Linux.pm - for SUSE support
...use KVM. +Sys::VirtConvert::Converter::Linux converts a Linux based guest to use KVM. =head1 METHODS @@ -544,9 +625,17 @@ sub _is_rhel_family ($g->inspect_get_distro($root) =~ /^(rhel|centos|scientificlinux| redhat-based)$/); } -=item Sys::VirtConvert::Converter::RedHat->can_handle(g, root) +sub _is_suse_family +{ + my ($g, $root) = @_; + + return ($g->inspect_get_type($root) eq 'linux') && + ($g->inspect_get_distro($root) =~ /^(sles|suse-based|opensuse)$/); +} -Return 1 if Sys::VirtConvert::Converter::RedHat can convert the given guest...
2013 Oct 11
2
Re: [PATCH] virt-v2v: Convert RedHat.pm to Linux.pm - for SUSE support
...scientificlinux|redhat-based)$/); +} + +sub _is_suse_family +{ + my ($g, $root) = @_; + + return ($g->inspect_get_type($root) eq 'linux') && + ($g->inspect_get_distro($root) =~ /^(sles|suse-based|opensuse)$/); } -=item Sys::VirtConvert::Converter::RedHat->can_handle(g, root) +=item Sys::VirtConvert::Converter::Linux->can_handle(g, root) -Return 1 if Sys::VirtConvert::Converter::RedHat can convert the given guest +Return 1 if Sys::VirtConvert::Converter::Linux can convert the given guest =cut @@ -556,13 +649,17 @@ sub can_handle my ($g, $root)...
2013 Oct 07
3
Re: [PATCH] virt-v2v: Convert RedHat.pm to Linux.pm - for SUSE support
On Friday, October 04, 2013 09:38:58 AM Matthew Booth wrote: > It's specifically an error if we're attempting to configure virtio, and > there's no detected virtio kernel. It shouldn't have been possible to > get here in that state, hence it's a programmer error. The code below > attempts to install *any* kernel in the case that we aren't configuring >
2011 Mar 11
2
[PATCH 1/2] Allow reading more data than the reported size of a volume
If a volume is not an exact multiple of 512 bytes, qemu-img will report its size rounded down to a 512 byte boundary. However, when copying, the file is still read until EOF, which will return more data than was expected. This change prevents that causing a failure in itself. The situation is still not resolved, however, as there are still situations where this will cause a failure. For example,
2009 Jul 24
2
[PATCH] Initial drop of virt-v2v
...ment"); + defined($desc) or carp("get_instance called without desc argument"); + defined($files) or carp("get_instance called without files argument"); + + foreach my $module ($class->modules()) { + return $module->new($g, $desc, $files) if($module->can_handle($desc)); + } + + return undef; +} + +1; + +=head1 COPYRIGHT + +Copyright (C) 2009 Red Hat Inc. + +=head1 LICENSE + +Please see the file COPYING.LIB for the full license. + +=head1 SEE ALSO + +L<virt-inspector(1)>, +L<Sys::Guestfs(3)>, +L<guestfs(3)>, +L<http://libguestfs....
2010 Feb 12
11
[PATCH 1/9] Convert config file to XML, and translate networks/bridge for all connections
Previously, only the LibVirtXML connection translated network and bridge names in imported metadata. This change moves this functionality in Converter, making it available to LibVirt connections as well. At the same time, the format of the config file is switched to XML. The primary driver for this is that the allowable syntax of a foreign network/bridge name is not known. Rather than create a
2010 Feb 09
5
[PATCH 1/6] Convert config file to XML, and translate networks/bridge for all connections
Previously, only the LibVirtXML connection translated network and bridge names in imported metadata. This change moves this functionality in Converter, making it available to LibVirt connections as well. At the same time, the format of the config file is switched to XML. The primary driver for this is that the allowable syntax of a foreign network/bridge name is not known. Rather than create a
2013 Nov 07
6
[PATCH 0/4] virt-v2v: Add support for SUSE guest conversions
The following series of patches adds support for converting SUSE guests through virt-v2v. These changes should not impact non-SUSE guest conversions. Mike Latimer (4): Add perl-Bootloader support to grub packages Add conversion support for SUSE guests Add SUSE to capabilities db and conf Add SUSE support documentation lib/Sys/VirtConvert/Converter/Linux.pm | 480
2013 Sep 24
0
[PATCH 3/4] Add SUSE converter
...run on KVM. + +=head1 METHODS + +=over + +=cut + +sub _is_sles_family +{ + my ($g, $root) = @_; + + return ($g->inspect_get_type($root) eq 'linux') && + ($g->inspect_get_distro($root) =~ /^(sles|suse-based)$/); +} + +=item Sys::VirtConvert::Converter::SUSE->can_handle(g, root) + +Return 1 if Sys::VirtConvert::Converter::SUSE can convert the given guest + +=cut + +sub can_handle +{ + my $class = shift; + + my ($g, $root) = @_; + + return ($g->inspect_get_type($root) eq 'linux' && + (_is_sles_family($g, $root) || +...
2013 Oct 03
2
[PATCH] virt-v2v: Convert RedHat.pm to Linux.pm - for SUSE support
...|scientificlinux|redhat-based)$/); +} + +sub _is_suse_family +{ + my ($g, $root) = @_; + + return ($g->inspect_get_type($root) eq 'linux') && + ($g->inspect_get_distro($root) =~ /^(sles|suse-based|opensuse)$/); +} + +=item Sys::VirtConvert::Converter::Linux->can_handle(g, root) + +Return 1 if Sys::VirtConvert::Converter::Linux can convert the given guest + +=cut + +sub can_handle +{ + my $class = shift; + + my ($g, $root) = @_; + + if ($g->inspect_get_type($root) eq 'linux') { + return (_is_rhel_family($g, $root) || + ($g-...
2010 Feb 19
2
[PATCH 1/2] Fix remapping of block devices
...d without desc argument") unless defined($desc); + carp("convert called without devices argument") unless defined($devices); my $guestcaps; # Find a module which can convert the guest and run it foreach my $module ($class->modules()) { if($module->can_handle($desc)) { - $guestcaps = $module->convert($vmm, $guestos, $dom, $desc); + $guestcaps = $module->convert($vmm, $guestos, $desc, $devices); last; } } @@ -154,7 +162,7 @@ sub convert _map_networks($dom, $config); # Convert the metadata...
2013 Sep 24
5
[PATCH 0/4] Add SUSE guest converter to virt-v2v
This is a new conversion module to convert SUSE Linux and openSUSE guests. The converter is based on the RedHat module, and should offer the same functionality on both SUSE and RedHat hosts. There are a few additional messages in this module, such as reporting of packages when installing through zypper or the local virt-v2v repo. These messages don't necessarily flow unless verbose switches
2017 Feb 20
3
[PATCH 0/3] tests: Define common test functions.
Previously I posted a work-in-progress preview of this patch series: https://www.redhat.com/archives/libguestfs/2017-February/msg00224.html This is the finished version that updates all of the shell-script based tests. It passes 'make check', 'make check-direct' and 'make check-slow'. Rich.
2014 Oct 23
10
[PATCH v6 00/10] tests: Introduce test harness for running tests.
For v6: This is mainly just a rebase, but I have also added tests in the ocaml/ language bindings directory, and for all the OCaml-written virt tools. Rich.
2014 Oct 24
10
[PATCH v7 00/10] tests: Introduce test harness for running tests.
v7: The only changes since v6 are those suggested by Pino in the review of v5.