com.yahoo.vespa.hosted.provision.testutils.ContainerConfig Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of node-repository Show documentation
Show all versions of node-repository Show documentation
Keeps track of node assignment in a multi-application setup.
The newest version!
// Copyright Vespa.ai. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root.
package com.yahoo.vespa.hosted.provision.testutils;
import com.yahoo.config.provision.CloudAccount;
import com.yahoo.config.provision.SystemName;
/**
* For running NodeRepository API with some mocked data.
* This is used by both NodeAdmin and NodeRepository tests.
*
* @author Haakon Dybdahl
*/
public class ContainerConfig {
public static String servicesXmlV2(int port, SystemName systemName, CloudAccount cloudAccount) {
return """
20
%s
%s
http://*/nodes/v2*
http://*/loadbalancers/v1*
""".formatted(systemName.value(), cloudAccount.value(), port);
}
}