Interface ComputeSource

All Superinterfaces:
Credentialed, Identified, Named, Serializable
All Known Subinterfaces:
AwsComputeSource, AzureComputeSource, GceComputeSource, OciComputeSource
All Known Implementing Classes:
AwsFleetComputeSource, AwsInstancesComputeSource, AzureInstancesComputeSource, AzureScaleSetComputeSource, GceInstanceGroupComputeSource, GceInstancesComputeSource, OciInstancePoolComputeSource, OciInstancesComputeSource, SimulatorComputeSource

public interface ComputeSource extends Identified, Named, Serializable, Credentialed
The interface implemented by all compute source model objects.
A compute source describes a specific source for acquiring instances in order to meet the compute requirement.
  • Field Details

    • DEFAULT_ASSIGN_PUBLIC_IP

      static final boolean DEFAULT_ASSIGN_PUBLIC_IP
      See Also:
  • Method Details

    • getTraits

      ComputeSourceTraits getTraits()
      Returns an object describing behavioural traits specific to this compute source.
      Returns:
      an object describing behavioural traits specific to this compute source
    • getProvider

      CloudProvider getProvider()
      Gets the Cloud Provider for this source.
      Returns:
      the Cloud Provider for this source
    • getInstancePricing

      InstancePricing getInstancePricing()
      Gets the instance pricing for this source, e.g. Spot
      Returns:
      the instance pricing for this source
    • getId

      Description copied from interface: Identified
      Returns the ID
      Specified by:
      getId in interface Identified
      Returns:
      the ID
    • setId

      void setId(String id)
      Sets the ID
      Parameters:
      id - This should only be set by the YellowDog Platform
    • getCreatedFromId

      Gets the ID of the source template if this source was created from a template.
      Returns:
      the ID of the source template if this source was created from a template
    • setCreatedFromId

      void setCreatedFromId(String templateId)
      Sets the source template ID
      Parameters:
      templateId - This should only be set by the YellowDog Platform
    • getName

      @Name @NotBlank @Pattern(regexp="[a-z](?:[a-z\\d_-]{0,58}[a-z\\d])?") @Size(max=60) @JsonPropertyDescription("The compute source name") @Name @NotBlank @Pattern(regexp="[a-z](?:[a-z\\d_-]{0,58}[a-z\\d])?") @Size(max=60) String getName()
      Returns the name of this compute source (which must be unique within the containing ComputeRequirement).
      Specified by:
      getName in interface Named
      Returns:
      the name of this compute source
    • setName

      void setName(String name)
      Sets the name of this compute source (which must be unique within the containing ComputeRequirement).
      Parameters:
      name - the name of this compute source
    • getCredential

      @CredentialName @JsonPropertyDescription("The fully qualified name of the keyring credential '{keyring name}/{credential name}' to use") @CredentialName String getCredential()
    • getRegion

      @NotBlank @JsonPropertyDescription("The provider-specific region where instances will be provisioned") @NotBlank String getRegion()
      Gets the provider-specific region where instances will be provisioned.
      Returns:
      the provider-specific region where instances will be provisioned
    • getSubregion

      @JsonPropertyDescription("The provider-specific subregion where instances will be provisioned") String getSubregion()
      Gets the provider-specific subregion (aka Availability Domain, Availability Zone or Zone) where instances will be provisioned.
      Returns:
      the provider-specific subregion where instances will be provisioned
    • getInstanceType

      @NotBlank @JsonPropertyDescription("The provider-specific instance type of the instances that will be provisioned") @NotBlank String getInstanceType()
      Gets the provider-specific instance type of the instances that will be provisioned.
      Returns:
      the provider-specific instance type of the instances that will be provisioned
    • setInstanceType

      void setInstanceType(String instanceType)
      Sets the provider-specific instance type of the instances that will be provisioned.
      Parameters:
      instanceType - the provider-specific instance type of the instances that will be provisioned
    • getImageId

      @NotBlank @JsonPropertyDescription("The image ID to use for the instances that will be provisioned") @NotBlank String getImageId()
      Gets the image ID to use for the instances that will be provisioned.
      Returns:
      the image ID to use for the instances that will be provisioned
    • setImageId

      void setImageId(String imageId)
      Sets the image ID to use for the instances that will be provisioned.
      Parameters:
      imageId - the image ID to use for the instances that will be provisioned
    • getUserData

      @JsonPropertyDescription("The user-data script to be passed to the provisioned instance at startup") String getUserData()
      Gets the user-data script to be passed to the provisioned instance at startup.
      Returns:
      the user-data script
    • setUserData

      void setUserData(String userData)
      Sets the user-data script to be passed to the provisioned instance at startup.
      Parameters:
      userData - the user-data script
    • getInstanceTags

      @JsonPropertyDescription("Custom instance tags to be set on the provisioned instance at startup") @Size(max=95) @Size(max=95) Map<String,String> getInstanceTags()
      Gets the custom instance tags to be set on the provisioned instance at startup.
      Returns:
      the custom instance tags
    • setInstanceTags

      void setInstanceTags(Map<String,String> instanceTags)
      Sets the custom instance tags to be set on the provisioned instance at startup.
      Parameters:
      instanceTags - the custom instance tags
    • getLimit

      @Min(0L) @JsonPropertyDescription("The limit in number of instances that can be provisioned per requirement from this source") @Min(0L) int getLimit()
      Returns the limit in number of instances that can be provisioned from this source.
      Returns:
      the limit in number of instances that can be provisioned from this source
    • setLimit

      void setLimit(int limit)
      Sets the limit in number of instances that can be provisioned from this source.
      Parameters:
      limit - the limit in number of instances that can be provisioned from this source
    • getBootVolumeSizeGb

      @Min(1L) @JsonPropertyDescription("Specifies the size of the boot volume (in GB) for provisioned instances. If not specified, the default size for the selected image will be used. Cloud providers impose their own minimums, and the value must be at least as large as the boot volume of the selected image.") @Min(1L) Integer getBootVolumeSizeGb()
      Gets the size of the boot volume in GB
      Returns:
      the size of the boot volume in GB, or null to use the image default
    • setBootVolumeSizeGb

      void setBootVolumeSizeGb(Integer bootVolumeSizeGb)
      Sets the size of the boot volume (in GB) for the instances that will be provisioned.
      Parameters:
      bootVolumeSizeGb - the size of the boot volume in GB, or null to use the image default
    • getInstanceSummary

      A summary of instance counts according to instance status
      Returns:
      a summary of instance counts according to instance status
    • setInstanceSummary

      void setInstanceSummary(InstanceSummary instanceSummary)
    • getStatus

      Gets the current provisioning status of this source.
      Returns:
      the current provisioning status of this source
    • setStatus

      void setStatus(ComputeSourceStatus status)
      Sets the current provisioning status of this source.
      Parameters:
      status - This should only be set by the YellowDog Platform
    • getStatusMessage

      Gets the message associated with the current provisioning status of this source. Returns null if no further detail is relevant to the status.
      Returns:
      the message associated with the current provisioning status of this source
    • setStatusMessage

      void setStatusMessage(String statusMessage)
      Sets the message associated with the current provisioning status of this source.
      Parameters:
      statusMessage - This should only be set by the YellowDog Platform
    • getExhaustion

      If this source is associated with an exhausted allowance, gets the exhaustion state.
      Returns:
      the exhaustion state, if the source is associated with an exhausted allowance; otherwise, null
    • setExhaustion

      void setExhaustion(ComputeSourceExhaustion exhaustion)
    • getSupportingResourceCreated

      Boolean getSupportingResourceCreated()
      Indicates if supporting resources have been created for this source.
      Returns:
      true, if supporting resources have been created for this source; false, if no supporting resources have been created; null, if unknown