Package com.yahoo.config.application.api
Class DeploymentSpec
java.lang.Object
com.yahoo.config.application.api.DeploymentSpec
Specifies the environments and regions to which an application should be deployed.
This may be used both for inspection as part of an application model and to answer
queries about deployment from the command line. A main method is included for the latter usage.
A deployment consists of a number of steps executed in the order listed in deployment xml, as
well as some additional settings.
This is immutable.
- Author:
- bratseth
-
Nested Class Summary
Modifier and TypeClassDescriptionstatic class
A blocking of changes in a given time windowstatic class
A declared production teststatic class
A deployment step which is to run deployment in a particular zonestatic class
A deployment step which is to wait for some time before progressing to the next stepstatic class
Represents a deprecated XML element inDeploymentSpec
, or the deprecated attribute(s) of an element.static class
A container for multiple other steps, which are executed in parallelstatic enum
Determines when application changes deploy.static enum
Determines what application changes to deploy to the instance.static class
A deployment stepstatic class
A container for several steps, by default in serial orderstatic enum
Controls when this application will be upgraded to new Vespa versionsstatic enum
Determines when application changes deploy, when there is already an ongoing platform upgrade. -
Field Summary
Modifier and TypeFieldDescriptionstatic final DeploymentSpec
The empty deployment spec, specifying no zones or rotation, and defaults for all settings -
Constructor Summary
ConstructorDescriptionDeploymentSpec
(List<DeploymentSpec.Step> steps, Optional<Integer> majorVersion, Optional<com.yahoo.config.provision.AthenzDomain> athenzDomain, Optional<com.yahoo.config.provision.AthenzService> athenzService, List<Endpoint> endpoints, String xmlForm, List<DeploymentSpec.DeprecatedElement> deprecatedElements) -
Method Summary
Modifier and TypeMethodDescriptionOptional<com.yahoo.config.provision.AthenzDomain>
Returns the Athenz domain set on the root tag, if anyOptional<com.yahoo.config.provision.AthenzService>
Returns the Athenz service set on the root tag, if anyint
Computes a hash of all fields that influence what is deployed with this spec, i.e., not orchestration.Returns the deprecated elements used when creating thisReturns the application-level endpoints of this, if anyboolean
static DeploymentSpec
Creates a deployment spec from XML.static DeploymentSpec
Creates a deployment spec from XML.static DeploymentSpec
Creates a deployment spec from XML.int
hashCode()
instance
(com.yahoo.config.provision.InstanceName name) Returns the instance step containing the given instance nameList<com.yahoo.config.provision.InstanceName>
Returns the instance names declared in thisReturns the step descendants of this which are instancesReturns the major version this application is pinned to, or empty (default) to allow all major versionsrequireInstance
(com.yahoo.config.provision.InstanceName name) requireInstance
(String name) steps()
Returns the deployment steps of this in the order they will be performedstatic String
xmlForm()
Returns the XML form of this spec, or null if it was not created by fromXml, nor is empty
-
Field Details
-
empty
The empty deployment spec, specifying no zones or rotation, and defaults for all settings
-
-
Constructor Details
-
DeploymentSpec
public DeploymentSpec(List<DeploymentSpec.Step> steps, Optional<Integer> majorVersion, Optional<com.yahoo.config.provision.AthenzDomain> athenzDomain, Optional<com.yahoo.config.provision.AthenzService> athenzService, List<Endpoint> endpoints, String xmlForm, List<DeploymentSpec.DeprecatedElement> deprecatedElements)
-
-
Method Details
-
majorVersion
Returns the major version this application is pinned to, or empty (default) to allow all major versions -
steps
Returns the deployment steps of this in the order they will be performed -
athenzDomain
Returns the Athenz domain set on the root tag, if any -
athenzService
Returns the Athenz service set on the root tag, if any -
xmlForm
Returns the XML form of this spec, or null if it was not created by fromXml, nor is empty -
instance
Returns the instance step containing the given instance name -
requireInstance
-
requireInstance
-
instanceNames
Returns the instance names declared in this -
instances
Returns the step descendants of this which are instances -
endpoints
Returns the application-level endpoints of this, if any -
deprecatedElements
Returns the deprecated elements used when creating this -
fromXml
Creates a deployment spec from XML.- Throws:
IllegalArgumentException
- if the XML is invalid
-
fromXml
Creates a deployment spec from XML.- Throws:
IllegalArgumentException
- if the XML is invalid
-
fromXml
Creates a deployment spec from XML.- Throws:
IllegalArgumentException
- if the XML is invalid
-
toMessageString
-
equals
-
hashCode
public int hashCode() -
deployableHashCode
public int deployableHashCode()Computes a hash of all fields that influence what is deployed with this spec, i.e., not orchestration.
-