Juan Hernandez 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; > But taking a look at other mappers, VmMapper for instance, it contains the The difference between vm.name and vm.sso.methods is backwards compatibility. For vm.name we don't have to worry, even if it were conceptually wrong, because that is how it was defined to work and how actually works. But in this case we are adding a new element, and it can't alter the previous behaviour. Imagine a user that has a script that posts a certain XML document to create or update a VM. That XML document won't contain the new SSO elements, but it has to work exactly as it worked before. When creating the VM it should have SSO enabled, and it should be GUEST_AGENT. When updating the VM it should also work as it worked before, which means that the SSO method shouldn't be changed. If we use the same mechanism that we use with vm.name what will happen is that an update that doesn't contain the SSO element will reset the VM to GUEST_AGENT. I think that isn't correct. I may be wrong, as what users are encouraged to do in order to do updates is to retrieve the current representation, modify it, and post the result. In this case my argument is meaningless. What do you think? 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