Search in sources :

Example 1 with ApiConfigStalenessStatus

use of com.cloudera.api.swagger.model.ApiConfigStalenessStatus in project cloudbreak by hortonworks.

the class ClouderaManagerRangerUtil method isRoleStale.

private boolean isRoleStale(RolesResourceApi rolesResourceApi, String clusterName, String rangerUserSyncRole) throws ApiException {
    ApiRole role = rolesResourceApi.readRole(clusterName, rangerUserSyncRole, RANGER_SERVICE_NAME, "summary");
    ApiConfigStalenessStatus stalenessStatus = role.getConfigStalenessStatus();
    LOGGER.debug("Ranger user sync ApiConfigStalenessStatus = {}", stalenessStatus);
    return stalenessStatus.equals(ApiConfigStalenessStatus.STALE_REFRESHABLE);
}
Also used : ApiRole(com.cloudera.api.swagger.model.ApiRole) ApiConfigStalenessStatus(com.cloudera.api.swagger.model.ApiConfigStalenessStatus)

Aggregations

ApiConfigStalenessStatus (com.cloudera.api.swagger.model.ApiConfigStalenessStatus)1 ApiRole (com.cloudera.api.swagger.model.ApiRole)1