Sys::VirtV2V::Config.3pm

Langue: en

Version: 2010-07-01 (fedora - 01/12/10)

Section: 3 (Bibliothèques de fonctions)

NAME

Sys::VirtV2V::Config - Manage virt-v2v's configuration file

SYNOPSIS

  use Sys::VirtV2V::Config;
 
  $eh = Sys::VirtV2V::Config->new($config_path);
 
  my $isopath = $config->get_transfer_iso();
  my ($path, $deps) = $config->match_app($desc, $name, $arch);
  my ($name, $type) = $config->map_network($oldname, $oldtype);
 
 

DESCRIPTION

Sys::VirtV2V::Config parses and queries the virt-v2v config file.

METHODS

new(path)
Create a new Sys::VirtV2V::Config object to operate on the config file at path.
get_transfer_iso
Return the path to an iso image containing all software defined in the config file. Returns undef if no transfer iso is required.
get_transfer_path(path)
Return the path to path as accessible by the libguestfs appliance. This function will also ensure that the transfer iso is mounted.
match_app
Return a matching app entry from the virt-v2v configuration. The entry is returned as a list containing 2 values. The first contains the path to the application itself. The second contains an arrayref containing the paths of all the app's listed dependencies.
match_capability
Match a capability from the configuration. Returned as a hashref containing dependencies, where each dependency is a hashref containing:
   {capability} ->
     {name} ->       : package name
       {minversion}  : minimum required version
       {ifinstalled} : 1 if the package should be upgraded if necessary, but
                       not installed if it is not already, 0 otherwise
 
 

Returns undef if the capability was not found.

map_network(oldname, oldtype)
Return a new network name/type for oldname and oldtype from the config. Returns a list of 2 values: (name, type)
set_default_net_mapping(name, type)
Set the default network name and type which will be used if no specific mapping can be found in a config file.
Copyright (C) 2010 Red Hat Inc.

LICENSE

Please see the file COPYING.LIB for the full license.

SEE ALSO

virt-v2v(1), <http://libguestfs.org/>.