Michael Pasternak has posted comments on this change.

Change subject: restapi: Host Hooks - add link and href
......................................................................


Patch Set 1: I would prefer that you didn't submit this

(2 inline comments)

....................................................
File 
backend/manager/modules/restapi/jaxrs/src/main/java/org/ovirt/engine/api/restapi/resource/BackendHostHookResource.java
Line 25: 
Line 26:     public Hook getHook(Hooks hooks) {
Line 27:         for (Hook hook : hooks.getHooks()) {
Line 28:             if (HostMapper.generateHookId(hook.getEventName(), 
hook.getName(), hook.getMd5()).equals(guid)) {
Line 29:                 return addHref(hook);
this should happen automatically by addLinks() and not explicitly as you did 
bellow.
Line 30:             }
Line 31:         }
Line 32:         return notFound();
Line 33:     }


....................................................
File 
backend/manager/modules/restapi/jaxrs/src/main/java/org/ovirt/engine/api/restapi/resource/BackendHostHooksResource.java
Line 35: 
Line 36:     private Hooks mapCollection(HashMap<String, HashMap<String, 
HashMap<String, String>>> hooksMap) {
Line 37:         Hooks hooks = mappingLocator.getMapper(HashMap.class, 
Hooks.class).map(hooksMap, null);
Line 38:         for (Hook hook : hooks.getHooks()) {
Line 39:             addHref(hook);
same here, this should happen automatically by addLinks() and not explicitly as 
you did bellow.
Line 40:         }
Line 41:         return hooks;
Line 42:     }
Line 43: 


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

Gerrit-MessageType: comment
Gerrit-Change-Id: I3e2f33259a47624ca5b337408718e0343bec2279
Gerrit-PatchSet: 1
Gerrit-Project: ovirt-engine
Gerrit-Branch: master
Gerrit-Owner: Ori Liel <[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