Alon Bar-Lev has posted comments on this change.

Change subject: aaa: using the new extensions API in InternalDirectory
......................................................................


Patch Set 4:

(2 comments)

http://gerrit.ovirt.org/#/c/26477/4/backend/manager/modules/builtin-extensions/src/main/java/org/ovirt/engine/extensions/aaa/builtin/internal/InternalDirectory.java
File 
backend/manager/modules/builtin-extensions/src/main/java/org/ovirt/engine/extensions/aaa/builtin/internal/InternalDirectory.java:

Line 50: 
Line 51:     @Override
Line 52:     public void invoke(ExtMap input, ExtMap output) {
Line 53:         try {
Line 54:             ExtUUID commandType = input.<ExtUUID> 
get(Base.InvokeKeys.COMMAND);
why commandType? what's wrong with the same term of command?
Line 55:             if (commandType.equals(Base.InvokeCommands.INITIALIZE)) {
Line 56:                 doInit(input, output);
Line 57:             } else if 
(commandType.equals(Authz.InvokeCommands.FETCH_PRINCIPAL_RECORD)) {
Line 58:                 doFetchPrincipalRecord(input, output);


Line 62:                 fillOpaque(output, commandType);
Line 63:             } else if 
(commandType.equals(Authz.InvokeCommands.QUERY_PRINCIPALS_OPEN)) {
Line 64:                 fillOpaque(output, commandType);
Line 65:             } else if 
(commandType.equals(Authz.InvokeCommands.QUERY_GROUPS_BY_IDS_OPEN)) {
Line 66:                 fillOpaque(output, commandType);
why not:

 Set<ExtUUID> QueryCommands = new HashSet<>(Arrays.asList(command1, command2, 
command3);

 if (QueryCommands.contains(commandType)) {
     output.put(Authz.InvokeKeys.QUERY_OPAQUE, new Opaque(commandType));
 }

or at least:

 if (commandType == x || commandType == y ...) {
 }
Line 67:             } else if 
(commandType.equals(Authz.InvokeCommands.QUERY_EXECUTE)) {
Line 68:                 doQueryExecute(input, output);
Line 69:             } else {
Line 70:                 output.put(Base.InvokeKeys.COMMAND, 
Base.InvokeResult.UNSUPPORTED);


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

Gerrit-MessageType: comment
Gerrit-Change-Id: I958443292da0455e0a12039fac98eebb9b17dee2
Gerrit-PatchSet: 4
Gerrit-Project: ovirt-engine
Gerrit-Branch: master
Gerrit-Owner: Yair Zaslavsky <yzasl...@redhat.com>
Gerrit-Reviewer: Alon Bar-Lev <alo...@redhat.com>
Gerrit-Reviewer: Yair Zaslavsky <yzasl...@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