summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorValerij Fredriksen <valerijf@oath.com>2017-11-07 13:56:18 +0100
committerValerij Fredriksen <valerijf@oath.com>2017-11-07 13:56:18 +0100
commit3d096417609d6a1d5ee944e91760e4ef06ad95d7 (patch)
tree0cafc48a404ba86ee8b51d41a2cca35fb8355fcd
parent42e32dd697f648111c3e41f5a763b94e7cf1fb23 (diff)
flavor -> resources
-rw-r--r--docker-api/src/main/java/com/yahoo/vespa/hosted/dockerapi/Container.java12
-rw-r--r--node-admin/src/main/java/com/yahoo/vespa/hosted/node/admin/nodeagent/NodeAgentImpl.java4
-rw-r--r--node-admin/src/test/java/com/yahoo/vespa/hosted/node/admin/integrationTests/DockerMock.java2
3 files changed, 9 insertions, 9 deletions
diff --git a/docker-api/src/main/java/com/yahoo/vespa/hosted/dockerapi/Container.java b/docker-api/src/main/java/com/yahoo/vespa/hosted/dockerapi/Container.java
index 0a63b3265f6..a3805add15d 100644
--- a/docker-api/src/main/java/com/yahoo/vespa/hosted/dockerapi/Container.java
+++ b/docker-api/src/main/java/com/yahoo/vespa/hosted/dockerapi/Container.java
@@ -9,7 +9,7 @@ import java.util.Objects;
public class Container {
public final String hostname;
public final DockerImage image;
- public final ContainerResources flavor;
+ public final ContainerResources resources;
public final ContainerName name;
public final State state;
public final int pid;
@@ -17,13 +17,13 @@ public class Container {
public Container(
final String hostname,
final DockerImage image,
- final ContainerResources flavor,
+ final ContainerResources resources,
final ContainerName containerName,
final State state,
final int pid) {
this.hostname = hostname;
this.image = image;
- this.flavor = flavor;
+ this.resources = resources;
this.name = containerName;
this.state = state;
this.pid = pid;
@@ -37,14 +37,14 @@ public class Container {
final Container other = (Container) obj;
return Objects.equals(hostname, other.hostname)
&& Objects.equals(image, other.image)
- && Objects.equals(flavor, other.flavor)
+ && Objects.equals(resources, other.resources)
&& Objects.equals(name, other.name)
&& Objects.equals(pid, other.pid);
}
@Override
public int hashCode() {
- return Objects.hash(hostname, image, flavor, name, pid);
+ return Objects.hash(hostname, image, resources, name, pid);
}
@Override
@@ -52,7 +52,7 @@ public class Container {
return "Container {"
+ " hostname=" + hostname
+ " image=" + image
- + " flavor=" + flavor
+ + " resources=" + resources
+ " name=" + name
+ " state=" + state
+ " pid=" + pid
diff --git a/node-admin/src/main/java/com/yahoo/vespa/hosted/node/admin/nodeagent/NodeAgentImpl.java b/node-admin/src/main/java/com/yahoo/vespa/hosted/node/admin/nodeagent/NodeAgentImpl.java
index 7b61436837c..09eb14039e8 100644
--- a/node-admin/src/main/java/com/yahoo/vespa/hosted/node/admin/nodeagent/NodeAgentImpl.java
+++ b/node-admin/src/main/java/com/yahoo/vespa/hosted/node/admin/nodeagent/NodeAgentImpl.java
@@ -322,9 +322,9 @@ public class NodeAgentImpl implements NodeAgent {
ContainerResources wantedContainerResources = ContainerResources.from(
nodeSpec.minCpuCores, nodeSpec.minMainMemoryAvailableGb);
- if (!wantedContainerResources.equals(existingContainer.flavor)) {
+ if (!wantedContainerResources.equals(existingContainer.resources)) {
return Optional.of("Container should be running with different resource allocation, wanted: " +
- wantedContainerResources + ", actual: " + existingContainer.flavor);
+ wantedContainerResources + ", actual: " + existingContainer.resources);
}
return Optional.empty();
}
diff --git a/node-admin/src/test/java/com/yahoo/vespa/hosted/node/admin/integrationTests/DockerMock.java b/node-admin/src/test/java/com/yahoo/vespa/hosted/node/admin/integrationTests/DockerMock.java
index 2cf0f4680a0..a1cc1850d23 100644
--- a/node-admin/src/test/java/com/yahoo/vespa/hosted/node/admin/integrationTests/DockerMock.java
+++ b/node-admin/src/test/java/com/yahoo/vespa/hosted/node/admin/integrationTests/DockerMock.java
@@ -92,7 +92,7 @@ public class DockerMock implements Docker {
callOrderVerifier.add("stopContainer with " + containerName);
Container container = containersByContainerName.get(containerName);
containersByContainerName.put(containerName,
- new Container(container.hostname, container.image, container.flavor, container.name, Container.State.EXITED, 0));
+ new Container(container.hostname, container.image, container.resources, container.name, Container.State.EXITED, 0));
}
}