Class ElasticImageConfigurationImpl
- java.lang.Object
-
- com.atlassian.core.bean.EntityObject
-
- com.atlassian.bamboo.core.BambooEntityObject
-
- com.atlassian.bamboo.agent.elastic.server.ElasticImageConfigurationImpl
-
- All Implemented Interfaces:
ElasticImageConfiguration
,BambooIdProvider
,BambooObject
,Cloneable
,Comparable<ElasticImageConfigurationImpl>
@Entity public class ElasticImageConfigurationImpl extends BambooEntityObject implements ElasticImageConfiguration, Comparable<ElasticImageConfigurationImpl>
-
-
Constructor Summary
Constructors Constructor Description ElasticImageConfigurationImpl()
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description int
compareTo(ElasticImageConfigurationImpl o)
boolean
equals(Object o)
String
getAmiId()
Get Elastic Instance Configuration's EC2 AMI id.com.atlassian.aws.ec2.awssdk.AwsSupportConstants.Architecture
getArchitecture()
Get image architecture@NotNull Collection<String>
getAvailabilityZones()
Get Availability Zone for Elastic Instance Configuration.@NotNull ImageCapabilitySet
getCapabilitySet()
String
getConfigurationDescription()
Get Elastic Instance Configuration's description.String
getConfigurationName()
Get Elastic Instance Configuration's name.String
getEbsSnapshotId()
Get Elastic Instance Configuration's EBS snapshot id.String
getImageFilesVersion()
@NotNull com.atlassian.aws.ec2.EC2InstanceType
getInstanceType()
Get Elastic Instance Configuration type.@NotNull Iterable<com.atlassian.aws.ec2.EC2InstanceType>
getInstanceTypes()
@Nullable String
getOsName()
com.atlassian.aws.ec2.awssdk.AwsSupportConstants.Platform
getPlatform()
Get image platform@NotNull String
getProduct()
com.atlassian.aws.ec2.awssdk.AwsSupportConstants.Region
getRegion()
Get Region for which the image configuration is defined.com.atlassian.aws.ec2.awssdk.AwsSupportConstants.RootDeviceType
getRootDeviceType()
@Nullable Integer
getRootFsSizeOverride()
@NotNull List<Script>
getStartupScripts()
@NotNull Collection<String>
getSubnetIds()
com.atlassian.aws.ec2.awssdk.AwsSupportConstants.Virtualisation
getVirtualisationType()
int
hashCode()
boolean
isDedicated()
boolean
isDisabled()
boolean
isEbsEnabled()
Get Elastic Instance Configuration's EBS status.boolean
isLegacyEbsHandlingEnabled()
boolean
isPerSecondBillingEnabled()
boolean
isShippedWithBamboo()
Is set for default configuration.void
setAmiId(String amiId)
Set the Elastic Instance Configuration's EC2 AMI id (image)void
setArchitecture(com.atlassian.aws.ec2.awssdk.AwsSupportConstants.Architecture architecture)
void
setAvailabilityZone(@Nullable String availabilityZone)
Set Availability Zone for Elastic Instance Configuration.void
setAvailabilityZones(Iterable<com.atlassian.aws.ec2.model.AvailabilityZoneId> availabilityZones)
void
setCapabilitySet(@NotNull ImageCapabilitySet imageCapabilitySet)
void
setConfigurationDescription(String configurationDescription)
void
setConfigurationName(String configurationName)
void
setDisabled(boolean disabled)
Set Disabled field for Elastic Instance Configurationvoid
setEbsSnapshotId(@Nullable String ebsSnapshotId)
void
setImageFilesVersion(String imageFilesLevel)
void
setInstanceType(com.atlassian.aws.ec2.EC2InstanceType instanceType)
void
setInstanceTypes(@NotNull Iterable<com.atlassian.aws.ec2.EC2InstanceType> instanceTypes)
void
setLegacyEbsHandlingEnabled(boolean value)
void
setOsName(String osName)
void
setPerSecondBillingEnabled(boolean perSecondBillingEnabled)
void
setPlatform(com.atlassian.aws.ec2.awssdk.AwsSupportConstants.Platform platform)
void
setProduct(String product)
void
setRegion(com.atlassian.aws.ec2.awssdk.AwsSupportConstants.Region region)
void
setRootDeviceType(com.atlassian.aws.ec2.awssdk.AwsSupportConstants.RootDeviceType rootDeviceType)
void
setRootFsSizeOverride(@Nullable Integer rootFsSizeOverride)
void
setShippedWithBamboo(boolean shippedWithBamboo)
void
setStartupScripts(@NotNull List<Script> startupScripts)
void
setSubnetId(@Nullable String subnetId)
Subnet id in the "subnet-xxxxx" formatvoid
setSubnetIds(@NotNull Iterable<String> subnetIds)
Subnet ids in the "subnet-xxxxx" formatvoid
setSubnetIdsField(@Nullable String subnetIdsField)
void
setVirtualisationType(com.atlassian.aws.ec2.awssdk.AwsSupportConstants.Virtualisation virtualisationType)
static @NotNull String
toString(@NotNull Iterable<com.atlassian.aws.ec2.EC2InstanceType> instanceTypes)
-
Methods inherited from class com.atlassian.core.bean.EntityObject
clone, getCreationDate, getCurrentDate, getId, getLastModificationDate, setClock, setCreationDate, setId, setLastModificationDate
-
Methods inherited from class java.lang.Object
finalize, getClass, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface com.atlassian.bamboo.core.BambooIdProvider
getId
-
Methods inherited from interface com.atlassian.bamboo.core.BambooObject
setId
-
-
-
-
Method Detail
-
getConfigurationName
public String getConfigurationName()
Description copied from interface:ElasticImageConfiguration
Get Elastic Instance Configuration's name.- Specified by:
getConfigurationName
in interfaceElasticImageConfiguration
- Returns:
- Elastic Instance Configuration's name
-
setConfigurationName
public void setConfigurationName(String configurationName)
- Specified by:
setConfigurationName
in interfaceElasticImageConfiguration
-
getAmiId
public String getAmiId()
Description copied from interface:ElasticImageConfiguration
Get Elastic Instance Configuration's EC2 AMI id.- Specified by:
getAmiId
in interfaceElasticImageConfiguration
- Returns:
- Elastic Instance Configuration's EC2 AMI id
-
setAmiId
public void setAmiId(String amiId)
Description copied from interface:ElasticImageConfiguration
Set the Elastic Instance Configuration's EC2 AMI id (image)- Specified by:
setAmiId
in interfaceElasticImageConfiguration
- Parameters:
amiId
- - Elastic Instance Configuration's EC2 AMI id
-
isEbsEnabled
public boolean isEbsEnabled()
Description copied from interface:ElasticImageConfiguration
Get Elastic Instance Configuration's EBS status.- Specified by:
isEbsEnabled
in interfaceElasticImageConfiguration
- Returns:
- Elastic Instance Configuration's EBS status
-
getEbsSnapshotId
public String getEbsSnapshotId()
Description copied from interface:ElasticImageConfiguration
Get Elastic Instance Configuration's EBS snapshot id.- Specified by:
getEbsSnapshotId
in interfaceElasticImageConfiguration
- Returns:
- Elastic Instance Configuration's EBS snapshot id
-
setEbsSnapshotId
public void setEbsSnapshotId(@Nullable @Nullable String ebsSnapshotId)
-
isLegacyEbsHandlingEnabled
public boolean isLegacyEbsHandlingEnabled()
- Specified by:
isLegacyEbsHandlingEnabled
in interfaceElasticImageConfiguration
-
setLegacyEbsHandlingEnabled
public void setLegacyEbsHandlingEnabled(boolean value)
-
getInstanceType
@NotNull public @NotNull com.atlassian.aws.ec2.EC2InstanceType getInstanceType()
Description copied from interface:ElasticImageConfiguration
Get Elastic Instance Configuration type.- Specified by:
getInstanceType
in interfaceElasticImageConfiguration
- Returns:
- Elastic Instance Configuration type
-
getInstanceTypes
@NotNull public @NotNull Iterable<com.atlassian.aws.ec2.EC2InstanceType> getInstanceTypes()
- Specified by:
getInstanceTypes
in interfaceElasticImageConfiguration
-
setInstanceType
public void setInstanceType(com.atlassian.aws.ec2.EC2InstanceType instanceType)
- Specified by:
setInstanceType
in interfaceElasticImageConfiguration
-
setInstanceTypes
public void setInstanceTypes(@NotNull @NotNull Iterable<com.atlassian.aws.ec2.EC2InstanceType> instanceTypes)
- Specified by:
setInstanceTypes
in interfaceElasticImageConfiguration
-
toString
@NotNull public static @NotNull String toString(@NotNull @NotNull Iterable<com.atlassian.aws.ec2.EC2InstanceType> instanceTypes)
-
setAvailabilityZone
public void setAvailabilityZone(@Nullable @Nullable String availabilityZone)
Description copied from interface:ElasticImageConfiguration
Set Availability Zone for Elastic Instance Configuration.- Specified by:
setAvailabilityZone
in interfaceElasticImageConfiguration
- Parameters:
availabilityZone
- Name of Availability Zone to be setup. null if the default zone should be used
-
getAvailabilityZones
@NotNull public @NotNull Collection<String> getAvailabilityZones()
Description copied from interface:ElasticImageConfiguration
Get Availability Zone for Elastic Instance Configuration.- Specified by:
getAvailabilityZones
in interfaceElasticImageConfiguration
- Returns:
- Name of Availability Zone
-
setAvailabilityZones
public void setAvailabilityZones(Iterable<com.atlassian.aws.ec2.model.AvailabilityZoneId> availabilityZones)
- Specified by:
setAvailabilityZones
in interfaceElasticImageConfiguration
-
getConfigurationDescription
public String getConfigurationDescription()
Description copied from interface:ElasticImageConfiguration
Get Elastic Instance Configuration's description.- Specified by:
getConfigurationDescription
in interfaceElasticImageConfiguration
- Returns:
- Elastic Instance Configuration's description
-
setConfigurationDescription
public void setConfigurationDescription(String configurationDescription)
- Specified by:
setConfigurationDescription
in interfaceElasticImageConfiguration
-
isShippedWithBamboo
public boolean isShippedWithBamboo()
Description copied from interface:ElasticImageConfiguration
Is set for default configuration. Currently it is configuration shipped with Bamboo- Specified by:
isShippedWithBamboo
in interfaceElasticImageConfiguration
- Returns:
- True if configuration is marked as "shipped with Bamboo"
-
setShippedWithBamboo
public void setShippedWithBamboo(boolean shippedWithBamboo)
- Specified by:
setShippedWithBamboo
in interfaceElasticImageConfiguration
-
isDisabled
public boolean isDisabled()
- Specified by:
isDisabled
in interfaceElasticImageConfiguration
- Returns:
- returns whether the Elastic Configuration is disabled
-
setDisabled
public void setDisabled(boolean disabled)
Description copied from interface:ElasticImageConfiguration
Set Disabled field for Elastic Instance Configuration- Specified by:
setDisabled
in interfaceElasticImageConfiguration
-
getCapabilitySet
@NotNull public @NotNull ImageCapabilitySet getCapabilitySet()
- Specified by:
getCapabilitySet
in interfaceElasticImageConfiguration
- Returns:
- Capability Set associated with this Elastic Instance Configuration
-
setCapabilitySet
public void setCapabilitySet(@NotNull @NotNull ImageCapabilitySet imageCapabilitySet)
-
getProduct
@NotNull public @NotNull String getProduct()
- Specified by:
getProduct
in interfaceElasticImageConfiguration
- Returns:
- the EC2 product used to launch this image (e.g. "Linux/UNIX", "Windows", "SUSE Linux"
-
setProduct
public void setProduct(String product)
- Specified by:
setProduct
in interfaceElasticImageConfiguration
-
getRegion
public com.atlassian.aws.ec2.awssdk.AwsSupportConstants.Region getRegion()
Description copied from interface:ElasticImageConfiguration
Get Region for which the image configuration is defined.- Specified by:
getRegion
in interfaceElasticImageConfiguration
- Returns:
-
setSubnetId
public void setSubnetId(@Nullable @Nullable String subnetId)
Description copied from interface:ElasticImageConfiguration
Subnet id in the "subnet-xxxxx" format- Specified by:
setSubnetId
in interfaceElasticImageConfiguration
-
setSubnetIdsField
public void setSubnetIdsField(@Nullable @Nullable String subnetIdsField)
-
getSubnetIds
@NotNull public @NotNull Collection<String> getSubnetIds()
- Specified by:
getSubnetIds
in interfaceElasticImageConfiguration
-
setSubnetIds
public void setSubnetIds(@NotNull @NotNull Iterable<String> subnetIds)
Description copied from interface:ElasticImageConfiguration
Subnet ids in the "subnet-xxxxx" format- Specified by:
setSubnetIds
in interfaceElasticImageConfiguration
-
setRegion
public void setRegion(com.atlassian.aws.ec2.awssdk.AwsSupportConstants.Region region)
- Specified by:
setRegion
in interfaceElasticImageConfiguration
-
getArchitecture
public com.atlassian.aws.ec2.awssdk.AwsSupportConstants.Architecture getArchitecture()
Description copied from interface:ElasticImageConfiguration
Get image architecture- Specified by:
getArchitecture
in interfaceElasticImageConfiguration
- Returns:
-
setArchitecture
public void setArchitecture(com.atlassian.aws.ec2.awssdk.AwsSupportConstants.Architecture architecture)
- Specified by:
setArchitecture
in interfaceElasticImageConfiguration
-
getPlatform
public com.atlassian.aws.ec2.awssdk.AwsSupportConstants.Platform getPlatform()
Description copied from interface:ElasticImageConfiguration
Get image platform- Specified by:
getPlatform
in interfaceElasticImageConfiguration
- Returns:
-
setPlatform
public void setPlatform(com.atlassian.aws.ec2.awssdk.AwsSupportConstants.Platform platform)
- Specified by:
setPlatform
in interfaceElasticImageConfiguration
-
getRootDeviceType
public com.atlassian.aws.ec2.awssdk.AwsSupportConstants.RootDeviceType getRootDeviceType()
- Specified by:
getRootDeviceType
in interfaceElasticImageConfiguration
- Returns:
- root device type for image
-
setRootDeviceType
public void setRootDeviceType(com.atlassian.aws.ec2.awssdk.AwsSupportConstants.RootDeviceType rootDeviceType)
- Specified by:
setRootDeviceType
in interfaceElasticImageConfiguration
-
getStartupScripts
@NotNull public @NotNull List<Script> getStartupScripts()
- Specified by:
getStartupScripts
in interfaceElasticImageConfiguration
-
setStartupScripts
public void setStartupScripts(@NotNull @NotNull List<Script> startupScripts)
- Specified by:
setStartupScripts
in interfaceElasticImageConfiguration
-
getImageFilesVersion
public String getImageFilesVersion()
- Specified by:
getImageFilesVersion
in interfaceElasticImageConfiguration
-
setImageFilesVersion
public void setImageFilesVersion(String imageFilesLevel)
- Specified by:
setImageFilesVersion
in interfaceElasticImageConfiguration
-
getOsName
@Nullable public @Nullable String getOsName()
- Specified by:
getOsName
in interfaceElasticImageConfiguration
-
setOsName
public void setOsName(String osName)
- Specified by:
setOsName
in interfaceElasticImageConfiguration
-
getVirtualisationType
@Nullable public com.atlassian.aws.ec2.awssdk.AwsSupportConstants.Virtualisation getVirtualisationType()
- Specified by:
getVirtualisationType
in interfaceElasticImageConfiguration
-
isPerSecondBillingEnabled
public boolean isPerSecondBillingEnabled()
- Specified by:
isPerSecondBillingEnabled
in interfaceElasticImageConfiguration
-
setPerSecondBillingEnabled
public void setPerSecondBillingEnabled(boolean perSecondBillingEnabled)
- Specified by:
setPerSecondBillingEnabled
in interfaceElasticImageConfiguration
-
getRootFsSizeOverride
@Nullable public @Nullable Integer getRootFsSizeOverride()
- Specified by:
getRootFsSizeOverride
in interfaceElasticImageConfiguration
- Returns:
- the overriden value of root fs size (in GB)
-
setRootFsSizeOverride
public void setRootFsSizeOverride(@Nullable @Nullable Integer rootFsSizeOverride)
- Specified by:
setRootFsSizeOverride
in interfaceElasticImageConfiguration
-
setVirtualisationType
public void setVirtualisationType(com.atlassian.aws.ec2.awssdk.AwsSupportConstants.Virtualisation virtualisationType)
- Specified by:
setVirtualisationType
in interfaceElasticImageConfiguration
-
isDedicated
public boolean isDedicated()
- Specified by:
isDedicated
in interfaceElasticImageConfiguration
- Returns:
- true iff this configuration is assigned to specific jobs
-
hashCode
public int hashCode()
- Overrides:
hashCode
in classcom.atlassian.core.bean.EntityObject
-
equals
public boolean equals(Object o)
- Overrides:
equals
in classcom.atlassian.core.bean.EntityObject
-
compareTo
public int compareTo(ElasticImageConfigurationImpl o)
- Specified by:
compareTo
in interfaceComparable<ElasticImageConfigurationImpl>
-
-