use of com.cloudera.api.swagger.RoleCommandsResourceApi in project cloudbreak by hortonworks.
the class ClouderaManagerRangerUtil method triggerRoleRefresh.
private ApiCommand triggerRoleRefresh(ApiClient client, String clusterName, String serviceName, String roleName) throws ApiException {
LOGGER.info("Trigerring role refresh on clusterName = {}, serviceName = {}, roleName = {}", clusterName, serviceName, roleName);
ApiRoleNameList roleNameList = new ApiRoleNameList();
roleNameList.addItemsItem(roleName);
RoleCommandsResourceApi roleCommandsResourceApi = clouderaManagerApiFactory.getRoleCommandsResourceApi(client);
ApiBulkCommandList bulkResponse = roleCommandsResourceApi.refreshCommand(clusterName, serviceName, roleNameList);
return Iterables.getOnlyElement(bulkResponse.getItems());
}
Aggregations