1Sys::VirtConvert::ConfiUgs(e3r)Contributed Perl DocumentSaytsi:o:nVirtConvert::Config(3)
2
3
4
6 Sys::VirtConvert::Config - Manage virt-v2v's configuration file
7
9 use Sys::VirtConvert::Config;
10
11 $eh = Sys::VirtConvert::Config->new(@config_paths);
12
13 my $isopath = $config->get_transfer_iso();
14 my ($path, $deps) = $config->match_app($desc, $name, $arch);
15 my ($name, $type) = $config->map_network($oldname, $oldtype);
16
18 Sys::VirtConvert::Config parses and queries virt-v2v configuration
19 files.
20
22 new(paths)
23 Create a new Sys::VirtConvert::Config object to operate on the
24 configuration files paths.
25
26 get_transfer_iso
27 Return the path to an iso image containing all software defined in
28 the config file. Returns undef if no transfer iso is required.
29
30 get_transfer_path(path)
31 Return the path to path as accessible by the libguestfs appliance.
32 This function will also ensure that the transfer iso is mounted.
33
34 mount_transfer(g)
35 Mount the transfer iso if it is not already mounted, and return the
36 path where it was mounted.
37
38 unmount_transfer(g)
39 Unmount the transfer iso if it is currently mounted.
40
41 match_app
42 Return a matching app entry from the virt-v2v configuration. The
43 entry is returned as a list containing 2 values. The first contains
44 the path to the application itself. The second contains an arrayref
45 containing the paths of all the app's listed dependencies.
46
47 match_capability
48 Match a capability from the configuration. Returned as a hashref
49 containing dependencies, where each dependency is a hashref
50 containing:
51
52 {capability} ->
53 {name} -> : package name
54 {minversion} : minimum required version
55 {ifinstalled} : 1 if the package should be upgraded if necessary, but
56 not installed if it is not already, 0 otherwise
57
58 Returns undef if the capability was not found.
59
60 map_network(oldname, oldtype)
61 Return a new network name/type for oldname and oldtype from the
62 config. Returns a list of 2 values: (name, type)
63
64 set_default_net_mapping(name, type)
65 Set the default network name and type which will be used if no
66 specific mapping can be found in a config file.
67
68 use_profile(name)
69 Use the profile name defined in the configuration file. Output
70 method and storage will be read from this profile, and any network
71 mappings defined in it will be used in preference to those defined
72 at the top level of the configuration file.
73
74 get_method
75 Return the output method specified in the selected profile.
76
77 use_profile must have been called previously.
78
79 get_storage
80 Return the output storage location and a hashref of storage options
81 from the selected profile.
82
83 use_profile must have been called previously.
84
85 get_storage_opts
86 Return a hashref of storage options from the selected profile.
87
88 use_profile must have been called previously.
89
90 list_profiles
91 Return a list of defined profile names
92
94 Copyright (C) 2009-2011 Red Hat Inc.
95
97 Please see the file COPYING.LIB for the full license.
98
100 virt-v2v(1), <http://libguestfs.org/>.
101
102
103
104perl v5.12.3 2011-08-30 Sys::VirtConvert::Config(3)