Frank Kobzik has posted comments on this change.

Change subject: restapi: Allow enabling/disabling SSO
......................................................................


Patch Set 7:

(1 comment)

http://gerrit.ovirt.org/#/c/21911/7/backend/manager/modules/restapi/interface/definition/src/main/java/org/ovirt/engine/api/model/SsoMethod.java
File 
backend/manager/modules/restapi/interface/definition/src/main/java/org/ovirt/engine/api/model/SsoMethod.java:

Line 2: 
Line 3: public enum SsoMethod {
Line 4: 
Line 5:     GUEST_AGENT,
Line 6:     NONE;
> The point is that we need to differentiate three situations:
But taking a look at other mappers, VmMapper for instance, it contains the 
logic that handles whether attributes are set (not the backend).

For example, consider VM.name attribute handling in map(VM vm, VmStatic 
template) method of VmMapper:

if (vm.isSetName()) {
    staticVm.setName(vm.getName());
}

If the rest entity doesn't contain the value, it is not set on backend entity 
at all. No null is sent to backend.

I'm not saying the approach you suggested is wrong at all! But it's seems to me 
weird that we don't use in the rest of the scenarios, too.
Line 7: 
Line 8:     public String value() {
Line 9:         return name().toLowerCase();
Line 10:     }


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

Gerrit-MessageType: comment
Gerrit-Change-Id: I25bf94646ea89684152e48f25ad604db6e59e86c
Gerrit-PatchSet: 7
Gerrit-Project: ovirt-engine
Gerrit-Branch: master
Gerrit-Owner: Frank Kobzik <fkob...@redhat.com>
Gerrit-Reviewer: Frank Kobzik <fkob...@redhat.com>
Gerrit-Reviewer: Juan Hernandez <juan.hernan...@redhat.com>
Gerrit-Reviewer: Michael Pasternak <mishka8...@yahoo.com>
Gerrit-Reviewer: Ori Liel <ol...@redhat.com>
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