diff options
author | Morten Tokle <mortent@oath.com> | 2017-11-22 13:55:21 +0100 |
---|---|---|
committer | Morten Tokle <mortent@oath.com> | 2017-11-22 13:55:21 +0100 |
commit | 8a3a438afaf538766e5388bb48802db05fc055ce (patch) | |
tree | f868c2a1734fad1c0a5e05611dda6fa095634e87 /config-model | |
parent | 4fa8521f1d23a64c0c0bc1b8fb11c1be7a7c3762 (diff) |
Rename Identity -> IdentityProvider
Diffstat (limited to 'config-model')
-rw-r--r-- | config-model/src/main/java/com/yahoo/vespa/model/container/IdentityProvider.java (renamed from config-model/src/main/java/com/yahoo/vespa/model/container/Identity.java) | 4 | ||||
-rw-r--r-- | config-model/src/main/java/com/yahoo/vespa/model/container/xml/ContainerModelBuilder.java | 20 | ||||
-rw-r--r-- | config-model/src/test/java/com/yahoo/vespa/model/container/xml/IdentityBuilderTest.java | 4 |
3 files changed, 14 insertions, 14 deletions
diff --git a/config-model/src/main/java/com/yahoo/vespa/model/container/Identity.java b/config-model/src/main/java/com/yahoo/vespa/model/container/IdentityProvider.java index bf5a7757149..0368f7eaf3e 100644 --- a/config-model/src/main/java/com/yahoo/vespa/model/container/Identity.java +++ b/config-model/src/main/java/com/yahoo/vespa/model/container/IdentityProvider.java @@ -11,14 +11,14 @@ import com.yahoo.vespa.model.container.component.SimpleComponent; /** * @author mortent */ -public class Identity extends SimpleComponent implements IdentityConfig.Producer { +public class IdentityProvider extends SimpleComponent implements IdentityConfig.Producer { public static final String CLASS = AthenzIdentityProviderImpl.class.getName(); private final AthenzDomain domain; private final AthenzService service; private final HostName loadBalancerName; - public Identity(AthenzDomain domain, AthenzService service, HostName loadBalancerName) { + public IdentityProvider(AthenzDomain domain, AthenzService service, HostName loadBalancerName) { super(CLASS); this.domain = domain; this.service = service; diff --git a/config-model/src/main/java/com/yahoo/vespa/model/container/xml/ContainerModelBuilder.java b/config-model/src/main/java/com/yahoo/vespa/model/container/xml/ContainerModelBuilder.java index 4dba9f923a8..e91d360c9f8 100644 --- a/config-model/src/main/java/com/yahoo/vespa/model/container/xml/ContainerModelBuilder.java +++ b/config-model/src/main/java/com/yahoo/vespa/model/container/xml/ContainerModelBuilder.java @@ -43,7 +43,7 @@ import com.yahoo.vespa.model.clients.ContainerDocumentApi; import com.yahoo.vespa.model.container.Container; import com.yahoo.vespa.model.container.ContainerCluster; import com.yahoo.vespa.model.container.ContainerModel; -import com.yahoo.vespa.model.container.Identity; +import com.yahoo.vespa.model.container.IdentityProvider; import com.yahoo.vespa.model.container.component.Component; import com.yahoo.vespa.model.container.component.FileStatusHandlerComponent; import com.yahoo.vespa.model.container.component.chain.ProcessingHandler; @@ -174,17 +174,17 @@ public class ContainerModelBuilder extends ConfigModelBuilder<ContainerModel> { // Athenz copper argos // NOTE: Must be done after addNodes() - addIdentity(cluster, - context.getDeployState().getProperties().configServerSpecs(), - context.getDeployState().getProperties().loadBalancerName(), - context.getDeployState().zone()); + addIdentityProvider(cluster, + context.getDeployState().getProperties().configServerSpecs(), + context.getDeployState().getProperties().loadBalancerName(), + context.getDeployState().zone()); - addRotationInfo(cluster, context.getDeployState().zone(), context.getDeployState().getRotations()); + addRotationProperties(cluster, context.getDeployState().zone(), context.getDeployState().getRotations()); //TODO: overview handler, see DomQrserverClusterBuilder } - private void addRotationInfo(ContainerCluster cluster, Zone zone, Set<Rotation> rotations) { + private void addRotationProperties(ContainerCluster cluster, Zone zone, Set<Rotation> rotations) { Optional<String> globalServiceId = deploymentSpec.flatMap(DeploymentSpec::globalServiceId); cluster.getContainers().forEach(container -> { setRotations(container, rotations, globalServiceId, cluster.getName()); @@ -732,13 +732,13 @@ public class ContainerModelBuilder extends ConfigModelBuilder<ContainerModel> { } } - private void addIdentity(ContainerCluster cluster, List<ConfigServerSpec> configServerSpecs, HostName loadBalancerName, Zone zone) { + private void addIdentityProvider(ContainerCluster cluster, List<ConfigServerSpec> configServerSpecs, HostName loadBalancerName, Zone zone) { deploymentSpec.ifPresent(spec -> { spec.athenzDomain().ifPresent(domain -> { AthenzService service = spec.athenzService(zone.environment(), zone.region()) .orElseThrow(() -> new RuntimeException("Missing Athenz service configuration")); - Identity identity = new Identity(domain, service, getLoadBalancerName(loadBalancerName, configServerSpecs)); - cluster.addComponent(identity); + IdentityProvider identityProvider = new IdentityProvider(domain, service, getLoadBalancerName(loadBalancerName, configServerSpecs)); + cluster.addComponent(identityProvider); cluster.getContainers().forEach(container -> { container.setProp("identity.domain", domain.value()); diff --git a/config-model/src/test/java/com/yahoo/vespa/model/container/xml/IdentityBuilderTest.java b/config-model/src/test/java/com/yahoo/vespa/model/container/xml/IdentityBuilderTest.java index def23be1474..17890a552f9 100644 --- a/config-model/src/test/java/com/yahoo/vespa/model/container/xml/IdentityBuilderTest.java +++ b/config-model/src/test/java/com/yahoo/vespa/model/container/xml/IdentityBuilderTest.java @@ -7,7 +7,7 @@ import com.yahoo.config.model.deploy.DeployState; import com.yahoo.config.model.test.MockApplicationPackage; import com.yahoo.config.model.test.MockRoot; import com.yahoo.container.core.identity.IdentityConfig; -import com.yahoo.vespa.model.container.Identity; +import com.yahoo.vespa.model.container.IdentityProvider; import org.junit.Test; import org.w3c.dom.Element; import org.xml.sax.SAXException; @@ -39,7 +39,7 @@ public class IdentityBuilderTest extends ContainerModelBuilderTestBase { root = new MockRoot("root", applicationPackage); createModel(root, DeployState.createTestState(applicationPackage), clusterElem); - IdentityConfig identityConfig = root.getConfig(IdentityConfig.class, "default/component/" + Identity.CLASS); + IdentityConfig identityConfig = root.getConfig(IdentityConfig.class, "default/component/" + IdentityProvider.CLASS); assertEquals("domain", identityConfig.domain()); assertEquals("service", identityConfig.service()); } |