@Override
  public Map<String, BlueprintProvisioningState> getBlueprintProvisioningStates(Long clusterId, Long hostId)
      throws AmbariException {
    Map<String, BlueprintProvisioningState> blueprintProvisioningStates = new HashMap<>();
    Host host = clusters.getHostById(hostId);
    Cluster cl = clusters.getCluster(clusterId);
    for (ServiceComponentHost sch : cl.getServiceComponentHosts(host.getHostName())) {
      if (!sch.isClientComponent()) {
        blueprintProvisioningStates.put(sch.getServiceComponentName(),
            sch.getDesiredStateEntity().getBlueprintProvisioningState());
      }
    }
    return blueprintProvisioningStates;
  }
Collects full metadata info about clusters for agent.
@return metadata info about clusters
@throws AmbariException
ambari-server/src/main/java/org/apache/ambari/server/controller/AmbariManagementControllerImpl.java