Martin Peřina has posted comments on this change. Change subject: 17. core: Add Keystone authenticator ......................................................................
Patch Set 21: (2 comments) http://gerrit.ovirt.org/#/c/21149/21/backend/manager/modules/authentication/src/main/java/org/ovirt/engine/core/authentication/openstack/KeystoneAuthenticator.java File backend/manager/modules/authentication/src/main/java/org/ovirt/engine/core/authentication/openstack/KeystoneAuthenticator.java: Line 49: /** Line 50: * {@inheritDoc} Line 51: */ Line 52: @Override Line 53: public AuthenticationResult authenticate(String user, String password) { In this case I would prefer storing method result into variable and call return from one place. Line 54: // Create the authentication request: Line 55: TokensResource.Authenticate request = client.tokens().authenticate() Line 56: .withUsernamePassword(user, password) Line 57: .withTenantName(tenant); Line 61: try { Line 62: request.execute(); Line 63: return new BooleanAuthenticationResult(true); Line 64: } Line 65: catch (OpenStackResponseException exception) { Please move "catch" part on one line with ending curly bracket for try part. Line 66: // The 401 response code corresponds to authentication failure, whilst other codes may indicate Line 67: // configuration problems, so in those cases it is worth sending the complete stack trace to the log: Line 68: if (exception.getStatus() != 401) { Line 69: log.warn( -- To view, visit http://gerrit.ovirt.org/21149 To unsubscribe, visit http://gerrit.ovirt.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I9588f015ac8766e38163665e4eec68b9d5638a6d Gerrit-PatchSet: 21 Gerrit-Project: ovirt-engine Gerrit-Branch: master Gerrit-Owner: Juan Hernandez <[email protected]> Gerrit-Reviewer: Barak Azulay <[email protected]> Gerrit-Reviewer: Federico Simoncelli <[email protected]> Gerrit-Reviewer: Itamar Heim <[email protected]> Gerrit-Reviewer: Juan Hernandez <[email protected]> Gerrit-Reviewer: Liran Zelkha <[email protected]> Gerrit-Reviewer: Martin Peřina <[email protected]> Gerrit-Reviewer: Mike Kolesnik <[email protected]> Gerrit-Reviewer: Ravi Nori <[email protected]> Gerrit-Reviewer: Yair Zaslavsky <[email protected]> Gerrit-Reviewer: oVirt Jenkins CI Server Gerrit-HasComments: Yes _______________________________________________ Engine-patches mailing list [email protected] http://lists.ovirt.org/mailman/listinfo/engine-patches
