use of com.sequenceiq.freeipa.client.FreeIpaClientExceptionWrapper in project cloudbreak by hortonworks.
the class KerberosMgmtRoleComponent method doesPrivilegeExist.
private boolean doesPrivilegeExist(FreeIpaClient ipaClient, String privilegeName) {
try {
ipaClient.showPrivilege(privilegeName);
LOGGER.debug("Privilege [{}] exists", privilegeName);
return true;
} catch (FreeIpaClientException e) {
if (FreeIpaClientExceptionUtil.isNotFoundException(e)) {
LOGGER.debug("Privilege [{}] does not exist", privilegeName);
return false;
} else {
LOGGER.error("Privilege [{}] show error", privilegeName, e);
throw new FreeIpaClientExceptionWrapper(e);
}
}
}
use of com.sequenceiq.freeipa.client.FreeIpaClientExceptionWrapper in project cloudbreak by hortonworks.
the class RootCertRegisterService method register.
@Override
@Retryable(value = RetryableFreeIpaClientException.class, maxAttemptsExpression = RetryableFreeIpaClientException.MAX_RETRIES_EXPRESSION, backoff = @Backoff(delayExpression = RetryableFreeIpaClientException.DELAY_EXPRESSION, multiplierExpression = RetryableFreeIpaClientException.MULTIPLIER_EXPRESSION))
public void register(Long stackId) {
try {
Stack stack = stackService.getStackById(stackId);
registerInternal(stack);
} catch (FreeIpaClientException e) {
LOGGER.error("Couldn't get FreeIPA CA certificate", e);
throw new FreeIpaClientExceptionWrapper(e);
}
}
Aggregations