class documentation
Converter from Ganeti config file to OVF
Method |
|
Parses the data and creates a structure containing all required info. |
Method |
|
Saves the gathered configuration in an apropriate format. |
Instance Variable | config |
parser for the config.ini file |
Instance Variable | input |
directory in which the config.ini file resides |
Instance Variable | input |
complete path to the config.ini file |
Instance Variable | output |
directory to which the results of conversion shall be written |
Instance Variable | output |
complete path to .ovf file |
Instance Variable | ovf |
Undocumented |
Instance Variable | packed |
if we want OVA package, this points to the real (i.e. not temp) output directory |
Instance Variable | reference |
files referenced in the ovf file |
Instance Variable | references |
Undocumented |
Instance Variable | results |
list of dictionaries of disk options from config.ini |
Instance Variable | results |
dictionary of Ganeti-specific options from config.ini |
Instance Variable | results |
RAM memory in MB |
Instance Variable | results |
name of the instance |
Instance Variable | results |
list of dictionaries of network options form config.ini |
Instance Variable | results |
number of VCPUs |
Instance Variable | temp |
Undocumented |
Static Method | _ |
Creates tarfile from the files in OVF package. |
Method | _ |
Convert the disk and gather disk info for .ovf file. |
Method | _ |
Parses disk data from config file. |
Method | _ |
Parses Ganeti data from config file. |
Method | _ |
Parses vcpus number from config file. |
Method | _ |
Parses name from command line options or config file. |
Method | _ |
Parses network data from config file. |
Method | _ |
Parses vcpus number from config file. |
Method | _ |
Creates manifest for all the files in OVF package. |
Method | _ |
Reads the data on which the conversion will take place. |
Inherited from Converter
:
Method | __init__ |
Initialize the converter. |
Method |
|
Cleans the temporary directory, if one was created. |
Instance Variable | options |
options parsed from the command line |
Instance Variable | temp |
container for temporary files created during conversion |
Static Method | _ |
Figures out some information of the disk using qemu-img. |
Method | _ |
Performs (de)compression on the disk and returns the new path |
Method | _ |
Performes conversion to specified format. |
overrides
ganeti.ovf.Converter.Parse
Parses the data and creates a structure containing all required info.
overrides
ganeti.ovf.Converter.Save
Saves the gathered configuration in an apropriate format.
Raises | |
errors.OpPrereqError | if unable to create output directory |
output_dir: string =
¶
overrides
ganeti.ovf.Converter.output_dir
directory to which the results of conversion shall be written
packed_dir: string =
¶
if we want OVA package, this points to the real (i.e. not temp) output directory
Creates tarfile from the files in OVF package.
Parameters | |
tar | path to the resulting file |
files | list of files in the OVF package |
Convert the disk and gather disk info for .ovf file.
Parameters | |
disk | name of the disk (without the full path) |
compression:bool | whether the disk should be compressed or not |
Raises | |
errors.OpPrereqError | when disk image does not exist |
Parses vcpus number from config file.
Returns | |
int | amount of memory in MB |
Raises | |
errors.OpPrereqError | if amount of memory equals 0 |
Parses name from command line options or config file.
Returns | |
string | name of Ganeti instance |
Raises | |
errors.OpPrereqError | if name of the instance is not provided |
Parses network data from config file.
Returns | |
list | list of dictionaries of network options |
Raises | |
errors.OpPrereqError | then network mode is not recognized |
Parses vcpus number from config file.
Returns | |
int | number of virtual CPUs |
Raises | |
errors.OpPrereqError | if number of VCPUs equals 0 |
Creates manifest for all the files in OVF package.
Parameters | |
path:string | path to manifesto file |
Raises | |
errors.OpPrereqError | if error occurs when writing file |
overrides
ganeti.ovf.Converter._ReadInputData
Reads the data on which the conversion will take place.
Parameters | |
input | absolute path to the config.ini input file |
Raises | |
errors.OpPrereqError | error when reading the config file |