[Engine-devel] [ovirt-engine-sdk] Simplify the process of the RSDL code generation

ShaoHe Feng shaohef at linux.vnet.ibm.com
Thu May 24 18:13:27 UTC 2012


Hi all,

Now I'm using the code generation suites of ovirt-engine-sdk, I find it 
is very troublesome.

IMO,  we can simplify the process. And I want to engaged in it.

there are two tools parse the api.xsd and generate the params.py code.  
They are generateds_gui.py and generateDS.py.
but there still some code can not be generate by these tools. now we 
should add these codes manually.

the not NOT_GENERATED codes are as follow in the current  params.py code:
1.  import python module
2.  a new attribute of GeneratedsSuper class
3.  modify the get_root_tag function.
4.  modify the parseString function to shut up the stdout.
5.  _rootClassMap
6 . _elementToClassMap
7. findRootClass

And I have two ideas about the code generation.
For we should not modify the generateDS.py tools.
But we can improve it.

I think the 1, 2, 3, 7, can be hard-code, and 4, 5 and 6 can be configured.
So I want to add an configure file to tell how to add the extra code 
that are not generated  by generateDS.py tools.
And  new python program, as extension of generateDS.py to read the 
configure file and generate these codes.

Or without the configure file, just make the new python program that 
supports an interactive commands.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.ovirt.org/pipermail/engine-devel/attachments/20120525/a595a337/attachment.html>


More information about the Engine-devel mailing list