Ori Liel has posted comments on this change. Change subject: restapi: Added Gluster entities in REST schema ......................................................................
Patch Set 7: (3 inline comments) .................................................... File backend/manager/modules/restapi/interface/definition/src/main/resources/api.xsd Line 2394: <xs:element name="volume_type" type="GlusterVolumeType" minOccurs="1" maxOccurs="1"/> We originally had many enums in the schema, and we moved them out of the schema on purpose. If you take a look at /restapi-definition/src/main/java/org/ovirt/engine/api/model you'll see that there are over 30 enums there. The enums that you mention in api.xsd are exceptions that probably shouldn't be there. IIRC, the reason to remove the enums from the schema and work with pure strings was to allow localization in the future. No matter what the reason, once we made this decision we must stick to it and be consistent. A programmer working on the project should know that there is exactly one place where he can find the API enums. So even though you make good points, I must insist that you remove the enums from the schema, for the greater good :) Line 2476: <xs:element ref="gluster_brick" minOccurs="1" maxOccurs="unbounded"/> You are correct, that is how we view the schema. minOccurs=1 is a buisness decision if you think about it. Maybe tomorrow the business will change, and minOccurs will be 2 (or 0). We won't want to change the schema; the schema is just structure. We have a validation layer within the rest-api code, and another validation in the Backend. We do not validate business validations in the schema. Line 2509: <xs:element ref="gluster_option" minOccurs="1" maxOccurs="unbounded"/> Thanks -- To view, visit http://gerrit.ovirt.org/3360 To unsubscribe, visit http://gerrit.ovirt.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I93c4df85068c3ed1ebfa35124bdfc2ae8f4482c8 Gerrit-PatchSet: 7 Gerrit-Project: ovirt-engine Gerrit-Branch: master Gerrit-Owner: Shireesh Anjal <[email protected]> Gerrit-Reviewer: Gilad Chaplik <[email protected]> Gerrit-Reviewer: Livnat Peer <[email protected]> Gerrit-Reviewer: Michael Pasternak <[email protected]> Gerrit-Reviewer: Omer Frenkel <[email protected]> Gerrit-Reviewer: Ori Liel <[email protected]> Gerrit-Reviewer: Shireesh Anjal <[email protected]> Gerrit-Reviewer: Yair Zaslavsky <[email protected]> _______________________________________________ Engine-patches mailing list [email protected] http://lists.ovirt.org/mailman/listinfo/engine-patches
