blob: 0bffdc9b735e74ab07e6b34bb85701a7c402fdbc (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
|
// Copyright 2017 Yahoo Holdings. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root.
package com.yahoo.config.model.api;
import com.yahoo.config.provision.*;
import java.util.List;
/**
* Interface towards the host provisioner used to build a {@link Model}. The difference between this provisioner
* and {@link com.yahoo.config.provision.Provisioner}, is that this interface only exposes methods needed
* to build the model.
*
* @author Ulf Lilleengen
*/
public interface HostProvisioner {
/** Allocates a single host for a service */
// TODO: Remove
HostSpec allocateHost(String alias);
/**
* Prepares allocation of a set of hosts with a given type, common id and the amount.
*
* @param cluster the cluster to allocate nodes to
* @param capacity the capacity describing the capacity requested
* @param logger a logger to which messages to the deployer may be written
* @return the specification of the allocated hosts
*/
List<HostSpec> prepare(ClusterSpec cluster, Capacity capacity, ProvisionLogger logger);
}
|