Michael Pasternak has posted comments on this change. Change subject: add a new tool for auto-generate python entities from schema ......................................................................
Patch Set 4: (4 inline comments) .................................................... File src/codegen/paramsconf.py Line 147: white spaces Line 148: ELEMENT_TO_CLASS_MAP = [ _elementToClassMap no longer relevant, you can place everything in _rootClassMap Line 172: # CamelCaseName -> camel_case_names this won't work as api does not follow this naming convention, instead you can traverse all elements in the schema creating data structure where key is the type of the schema element and value is the element name, for instance: <xs:element name="special_objects" type="SpecialObjects"/> _element_type_to_name_map {SpecialObjects, special_objects}, this way later when you go over items in __all__ [1] list, you can use each item as key at _element_type_to_name_map to retrieve element name="special_objects". [1] __all__ = [..., "SpecialObjects", ...] Line 178: EXCEPTION_CLASS_MAP ={ you can easily solve this programmatically (without exceptions and relying on naming convention) base on comment above. -- To view, visit http://gerrit.ovirt.org/4880 To unsubscribe, visit http://gerrit.ovirt.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I916f63f1ac68ce2e31456a90c1291997f671af99 Gerrit-PatchSet: 4 Gerrit-Project: ovirt-engine-sdk Gerrit-Branch: master Gerrit-Owner: ShaoHe Feng <shao...@linux.vnet.ibm.com> Gerrit-Reviewer: Adam Litke <a...@us.ibm.com> Gerrit-Reviewer: Mark Wu <wu...@linux.vnet.ibm.com> Gerrit-Reviewer: Michael Pasternak <mpast...@redhat.com> Gerrit-Reviewer: ShaoHe Feng <shao...@linux.vnet.ibm.com> Gerrit-Reviewer: Shu Ming <shum...@linux.vnet.ibm.com> _______________________________________________ Engine-patches mailing list Engine-patches@ovirt.org http://lists.ovirt.org/mailman/listinfo/engine-patches