HostEntity hostEntity = new HostEntity();
hostEntity.setHostName(HOST_NAME);
hostEntity.setClusterEntities(Collections.singletonList(clusterEntity));
hostDAO.create(hostEntity);
clusterEntity.getHostEntities().add(hostEntity);
clusterDAO.merge(clusterEntity);
return hostEntity;
}
private void addComponent(ClusterEntity clusterEntity, ClusterServiceEntity clusterServiceEntity, HostEntity hostEntity, String componentName) {
ServiceComponentDesiredStateEntity componentDesiredStateEntity = new ServiceComponentDesiredStateEntity();