Asaf Shakarchi has posted comments on this change.

Change subject: engine: Propagate error message when quering for LDAP 
users/groups
......................................................................


Patch Set 4: (5 inline comments)

....................................................
File 
backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/adbroker/LdapBrokerCommandBase.java
Line 68:             LdapCredentials ldapCredentials = new 
LdapCredentials(loginNameForKerberos, getPassword());
Line 69:             DirectorySearcher directorySearcher = new 
DirectorySearcher(ldapCredentials);
Line 70:             executeQuery(directorySearcher);
Line 71:         } catch (RuntimeException e) {
Line 72:             log.errorFormat(String.format("Failed to run command %s. 
Domain is %s. User is %s.",
It's not redundant, it's the old syntax, anyway I just replaced with 
log.error(String.format(..))
Line 73:                     getClass().getSimpleName(), getDomain(), 
getLoginName()));
Line 74:             
_ldapReturnValue.setExceptionString(VdcBllMessages.FAILED_TO_RUN_LDAP_QUERY.name());
Line 75:         }
Line 76:         return _ldapReturnValue;


....................................................
File 
frontend/webadmin/modules/frontend/src/main/java/org/ovirt/engine/ui/frontend/AppErrors.java
Line 2253: 
Line 2254:     @DefaultStringValue("Cannot ${action} ${type}. Gluster service 
is not supported in compatibility version ${compatibilityVersion}.")
Line 2255:     String GLUSTER_NOT_SUPPORTED();
Line 2256: 
Line 2257:     @Constants.DefaultStringValue("Failed to run LDAP query, please 
contact the system administrator.")
No, I copied it from other messages to keep in sync.
Line 2258:     String FAILED_TO_RUN_LDAP_QUERY();


....................................................
File 
frontend/webadmin/modules/frontend/src/main/java/org/ovirt/engine/ui/frontend/Frontend.java
Line 235:                                 + "]"); //$NON-NLS-1$
Line 236:                         if (getEventsHandler() != null) {
Line 237:                             ArrayList<VdcQueryReturnValue> 
failedResult = new ArrayList<VdcQueryReturnValue>();
Line 238:                             failedResult.add(result);
Line 239:                             
//getEventsHandler().runQueryFailed(failedResult);
Done
Line 240:                             String errorMessage = 
result.getExceptionString();
Line 241:                             handleNotLoggedInEvent(errorMessage);
Line 242:                         }
Line 243:                         if (callback.isHandleFailure()) {


....................................................
File 
frontend/webadmin/modules/uicommonweb/src/main/java/org/ovirt/engine/ui/uicommonweb/models/users/AdElementListModel.java
Line 242:         AsyncQuery _asyncQuery = new AsyncQuery();
Line 243:         _asyncQuery.setModel(this);
Line 244:         _asyncQuery.asyncCallback = new INewAsyncCallback() {
Line 245:             @Override
Line 246:             public void onSuccess(Object model, Object ReturnValue)
Problem that error may be rendered twice, but it should be taken care of 
properly.
Line 247:             {
Line 248:                 AdElementListModel adElementListModel = 
(AdElementListModel) model;
Line 249:                 HashSet<Guid> excludeUsers = new HashSet<Guid>();
Line 250:                 if (getExcludeItems() != null)


Line 275:                         tempVar2.setEntity(user);
Line 276:                         getusers().add(tempVar2);
Line 277:                     }
Line 278:                 }
Line 279:                 OnUserAndAdGroupsLoaded(adElementListModel);
Done
Line 280:             }
Line 281:         };
Line 282: 
Line 283:         findUsers("allnames=" //$NON-NLS-1$


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

Gerrit-MessageType: comment
Gerrit-Change-Id: I50da72d12c6d60642ad5e65b9376efc49e4ef699
Gerrit-PatchSet: 4
Gerrit-Project: ovirt-engine
Gerrit-Branch: master
Gerrit-Owner: Asaf Shakarchi <[email protected]>
Gerrit-Reviewer: Alona Kaplan <[email protected]>
Gerrit-Reviewer: Asaf Shakarchi <[email protected]>
Gerrit-Reviewer: Daniel Erez <[email protected]>
Gerrit-Reviewer: Gilad Chaplik <[email protected]>
Gerrit-Reviewer: Yair Zaslavsky <[email protected]>
_______________________________________________
Engine-patches mailing list
[email protected]
http://lists.ovirt.org/mailman/listinfo/engine-patches

Reply via email to