Package ganeti :: Module ovf :: Class OVFExporter
[hide private]
[frames] | no frames]

Class OVFExporter

source code


Converter from Ganeti config file to OVF

Instance Methods [hide private]
 
_ReadInputData(self, input_path)
Reads the data on which the conversion will take place.
source code
string
_ParseName(self)
Parses name from command line options or config file.
source code
int
_ParseVCPUs(self)
Parses vcpus number from config file.
source code
int
_ParseMemory(self)
Parses vcpus number from config file.
source code
dictionary
_ParseGaneti(self)
Parses Ganeti data from config file.
source code
list
_ParseNetworks(self)
Parses network data from config file.
source code
 
_GetDiskOptions(self, disk_file, compression)
Convert the disk and gather disk info for .ovf file.
source code
list
_ParseDisks(self)
Parses disk data from config file.
source code
 
Parse(self)
Parses the data and creates a structure containing all required info.
source code
 
_PrepareManifest(self, path)
Creates manifest for all the files in OVF package.
source code
 
Save(self)
Saves the gathered configuration in an apropriate format.
source code

Inherited from Converter: Cleanup, __init__

Inherited from Converter (private): _CompressDisk, _ConvertDisk

Inherited from object: __delattr__, __format__, __getattribute__, __hash__, __new__, __reduce__, __reduce_ex__, __repr__, __setattr__, __sizeof__, __str__, __subclasshook__

Static Methods [hide private]
 
_PrepareTarFile(tar_path, files_list)
Creates tarfile from the files in OVF package.
source code

Inherited from Converter (private): _GetDiskQemuInfo

Instance Variables [hide private]
ConfigParserWithDefaults config_parser
parser for the config.ini file
string input_dir
directory in which the config.ini file resides
string input_path
complete path to the config.ini file
string output_dir
directory to which the results of conversion shall be written
string output_path
complete path to .ovf file
string packed_dir
if we want OVA package, this points to the real (i.e.
list reference_files
files referenced in the ovf file
list results_disk
list of dictionaries of disk options from config.ini
dict results_ganeti
dictionary of Ganeti-specific options from config.ini
string results_memory
RAM memory in MB
string results_name
name of the instance
list results_network
list of dictionaries of network options form config.ini
string results_vcpus
number of VCPUs

Inherited from Converter: options, temp_dir, temp_file_manager

Properties [hide private]

Inherited from object: __class__

Method Details [hide private]

_ReadInputData(self, input_path)

source code 

Reads the data on which the conversion will take place.

Parameters:
  • input_path (string) - absolute path to the config.ini input file
Raises:
Overrides: Converter._ReadInputData

_ParseName(self)

source code 

Parses name from command line options or config file.

Returns: string
name of Ganeti instance
Raises:

_ParseVCPUs(self)

source code 

Parses vcpus number from config file.

Returns: int
number of virtual CPUs
Raises:

_ParseMemory(self)

source code 

Parses vcpus number from config file.

Returns: int
amount of memory in MB
Raises:

_ParseGaneti(self)

source code 

Parses Ganeti data from config file.

Returns: dictionary
dictionary of Ganeti-specific options

_ParseNetworks(self)

source code 

Parses network data from config file.

Returns: list
list of dictionaries of network options
Raises:

_GetDiskOptions(self, disk_file, compression)

source code 

Convert the disk and gather disk info for .ovf file.

Parameters:
  • disk_file (string) - name of the disk (without the full path)
  • compression (bool) - whether the disk should be compressed or not
Raises:

_ParseDisks(self)

source code 

Parses disk data from config file.

Returns: list
list of dictionaries of disk options

Parse(self)

source code 

Parses the data and creates a structure containing all required info.

Overrides: Converter.Parse

_PrepareManifest(self, path)

source code 

Creates manifest for all the files in OVF package.

Parameters:
  • path (string) - path to manifesto file
Raises:

_PrepareTarFile(tar_path, files_list)
Static Method

source code 

Creates tarfile from the files in OVF package.

Parameters:
  • tar_path (string) - path to the resulting file
  • files_list (list) - list of files in the OVF package

Save(self)

source code 

Saves the gathered configuration in an apropriate format.

Raises:
Overrides: Converter.Save

Instance Variable Details [hide private]

packed_dir

if we want OVA package, this points to the real (i.e. not temp) output directory
Type:
string