COT.vm_factory module

Factory for virtual machine objects.

class VMFactory[source]

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.

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

instance of VMDescription or appropriate subclass