Michael Pasternak has posted comments on this change.

Change subject: engine: watchdog - restapi support [wip]
......................................................................


Patch Set 4: (11 inline comments)

reviewed only a part of the sources as i don't want to comment
on WIP stuff

....................................................
File 
backend/manager/modules/restapi/interface/definition/src/main/resources/api.xsd
Line 589:           <xs:element ref="gluster_volume_states" minOccurs="0"/>
Line 590:           <xs:element ref="brick_states" minOccurs="0"/>
Line 591:           <xs:element ref="reported_device_types" minOccurs="0"/>
Line 592:           <xs:element ref="ip_versions" minOccurs="0"/>
Line 593:           <xs:element ref="watchdog_models" minOccurs="0"/>
this is a /capabilities element and not related to the gluster, i think make 
sense
moving it to line 585
Line 594:           <xs:element ref="watchdog_actions" minOccurs="0"/>
Line 595:         </xs:sequence>
Line 596:       </xs:extension>
Line 597:     </xs:complexContent>


Line 907:     <xs:sequence>
Line 908:       <xs:element name="action" type="xs:string" minOccurs="0" 
maxOccurs="unbounded">
Line 909:         <xs:annotation>
Line 910:           <xs:appinfo>
Line 911:             <jaxb:property name="WatchdogAction"/>
should be plural
Line 912:           </xs:appinfo>
Line 913:         </xs:annotation>
Line 914:       </xs:element>
Line 915:     </xs:sequence>


Line 921:     <xs:sequence>
Line 922:       <xs:element name="model" type="xs:string" minOccurs="0" 
maxOccurs="unbounded">
Line 923:         <xs:annotation>
Line 924:           <xs:appinfo>
Line 925:             <jaxb:property name="WatchdogModel"/>
should be plural
Line 926:           </xs:appinfo>
Line 927:         </xs:annotation>
Line 928:       </xs:element>
Line 929:     </xs:sequence>


Line 1073:     </xs:complexContent>
Line 1074:   </xs:complexType>
Line 1075: 
Line 1076: 
Line 1077:      <xs:complexType name="WatchDog">
+1
Line 1078:              <xs:complexContent>
Line 1079:                      <xs:extension base="BaseDevice">
Line 1080:                              <xs:sequence>
Line 1081:                                      <xs:element name="model" 
type="xs:string" minOccurs="1"


....................................................
File 
backend/manager/modules/restapi/jaxrs/src/main/java/org/ovirt/engine/api/restapi/resource/AbstractBackendDevicesResource.java
Line 11
Line 12
Line 13
Line 14
Line 15
no need for this change


....................................................
File 
backend/manager/modules/restapi/jaxrs/src/main/java/org/ovirt/engine/api/restapi/resource/BackendWatchdogsResource.java
Line 30:                 VdcActionType.RemoveWatchdog);
Line 31:     }
Line 32: 
Line 33:     protected boolean matchEntity(VmWatchdog entity, String name) {
Line 34:         return false;
no impl for this ^ ?
Line 35:     }
Line 36: 
Line 37:     protected String[] getRequiredAddFields() {
Line 38:         return new String[] {"action", "model"};


Line 38:         return new String[] {"action", "model"};
Line 39:     }
Line 40: 
Line 41:     protected String[] getRequiredUpdateFields() {
Line 42:         return new String[] {"action", "model"};
shouldn't you be able updating only one of these ^? action|model?
Line 43:     }
Line 44: 
Line 45:     protected VdcActionParametersBase getAddParameters(VmWatchdog 
entity, WatchDog device) {
Line 46:         return new UpdateWatchdogParameters();


Line 42:         return new String[] {"action", "model"};
Line 43:     }
Line 44: 
Line 45:     protected VdcActionParametersBase getAddParameters(VmWatchdog 
entity, WatchDog device) {
Line 46:         return new UpdateWatchdogParameters();
you should be using 'device' params for Add action here
Line 47:     }
Line 48: 
Line 49:     protected VdcActionParametersBase getRemoveParameters(String id) {
Line 50:         return new VmOperationParameterBase();


Line 46:         return new UpdateWatchdogParameters();
Line 47:     }
Line 48: 
Line 49:     protected VdcActionParametersBase getRemoveParameters(String id) {
Line 50:         return new VmOperationParameterBase();
you should be using 'id' param for Remove action here
Line 51:     }
Line 52: 
Line 53:     protected ParametersProvider<WatchDog, VmWatchdog> 
getUpdateParametersProvider() {
Line 54:         return null;


Line 50:         return new VmOperationParameterBase();
Line 51:     }
Line 52: 
Line 53:     protected ParametersProvider<WatchDog, VmWatchdog> 
getUpdateParametersProvider() {
Line 54:         return null;
impl?
Line 55:     }
Line 56: 
Line 57:     protected <T> boolean matchEntity(VmWatchdog entity, T id) {
Line 58:         return false;


Line 54:         return null;
Line 55:     }
Line 56: 
Line 57:     protected <T> boolean matchEntity(VmWatchdog entity, T id) {
Line 58:         return false;
impl?
Line 59:     }
Line 60: 
Line 61:     protected WatchDog doPopulate(WatchDog model, VmWatchdog entity) {
Line 62:         model.setAction(entity.getModel());


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

Gerrit-MessageType: comment
Gerrit-Change-Id: Ief5b20ecf2221faf900cadfeafe4c71607a9eca3
Gerrit-PatchSet: 4
Gerrit-Project: ovirt-engine
Gerrit-Branch: master
Gerrit-Owner: Laszlo Hornyak <[email protected]>
Gerrit-Reviewer: Doron Fediuck <[email protected]>
Gerrit-Reviewer: Gilad Chaplik <[email protected]>
Gerrit-Reviewer: Laszlo Hornyak <[email protected]>
Gerrit-Reviewer: Michael Pasternak <[email protected]>
_______________________________________________
Engine-patches mailing list
[email protected]
http://lists.ovirt.org/mailman/listinfo/engine-patches

Reply via email to