COT.vm_factory module

Factory for virtual machine objects.

class VMFactory[source]

Bases: object

Creates a VMDescription instance from a specified input file.

classmethod create(input_file, output_file)[source]

Create an appropriate VMDescription subclass instance from a file.

Parameters:
  • input_file (str) – File to read VM description from
  • output_file (str) – File to write to when finished (optional)
Raises:
  • VMInitError – if no appropriate class is identified
  • VMInitError – if the selected subclass raises a ValueUnsupportedError while loading the file.
Returns:

VMDescription – Created object