On 04/20/2017 12:26 PM, Fabrice Bacchella wrote:
> I didn't find a way to find the writer that correspond to a given type. Is 
> there a way to do that, or it's up to the end user to manually manage this 
> mapping ?

Yes that is missing. We have it for reading, but not for writing. This
patch should address that:

  Add generic writer

Please open a bug so that we can decide what version should contain this

Note that you should try to avoid using directly the writer/reader
classes, as they are an internal implementation detail and may change in
the future. The contract for reading/writing is using the Reader and
Writer classes. For example, to generate the XML for an object (once the
patch is merged):

  from ovirtsdk4 import types
  from ovirtsdk4 import writer
  from ovirtsdk4 import writers

  vm = types.Vm(

  xml = writer.Writer.write(vm)

Users mailing list

Reply via email to