Lior Vernia has posted comments on this change.

Change subject: restapi: Implement custom properties using elements
......................................................................


Patch Set 1:

(3 comments)

http://gerrit.ovirt.org/#/c/27316/1//COMMIT_MSG
Commit Message:

Line 11: implementation, where they're stored as elements, which might be more
Line 12: flexbile in the future, e.g. if multiple values per key should be
Line 13: supported.
Line 14: 
Line 15: Change-Id: I03173b72b4f9ab2906ca9a2989d6115efcb19264
> please add Related-to-bug: https://bugzilla.redhat.com/1071872
Done


http://gerrit.ovirt.org/#/c/27316/1/backend/manager/modules/restapi/interface/definition/src/main/resources/api.xsd
File 
backend/manager/modules/restapi/interface/definition/src/main/resources/api.xsd:

Line 2550:       <xs:element name="name" type="xs:string" minOccurs="1" 
maxOccurs="1"/>
Line 2551:       <xs:element name="value" type="xs:string" minOccurs="1" 
maxOccurs="1"/>
Line 2552:     </xs:sequence>
Line 2553:   </xs:complexType>
Line 2554: 
> The comments from Moti and Gilad make a lot of sense, but the real reason f
Done, thanks guys for the thorough explanations!
Line 2555:   <xs:element name="properties" type="Properties"/>
Line 2556: 
Line 2557:   <xs:complexType name="Properties">
Line 2558:     <xs:sequence>


http://gerrit.ovirt.org/#/c/27316/1/backend/manager/modules/restapi/types/src/main/java/org/ovirt/engine/api/restapi/utils/CustomPropertiesParser.java
File 
backend/manager/modules/restapi/types/src/main/java/org/ovirt/engine/api/restapi/utils/CustomPropertiesParser.java:

Line 73:      *            The key:value pairs.
Line 74:      * @return A newly-created map containing the key:value pairs.
Line 75:      */
Line 76:     public static Map<String, String> toMap(Properties properties) {
Line 77:         Map<String, String> res = new HashMap<String, String>();
> new HashMap<>() will do
Done
Line 78:         for (Property property : properties.getProperty()) {
Line 79:             res.put(property.getName(), property.getValue());
Line 80:         }
Line 81:         return res;


-- 
To view, visit http://gerrit.ovirt.org/27316
To unsubscribe, visit http://gerrit.ovirt.org/settings

Gerrit-MessageType: comment
Gerrit-Change-Id: I03173b72b4f9ab2906ca9a2989d6115efcb19264
Gerrit-PatchSet: 1
Gerrit-Project: ovirt-engine
Gerrit-Branch: master
Gerrit-Owner: Lior Vernia <lver...@redhat.com>
Gerrit-Reviewer: Gilad Chaplik <gchap...@redhat.com>
Gerrit-Reviewer: Juan Hernandez <juan.hernan...@redhat.com>
Gerrit-Reviewer: Lior Vernia <lver...@redhat.com>
Gerrit-Reviewer: Moti Asayag <masa...@redhat.com>
Gerrit-Reviewer: automat...@ovirt.org
Gerrit-Reviewer: oVirt Jenkins CI Server
Gerrit-HasComments: Yes
_______________________________________________
Engine-patches mailing list
Engine-patches@ovirt.org
http://lists.ovirt.org/mailman/listinfo/engine-patches

Reply via email to