/*
* get roles that is not in the expected state
*/
private HashMap<String, Set<String>> getFailedRoles(String clusterName, ApiRoleState roleState) {
HashMap<String, Set<String>> failedRoles = null;
ApiServiceList serviceList = apiResourceRootV6.getClustersResource().getServicesResource(clusterName).readServices(
DataView.FULL);
if (serviceList != null && serviceList.getServices() != null && !serviceList.getServices().isEmpty()) {
for (ApiService service : serviceList.getServices()) {
for (ApiRole role : apiResourceRootV6.getClustersResource().getServicesResource(clusterName)
.getRolesResource(service.getName()).readRoles()) {
logger.info("role " + role.getName() + " is in state " + role.getRoleState());
if (!roleState.equals(role.getRoleState())) {
if (failedRoles == null) {