public class DeploymentSpec extends Object
Modifier and Type | Class and Description |
---|---|
static class |
DeploymentSpec.ChangeBlocker
A blocking of changes in a given time window
|
static class |
DeploymentSpec.DeclaredZone
A deployment step which is to run deployment in a particular zone
|
static class |
DeploymentSpec.Delay
A deployment step which is to wait for some time before progressing to the next step
|
static class |
DeploymentSpec.ParallelZones
A deployment step which is to run deployment to multiple zones in parallel
|
static class |
DeploymentSpec.Step
A deployment step
|
static class |
DeploymentSpec.UpgradePolicy
Controls when this application will be upgraded to new Vespa versions
|
Modifier and Type | Field and Description |
---|---|
static DeploymentSpec |
empty
The empty deployment spec, specifying no zones or rotation, and defaults for all settings
|
Constructor and Description |
---|
DeploymentSpec(Optional<String> globalServiceId,
DeploymentSpec.UpgradePolicy upgradePolicy,
List<DeploymentSpec.ChangeBlocker> changeBlockers,
List<DeploymentSpec.Step> steps) |
DeploymentSpec(Optional<String> globalServiceId,
DeploymentSpec.UpgradePolicy upgradePolicy,
List<DeploymentSpec.ChangeBlocker> changeBlockers,
List<DeploymentSpec.Step> steps,
String xmlForm,
Optional<com.yahoo.config.provision.AthenzDomain> athenzDomain,
Optional<com.yahoo.config.provision.AthenzService> athenzService) |
Modifier and Type | Method and Description |
---|---|
Optional<com.yahoo.config.provision.AthenzDomain> |
athenzDomain()
Returns the athenz domain if configured
|
Optional<com.yahoo.config.provision.AthenzService> |
athenzService(com.yahoo.config.provision.Environment environment,
com.yahoo.config.provision.RegionName region)
Returns the athenz service for environment/region if configured
|
boolean |
canChangeRevisionAt(Instant instant)
Returns whether an application revision change can occur at the given instant
|
boolean |
canUpgradeAt(Instant instant)
Returns whether upgrade can occur at the given instant
|
List<DeploymentSpec.ChangeBlocker> |
changeBlocker()
Returns time windows where upgrades are disallowed
|
static DeploymentSpec |
fromXml(Reader reader)
Creates a deployment spec from XML.
|
static DeploymentSpec |
fromXml(String xmlForm)
Creates a deployment spec from XML.
|
static DeploymentSpec |
fromXml(String xmlForm,
boolean validate)
Creates a deployment spec from XML.
|
Optional<String> |
globalServiceId()
Returns the ID of the service to expose through global routing, if present
|
boolean |
includes(com.yahoo.config.provision.Environment environment,
Optional<com.yahoo.config.provision.RegionName> region)
Returns whether this deployment spec specifies the given zone, either implicitly or explicitly
|
static void |
main(String[] args)
This may be invoked by a continuous build
|
List<DeploymentSpec.Step> |
steps()
Returns the deployment steps of this in the order they will be performed
|
static String |
toMessageString(Throwable t) |
DeploymentSpec.UpgradePolicy |
upgradePolicy()
Returns the upgrade policy of this, which is defaultPolicy if none is specified
|
String |
xmlForm()
Returns the XML form of this spec, or null if it was not created by fromXml, nor is empty
|
List<DeploymentSpec.DeclaredZone> |
zones()
Returns all the DeclaredZone deployment steps in the order they are declared
|
public static final DeploymentSpec empty
public DeploymentSpec(Optional<String> globalServiceId, DeploymentSpec.UpgradePolicy upgradePolicy, List<DeploymentSpec.ChangeBlocker> changeBlockers, List<DeploymentSpec.Step> steps)
public DeploymentSpec(Optional<String> globalServiceId, DeploymentSpec.UpgradePolicy upgradePolicy, List<DeploymentSpec.ChangeBlocker> changeBlockers, List<DeploymentSpec.Step> steps, String xmlForm, Optional<com.yahoo.config.provision.AthenzDomain> athenzDomain, Optional<com.yahoo.config.provision.AthenzService> athenzService)
public Optional<String> globalServiceId()
public DeploymentSpec.UpgradePolicy upgradePolicy()
public boolean canUpgradeAt(Instant instant)
public boolean canChangeRevisionAt(Instant instant)
public List<DeploymentSpec.ChangeBlocker> changeBlocker()
public List<DeploymentSpec.Step> steps()
public List<DeploymentSpec.DeclaredZone> zones()
public String xmlForm()
public boolean includes(com.yahoo.config.provision.Environment environment, Optional<com.yahoo.config.provision.RegionName> region)
public static DeploymentSpec fromXml(Reader reader)
IllegalArgumentException
- if the XML is invalidpublic static DeploymentSpec fromXml(String xmlForm)
IllegalArgumentException
- if the XML is invalidpublic static DeploymentSpec fromXml(String xmlForm, boolean validate)
IllegalArgumentException
- if the XML is invalidpublic Optional<com.yahoo.config.provision.AthenzDomain> athenzDomain()
public Optional<com.yahoo.config.provision.AthenzService> athenzService(com.yahoo.config.provision.Environment environment, com.yahoo.config.provision.RegionName region)
public static void main(String[] args)
Copyright © 2018. All rights reserved.