Class GceInstanceGroupComputeSource
java.lang.Object
co.yellowdog.platform.model.GceInstanceGroupComputeSource
- All Implemented Interfaces:
ComputeSource,Credentialed,GceComputeSource,Identified,Named,Serializable
@JsonClassDescription("Details needed for provisioning instances within a GCE instance group")
public class GceInstanceGroupComputeSource
extends Object
implements GceComputeSource
Defines a source of compute composed of Google Compute Engine (GCE) instances organised into an Instance Group.
- See Also:
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic classA builder that can be used to build a new GceInstanceGroupComputeSource that is automatically validated on build. -
Field Summary
Fields inherited from interface co.yellowdog.platform.model.ComputeSource
DEFAULT_ASSIGN_PUBLIC_IP -
Constructor Summary
ConstructorsConstructorDescriptionGceInstanceGroupComputeSource(String name, String credential, int limit, Boolean assignPublicIp, String userData, Map<String, String> instanceTags, String sshKeys, String project, String region, String zone, String machineType, String image, String network, String subnetwork, boolean preemptible, boolean spot, boolean confidential, String acceleratorType, int acceleratorCount) -
Method Summary
Modifier and TypeMethodDescriptionbuilder()protected booleanbooleanintGets the ID of the source template if this source was created from a template.Return the names of the credentials to be used for this Credentialed entity.If this source is associated with an exhausted allowance, gets the exhaustion state.getId()Returns the IDgetImage()A summary of instance counts according to instance statusGets the custom instance tags to be set on the provisioned instance at startup.intgetLimit()Returns the limit in number of instances that can be provisioned from this source.getName()Returns the name of this compute source (which must be unique within the containing ComputeRequirement).Gets the provider-specific region where instances will be provisioned.A list of public SSH keys.Gets the current provisioning status of this source.Gets the message associated with the current provisioning status of this source.Indicates if supporting resources have been created for this source.Returns an object describing behavioural traits specific to this compute source.Gets the user-data script to be passed to the provisioned instance at startup.getZone()inthashCode()booleanIndicates if provisioned instances should be assigned public IP addresses.booleanbooleanbooleanisSpot()voidsetAcceleratorCount(int acceleratorCount) voidsetAcceleratorType(String acceleratorType) voidsetAssignPublicIp(boolean assignPublicIp) Indicates if provisioned instances should be assigned public IP addresses.voidsetConfidential(boolean confidential) voidsetCreatedFromId(String createdFromId) Sets the source template IDvoidsetCredential(String credential) voidsetExhaustion(ComputeSourceExhaustion exhaustion) voidsetHostMaintenanceBehaviour(GceHostMaintenanceBehaviour hostMaintenanceBehaviour) voidSets the IDvoidvoidsetInstanceSummary(InstanceSummary instanceSummary) voidsetInstanceTags(Map<@GceInstanceTagKey String, @GceInstanceTagValue String> instanceTags) Sets the custom instance tags to be set on the provisioned instance at startup.voidsetLimit(int limit) Sets the limit in number of instances that can be provisioned from this source.voidsetMachineType(String machineType) voidSets the name of this compute source (which must be unique within the containing ComputeRequirement).voidsetNetwork(String network) voidsetPreemptible(boolean preemptible) voidsetProject(String project) voidvoidsetSpot(boolean spot) voidsetSshKeys(String sshKeys) A list of public SSH keys.voidsetStatus(ComputeSourceStatus status) Sets the current provisioning status of this source.voidsetStatusMessage(String statusMessage) Sets the message associated with the current provisioning status of this source.voidsetSubnetwork(String subnetwork) voidsetSupportingResourceCreated(Boolean supportingResourceCreated) voidsetUserData(String userData) Sets the user-data script to be passed to the provisioned instance at startup.voidtoString()Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, waitMethods inherited from interface co.yellowdog.platform.model.GceComputeSource
getImageId, getInstancePricing, getInstanceType, getProvider, getSubregion, setImageId, setInstanceType
-
Constructor Details
-
GceInstanceGroupComputeSource
public GceInstanceGroupComputeSource(String name, String credential, int limit, Boolean assignPublicIp, String userData, Map<String, String> instanceTags, String sshKeys, String project, String region, String zone, String machineType, String image, String network, String subnetwork, boolean preemptible, boolean spot, boolean confidential, String acceleratorType, int acceleratorCount)
-
-
Method Details
-
getTraits
Description copied from interface:ComputeSourceReturns an object describing behavioural traits specific to this compute source.- Specified by:
getTraitsin interfaceComputeSource- Returns:
- an object describing behavioural traits specific to this compute source
-
getCredentials
Description copied from interface:CredentialedReturn the names of the credentials to be used for this Credentialed entity.- Specified by:
getCredentialsin interfaceCredentialed- Returns:
- the names of the credentials to be used
-
builder
-
toBuilder
-
getId
Description copied from interface:IdentifiedReturns the ID- Specified by:
getIdin interfaceComputeSource- Specified by:
getIdin interfaceIdentified- Returns:
- the ID
-
getCreatedFromId
Description copied from interface:ComputeSourceGets the ID of the source template if this source was created from a template.- Specified by:
getCreatedFromIdin interfaceComputeSource- Returns:
- the ID of the source template if this source was created from a template
-
getName
Description copied from interface:ComputeSourceReturns the name of this compute source (which must be unique within the containing ComputeRequirement).- Specified by:
getNamein interfaceComputeSource- Specified by:
getNamein interfaceNamed- Returns:
- the name of this compute source
-
getCredential
- Specified by:
getCredentialin interfaceComputeSource- Specified by:
getCredentialin interfaceGceComputeSource
-
getLimit
public int getLimit()Description copied from interface:ComputeSourceReturns the limit in number of instances that can be provisioned from this source.- Specified by:
getLimitin interfaceComputeSource- Returns:
- the limit in number of instances that can be provisioned from this source
-
isAssignPublicIp
public boolean isAssignPublicIp()Indicates if provisioned instances should be assigned public IP addresses.- Specified by:
isAssignPublicIpin interfaceGceComputeSource- Returns:
- true, if provisioned instances should be assigned public IP addresses; otherwise, false
-
getUserData
Description copied from interface:ComputeSourceGets the user-data script to be passed to the provisioned instance at startup.- Specified by:
getUserDatain interfaceComputeSource- Returns:
- the user-data script
-
getInstanceTags
Description copied from interface:ComputeSourceGets the custom instance tags to be set on the provisioned instance at startup.- Specified by:
getInstanceTagsin interfaceComputeSource- Specified by:
getInstanceTagsin interfaceGceComputeSource- Returns:
- the custom instance tags
-
getSshKeys
A list of public SSH keys. If provided, instances will be accessible with the matching private keys through SSH.- Specified by:
getSshKeysin interfaceGceComputeSource- Returns:
- the public SSH keys
-
getProject
- Specified by:
getProjectin interfaceGceComputeSource
-
getRegion
Description copied from interface:ComputeSourceGets the provider-specific region where instances will be provisioned.- Specified by:
getRegionin interfaceComputeSource- Specified by:
getRegionin interfaceGceComputeSource- Returns:
- the provider-specific region where instances will be provisioned
-
getZone
- Specified by:
getZonein interfaceGceComputeSource
-
getMachineType
- Specified by:
getMachineTypein interfaceGceComputeSource
-
getImage
- Specified by:
getImagein interfaceGceComputeSource
-
getNetwork
- Specified by:
getNetworkin interfaceGceComputeSource
-
getSubnetwork
- Specified by:
getSubnetworkin interfaceGceComputeSource
-
isPreemptible
public boolean isPreemptible()- Specified by:
isPreemptiblein interfaceGceComputeSource
-
isSpot
public boolean isSpot()- Specified by:
isSpotin interfaceGceComputeSource
-
isConfidential
public boolean isConfidential()- Specified by:
isConfidentialin interfaceGceComputeSource
-
getAcceleratorType
- Specified by:
getAcceleratorTypein interfaceGceComputeSource
-
getAcceleratorCount
public int getAcceleratorCount()- Specified by:
getAcceleratorCountin interfaceGceComputeSource
-
getHostMaintenanceBehaviour
- Specified by:
getHostMaintenanceBehaviourin interfaceGceComputeSource
-
getInstanceSummary
Description copied from interface:ComputeSourceA summary of instance counts according to instance status- Specified by:
getInstanceSummaryin interfaceComputeSource- Returns:
- a summary of instance counts according to instance status
-
getStatus
Description copied from interface:ComputeSourceGets the current provisioning status of this source.- Specified by:
getStatusin interfaceComputeSource- Returns:
- the current provisioning status of this source
-
getStatusMessage
Description copied from interface:ComputeSourceGets the message associated with the current provisioning status of this source. Returns null if no further detail is relevant to the status.- Specified by:
getStatusMessagein interfaceComputeSource- Returns:
- the message associated with the current provisioning status of this source
-
getExhaustion
Description copied from interface:ComputeSourceIf this source is associated with an exhausted allowance, gets the exhaustion state.- Specified by:
getExhaustionin interfaceComputeSource- Returns:
- the exhaustion state, if the source is associated with an exhausted allowance; otherwise, null
-
getSupportingResourceCreated
Description copied from interface:ComputeSourceIndicates if supporting resources have been created for this source.- Specified by:
getSupportingResourceCreatedin interfaceComputeSource- Specified by:
getSupportingResourceCreatedin interfaceGceComputeSource- Returns:
- true, if supporting resources have been created for this source; false, if no supporting resources have been created; null, if unknown
-
setId
Description copied from interface:ComputeSourceSets the ID- Specified by:
setIdin interfaceComputeSource- Parameters:
id- This should only be set by the YellowDog Platform
-
setCreatedFromId
Description copied from interface:ComputeSourceSets the source template ID- Specified by:
setCreatedFromIdin interfaceComputeSource- Parameters:
createdFromId- This should only be set by the YellowDog Platform
-
setName
Description copied from interface:ComputeSourceSets the name of this compute source (which must be unique within the containing ComputeRequirement).- Specified by:
setNamein interfaceComputeSource- Parameters:
name- the name of this compute source
-
setCredential
-
setLimit
public void setLimit(int limit) Description copied from interface:ComputeSourceSets the limit in number of instances that can be provisioned from this source.- Specified by:
setLimitin interfaceComputeSource- Parameters:
limit- the limit in number of instances that can be provisioned from this source
-
setAssignPublicIp
public void setAssignPublicIp(boolean assignPublicIp) Indicates if provisioned instances should be assigned public IP addresses.- Parameters:
assignPublicIp- true, if provisioned instances should be assigned public IP addresses; otherwise, false
-
setUserData
Description copied from interface:ComputeSourceSets the user-data script to be passed to the provisioned instance at startup.- Specified by:
setUserDatain interfaceComputeSource- Parameters:
userData- the user-data script
-
setInstanceTags
public void setInstanceTags(Map<@GceInstanceTagKey String, @GceInstanceTagValue String> instanceTags) Description copied from interface:ComputeSourceSets the custom instance tags to be set on the provisioned instance at startup.- Specified by:
setInstanceTagsin interfaceComputeSource- Parameters:
instanceTags- the custom instance tags
-
setSshKeys
A list of public SSH keys. If provided, instances will be accessible with the matching private keys through SSH.- Parameters:
sshKeys- the public SSH keys
-
setProject
-
setRegion
-
setZone
-
setMachineType
- Specified by:
setMachineTypein interfaceGceComputeSource
-
setImage
- Specified by:
setImagein interfaceGceComputeSource
-
setNetwork
-
setSubnetwork
-
setPreemptible
public void setPreemptible(boolean preemptible) -
setSpot
public void setSpot(boolean spot) -
setConfidential
public void setConfidential(boolean confidential) -
setAcceleratorType
-
setAcceleratorCount
public void setAcceleratorCount(int acceleratorCount) -
setHostMaintenanceBehaviour
-
setInstanceSummary
- Specified by:
setInstanceSummaryin interfaceComputeSource
-
setStatus
Description copied from interface:ComputeSourceSets the current provisioning status of this source.- Specified by:
setStatusin interfaceComputeSource- Parameters:
status- This should only be set by the YellowDog Platform
-
setStatusMessage
Description copied from interface:ComputeSourceSets the message associated with the current provisioning status of this source.- Specified by:
setStatusMessagein interfaceComputeSource- Parameters:
statusMessage- This should only be set by the YellowDog Platform
-
setExhaustion
- Specified by:
setExhaustionin interfaceComputeSource
-
setSupportingResourceCreated
- Specified by:
setSupportingResourceCreatedin interfaceGceComputeSource
-
equals
-
canEqual
-
hashCode
-
toString
-