diff options
author | Jon Bratseth <bratseth@gmail.com> | 2022-11-14 14:18:37 +0100 |
---|---|---|
committer | Jon Bratseth <bratseth@gmail.com> | 2022-11-14 14:18:37 +0100 |
commit | 8e1caf787e82fceadcf308e74f0cf088373f573e (patch) | |
tree | aab41b8ae91dce179beac6d86464aff6c757df0c /node-repository/src/main/java | |
parent | 60e0c807988226eba418e9c80da2fd0b8f5e9015 (diff) |
Use dynamic provisioning in AWS tests
Diffstat (limited to 'node-repository/src/main/java')
2 files changed, 5 insertions, 2 deletions
diff --git a/node-repository/src/main/java/com/yahoo/vespa/hosted/provision/provisioning/HostProvisioner.java b/node-repository/src/main/java/com/yahoo/vespa/hosted/provision/provisioning/HostProvisioner.java index eb0877be4d7..95d10557e3a 100644 --- a/node-repository/src/main/java/com/yahoo/vespa/hosted/provision/provisioning/HostProvisioner.java +++ b/node-repository/src/main/java/com/yahoo/vespa/hosted/provision/provisioning/HostProvisioner.java @@ -24,6 +24,7 @@ import java.util.function.Consumer; public interface HostProvisioner { enum HostSharing { + /** The host must be provisioned exclusively for the applicationId */ exclusive, @@ -32,6 +33,7 @@ public interface HostProvisioner { /** The client has no requirements on whether the host must be provisioned exclusively or shared. */ any + } /** @@ -39,7 +41,7 @@ public interface HostProvisioner { * * @param provisionIndices list of unique provision indices which will be used to generate the node hostnames * on the form of <code>[prefix][index].[domain]</code> - * @param hostType The host type to provision + * @param hostType the host type to provision * @param resources the resources needed per node - the provisioned host may be significantly larger * @param applicationId id of the application that will own the provisioned host * @param osVersion the OS version to use. If this version does not exist, implementations may choose a suitable diff --git a/node-repository/src/main/java/com/yahoo/vespa/hosted/provision/testutils/MockHostProvisioner.java b/node-repository/src/main/java/com/yahoo/vespa/hosted/provision/testutils/MockHostProvisioner.java index 76e16e9fbaf..aa4c763fcdc 100644 --- a/node-repository/src/main/java/com/yahoo/vespa/hosted/provision/testutils/MockHostProvisioner.java +++ b/node-repository/src/main/java/com/yahoo/vespa/hosted/provision/testutils/MockHostProvisioner.java @@ -65,7 +65,8 @@ public class MockHostProvisioner implements HostProvisioner { ApplicationId applicationId, Version osVersion, HostSharing sharing, Optional<ClusterSpec.Type> clusterType, CloudAccount cloudAccount, Consumer<List<ProvisionedHost>> provisionedHostsConsumer) { - Flavor hostFlavor = this.hostFlavor.orElseGet(() -> flavors.stream().filter(f -> compatible(f, resources)) + Flavor hostFlavor = this.hostFlavor.orElseGet(() -> flavors.stream() + .filter(f -> compatible(f, resources)) .findFirst() .orElseThrow(() -> new NodeAllocationException("No host flavor matches " + resources, true))); List<ProvisionedHost> hosts = new ArrayList<>(); |