Search in sources :

Example 1 with SystemName

use of com.yahoo.config.provision.SystemName in project vespa by vespa-engine.

the class ConfigserverCluster method setContainerCluster.

public void setContainerCluster(ContainerCluster containerCluster) {
    this.containerCluster = containerCluster;
    // If we are in a config server cluster the correct zone is propagated through cloud config options,
    // not through config to deployment options (see StandaloneContainerApplication.scala),
    // so we need to propagate the zone options into the container from here
    Environment environment = options.environment().isPresent() ? Environment.from(options.environment().get()) : Environment.defaultEnvironment();
    RegionName region = options.region().isPresent() ? RegionName.from(options.region().get()) : RegionName.defaultName();
    SystemName system = options.system().isPresent() ? SystemName.from(options.system().get()) : SystemName.defaultSystem();
    containerCluster.setZone(new Zone(system, environment, region));
}
Also used : RegionName(com.yahoo.config.provision.RegionName) Zone(com.yahoo.config.provision.Zone) Environment(com.yahoo.config.provision.Environment) SystemName(com.yahoo.config.provision.SystemName)

Aggregations

Environment (com.yahoo.config.provision.Environment)1 RegionName (com.yahoo.config.provision.RegionName)1 SystemName (com.yahoo.config.provision.SystemName)1 Zone (com.yahoo.config.provision.Zone)1