protected static Cluster getCluster(String clusterName, Map<String, Object> propertyMap) {

    Map<String, String> properties = new HashMap<>();
    for ( Map.Entry<String, Object> entry : propertyMap.entrySet()) {
      String property = entry.getKey();
      String category = PropertyHelper.getPropertyCategory(property);
      if (category.equals(CLUSTER_PROPERTIES_PROPERTY_ID)) {
        properties.put(PropertyHelper.getPropertyName(property), (String) entry.getValue());
      }
    }

    return new Cluster(
        clusterName,
        (String) propertyMap.get(CLUSTER_COLO_PROPERTY_ID),
        getInterfaces((Set<Map<String, Object>>) propertyMap.get(CLUSTER_INTERFACES_PROPERTY_ID)),
        getLocations((Set<Map<String, Object>>) propertyMap.get(CLUSTER_LOCATIONS_PROPERTY_ID)),
        properties);
  }
Construct a provider.

@param ivoryService    the ivory service
ambari-server/src/main/java/org/apache/ambari/server/controller/internal/TargetClusterResourceProvider.java