diff options
Diffstat (limited to 'config-model/src/main/java/com/yahoo')
3 files changed, 8 insertions, 9 deletions
diff --git a/config-model/src/main/java/com/yahoo/vespa/model/container/IdentityProvider.java b/config-model/src/main/java/com/yahoo/vespa/model/container/IdentityProvider.java index c791fea3a56..2b5dadf5512 100644 --- a/config-model/src/main/java/com/yahoo/vespa/model/container/IdentityProvider.java +++ b/config-model/src/main/java/com/yahoo/vespa/model/container/IdentityProvider.java @@ -17,7 +17,7 @@ import java.net.URI; * @author mortent */ public class IdentityProvider extends SimpleComponent implements IdentityConfig.Producer { - public static final String CLASS = "com.yahoo.vespa.athenz.identityprovider.client.AthenzIdentityProviderProvider"; + public static final String CLASS = "com.yahoo.vespa.athenz.identityprovider.client.AthenzIdentityProviderImpl"; public static final String BUNDLE = "vespa-athenz"; private final AthenzDomain domain; 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 a1d4e6937e0..e98ae9bf9c5 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 @@ -1,7 +1,6 @@ // Copyright Yahoo. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root. package com.yahoo.vespa.model.container.xml; -import com.yahoo.component.ComponentId; import com.yahoo.component.ComponentSpecification; import com.yahoo.component.Version; import com.yahoo.component.chain.dependencies.Dependencies; @@ -1173,9 +1172,6 @@ public class ContainerModelBuilder extends ConfigModelBuilder<ContainerModel> { ztsUrl, zoneDnsSuffix, zone); - - // Replace AthenzIdentityProviderProvider - cluster.removeComponent(ComponentId.fromString("com.yahoo.container.jdisc.AthenzIdentityProviderProvider")); cluster.addComponent(identityProvider); cluster.getContainers().forEach(container -> { diff --git a/config-model/src/main/java/com/yahoo/vespa/model/container/xml/ModelIdResolver.java b/config-model/src/main/java/com/yahoo/vespa/model/container/xml/ModelIdResolver.java index 76403d369dd..0e52e56d653 100644 --- a/config-model/src/main/java/com/yahoo/vespa/model/container/xml/ModelIdResolver.java +++ b/config-model/src/main/java/com/yahoo/vespa/model/container/xml/ModelIdResolver.java @@ -42,17 +42,20 @@ public class ModelIdResolver { * @param component the XML element of any component */ public static void resolveModelIds(Element component, boolean hosted) { - if ( ! hosted) return; for (Element config : XML.getChildren(component, "config")) { for (Element value : XML.getChildren(config)) - transformModelValue(value); + transformModelValue(value, hosted); } } /** Expands a model config value into regular config values. */ - private static void transformModelValue(Element value) { + private static void transformModelValue(Element value, boolean hosted) { if ( ! value.hasAttribute("model-id")) return; - value.setAttribute("url", modelIdToUrl(value.getTagName(), value.getAttribute("model-id"))); + if (hosted) + value.setAttribute("url", modelIdToUrl(value.getTagName(), value.getAttribute("model-id"))); + else if ( ! value.hasAttribute("url") && ! value.hasAttribute("path")) + throw new IllegalArgumentException(value.getTagName() + " is configured with only a 'model-id'. " + + "Add a 'path' or 'url' to deploy this outside Vespa Cloud"); } private static String modelIdToUrl(String valueName, String modelId) { |