diff options
author | Håkon Hallingstad <hakon@yahooinc.com> | 2022-01-03 17:39:33 +0100 |
---|---|---|
committer | Håkon Hallingstad <hakon@yahooinc.com> | 2022-01-03 17:39:33 +0100 |
commit | 0646515bf772065e2992152aeb7a0a808f18df62 (patch) | |
tree | d81f892f9d4ac7cafc02a4c71ba57d7545728cc5 /orchestrator | |
parent | 4528efcd87b9c078f91ecfc4f53dfee8632881e1 (diff) |
Add InfrastructureApplication in application-model
Diffstat (limited to 'orchestrator')
2 files changed, 10 insertions, 9 deletions
diff --git a/orchestrator/src/main/java/com/yahoo/vespa/orchestrator/policy/HostedVespaOrchestration.java b/orchestrator/src/main/java/com/yahoo/vespa/orchestrator/policy/HostedVespaOrchestration.java index 0028a5a252c..eb2b863aefb 100644 --- a/orchestrator/src/main/java/com/yahoo/vespa/orchestrator/policy/HostedVespaOrchestration.java +++ b/orchestrator/src/main/java/com/yahoo/vespa/orchestrator/policy/HostedVespaOrchestration.java @@ -1,8 +1,8 @@ // Copyright Yahoo. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root. package com.yahoo.vespa.orchestrator.policy; -import com.yahoo.config.provision.ApplicationId; import com.yahoo.vespa.applicationmodel.ClusterId; +import com.yahoo.vespa.applicationmodel.InfrastructureApplication; import com.yahoo.vespa.applicationmodel.ServiceType; /** @@ -19,7 +19,7 @@ public class HostedVespaOrchestration { return new OrchestrationParams.Builder() // Controller host - .addApplicationParams(ApplicationId.fromSerializedForm("hosted-vespa:controller-host:default"), + .addApplicationParams(InfrastructureApplication.CONTROLLER_HOST, new ApplicationParams .Builder() .add(ClusterId.CONTROLLER, @@ -31,7 +31,7 @@ public class HostedVespaOrchestration { .build()) // Controller - .addApplicationParams(ApplicationId.fromSerializedForm("hosted-vespa:controller:default"), + .addApplicationParams(InfrastructureApplication.CONTROLLER, new ApplicationParams .Builder() .add(ClusterId.CONTROLLER, @@ -43,7 +43,7 @@ public class HostedVespaOrchestration { .build()) // Config server host - .addApplicationParams(ApplicationId.fromSerializedForm("hosted-vespa:configserver-host:default"), + .addApplicationParams(InfrastructureApplication.CONFIG_SERVER_HOST, new ApplicationParams .Builder() .add(ClusterId.CONFIG_SERVER_HOST, @@ -55,7 +55,7 @@ public class HostedVespaOrchestration { .build()) // Config server - .addApplicationParams(ApplicationId.fromSerializedForm("hosted-vespa:zone-config-servers:default"), + .addApplicationParams(InfrastructureApplication.CONFIG_SERVER, new ApplicationParams .Builder() .add(ClusterId.CONFIG_SERVER, @@ -67,7 +67,7 @@ public class HostedVespaOrchestration { .build()) // Proxy host - .addApplicationParams(ApplicationId.fromSerializedForm("hosted-vespa:proxy-host:default"), + .addApplicationParams(InfrastructureApplication.PROXY_HOST, new ApplicationParams .Builder() .add(ClusterId.PROXY_HOST, @@ -79,7 +79,7 @@ public class HostedVespaOrchestration { .build()) // Proxy - .addApplicationParams(ApplicationId.fromSerializedForm("hosted-vespa:routing:default"), + .addApplicationParams(InfrastructureApplication.PROXY, new ApplicationParams .Builder() .add(ClusterId.ROUTING, diff --git a/orchestrator/src/main/java/com/yahoo/vespa/orchestrator/policy/OrchestrationParams.java b/orchestrator/src/main/java/com/yahoo/vespa/orchestrator/policy/OrchestrationParams.java index 530f2dc8faf..43065831cbc 100644 --- a/orchestrator/src/main/java/com/yahoo/vespa/orchestrator/policy/OrchestrationParams.java +++ b/orchestrator/src/main/java/com/yahoo/vespa/orchestrator/policy/OrchestrationParams.java @@ -2,6 +2,7 @@ package com.yahoo.vespa.orchestrator.policy; import com.yahoo.config.provision.ApplicationId; +import com.yahoo.vespa.applicationmodel.InfrastructureApplication; import java.util.HashMap; import java.util.Map; @@ -20,8 +21,8 @@ public class OrchestrationParams { public Builder() {} - public Builder addApplicationParams(ApplicationId applicationId, ApplicationParams params) { - this.applicationParams.put(applicationId, params); + public Builder addApplicationParams(InfrastructureApplication application, ApplicationParams params) { + this.applicationParams.put(application.id(), params); return this; } |