Search in sources :

Example 1 with ConfigConfMo

use of com.emc.cloud.platform.ucs.out.model.ConfigConfMo in project coprhd-controller by CoprHD.

the class UCSMSession method checkForResponseStatusErrors.

private void checkForResponseStatusErrors(Object response) throws ClientGeneralException {
    String errorCode = null;
    String errorDescription = null;
    if (response instanceof ConfigResolveDn) {
        ConfigResolveDn configResolveDn = ((ConfigResolveDn) response);
        errorCode = configResolveDn.getErrorCode();
        errorDescription = configResolveDn.getErrorDescr();
    } else if (response instanceof ConfigConfMo) {
        ConfigConfMo configResolveDn = ((ConfigConfMo) response);
        errorCode = configResolveDn.getErrorCode();
        errorDescription = configResolveDn.getErrorDescr();
    } else if (response instanceof ConfigResolveClass) {
        ConfigResolveClass configResolveDn = ((ConfigResolveClass) response);
        errorCode = configResolveDn.getErrorCode();
        errorDescription = configResolveDn.getErrorDescr();
    }
    if (errorCode != null) {
        String[] errors = new String[] { errorDescription };
        throw new ClientGeneralException(ClientMessageKeys.byErrorCode(parseNumber(errorCode).intValue()), errors);
    }
}
Also used : ConfigResolveDn(com.emc.cloud.platform.ucs.out.model.ConfigResolveDn) ConfigConfMo(com.emc.cloud.platform.ucs.out.model.ConfigConfMo) ConfigResolveClass(com.emc.cloud.platform.ucs.out.model.ConfigResolveClass) ClientGeneralException(com.emc.cloud.platform.clientlib.ClientGeneralException)

Aggregations

ClientGeneralException (com.emc.cloud.platform.clientlib.ClientGeneralException)1 ConfigConfMo (com.emc.cloud.platform.ucs.out.model.ConfigConfMo)1 ConfigResolveClass (com.emc.cloud.platform.ucs.out.model.ConfigResolveClass)1 ConfigResolveDn (com.emc.cloud.platform.ucs.out.model.ConfigResolveDn)1