Gilad Chaplik has posted comments on this change.

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


Patch Set 4: (6 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.",
one redundant 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.")
the=your?
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);
format (no change)
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)
what about handling failure here?
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);
please clear the error message in OnUserAndAdGroupsLoaded
Line 280:             }
Line 281:         };
Line 282: 
Line 283:         findUsers("allnames=" //$NON-NLS-1$


....................................................
File 
frontend/webadmin/modules/webadmin/src/main/resources/org/ovirt/engine/ui/frontend/AppErrors.properties
Line 784: VAR__TYPE__EXTERNAL_EVENT=$type External Event
Line 785: ACTION_TYPE_FAILED_EXTERNAL_EVENT_ILLEGAL_ORIGIN=Cannot ${action} 
${type}. Illegal Origin for External Event : oVirt
Line 786: ACTION_TYPE_FAILED_EXTERNAL_EVENT_NOT_FOUND=Cannot ${action} 
${type}.External Event does not exist.
Line 787: ACTION_TYPE_FAILED_EXTERNAL_EVENT_ILLRGAL_OPERATION=Cannot ${action} 
${type}.Only Alerts can be removed.
Line 788: FAILED_TO_RUN_LDAP_QUERY=Failed to run LDAP query, please contact the 
system administrator.
the=your?


--
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 <a...@redhat.com>
Gerrit-Reviewer: Alona Kaplan <alkap...@redhat.com>
Gerrit-Reviewer: Asaf Shakarchi <a...@redhat.com>
Gerrit-Reviewer: Daniel Erez <de...@redhat.com>
Gerrit-Reviewer: Gilad Chaplik <gchap...@redhat.com>
Gerrit-Reviewer: Yair Zaslavsky <yzasl...@redhat.com>
_______________________________________________
Engine-patches mailing list
Engine-patches@ovirt.org
http://lists.ovirt.org/mailman/listinfo/engine-patches

Reply via email to