} catch (Exception e) {
throw AmbariApiException.CANNOT_CONNECT_AMBARI_SERVER(e);
}
String clusterJson = handleAmbariResponse(response);
logger.trace("in getClusterServicesNames, cluster info is " + clusterJson);
ApiCluster apiCluster =
ApiUtils.jsonToObject(ApiCluster.class, clusterJson);
List<ApiService> apiServices = apiCluster.getApiServices();
List<String> servicesNames = null;
for (ApiService apiService : apiServices) {
if (apiService != null) {
ApiServiceInfo serviceInfo = apiService.getServiceInfo();
if (serviceInfo != null) {