private void initHostResources() {
    ClusterDefinition clusterDefinition = getClusterDefinition();
    String            clusterName       = clusterDefinition.getClusterName();
    Set<String>       hosts             = clusterDefinition.getHosts();

    for (String hostName : hosts) {
      Resource host = new ResourceImpl(Resource.Type.Host);
      host.setProperty(HOST_CLUSTER_NAME_PROPERTY_ID, clusterName);
      host.setProperty(HOST_NAME_PROPERTY_ID, hostName);
      try {
        host.setProperty(HOST_IP_PROPERTY_ID, clusterDefinition.getHostInfoProvider().getHostAddress(hostName));
      } catch (SystemException e) {
        if (LOG.isErrorEnabled()) {
          LOG.error("Can't set host ip address : caught exception", e);
        }
      }

      addResource(host);
    }
  }
Create the resources based on the cluster definition.
contrib/ambari-scom/ambari-scom-server/src/main/java/org/apache/ambari/msi/HostProvider.java