Class InstanceConfiguration
java.lang.Object
com.google.jenkins.plugins.computeengine.InstanceConfiguration
- All Implemented Interfaces:
Describable<InstanceConfiguration>
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic classstatic final class -
Field Summary
Fields -
Constructor Summary
ConstructorsConstructorDescriptionInstanceConfiguration(String description, String namePrefix, String region, String zone, String machineType, String numExecutorsStr, String startupScript, ProvisioningType provisioningType, String minCpuPlatform, String labels, String runAsUser, String bootDiskType, boolean bootDiskAutoDelete, String bootDiskSourceImageName, String bootDiskSourceImageProject, NetworkConfiguration networkConfiguration, NetworkInterfaceIpStackMode networkInterfaceIpStackMode, Boolean externalAddress, boolean useInternalAddress, boolean ignoreProxy, String networkTags, String serviceAccountEmail, Node.Mode mode, AcceleratorConfiguration acceleratorConfiguration, String retentionTimeMinutesStr, String launchTimeoutSecondsStr, String bootDiskSizeGbStr, boolean oneShot, String template, WindowsConfiguration windowsConfiguration, SshConfiguration sshConfiguration, boolean createSnapshot, String remoteFs, String javaExecPath, GoogleKeyCredential sshKeyCredential, Map<String, String> googleLabels, Integer numExecutors, Integer retentionTimeMinutes, Integer launchTimeoutSeconds, Long bootDiskSizeGb, Set<LabelAtom> labelSet, ComputeEngineCloud cloud, boolean preemptible) -
Method Summary
Modifier and TypeMethodDescriptionvoidappendLabel(String key, String value) voidappendLabels(Map<String, String> labels) builder()protected ComputeEngineCloudgetCloud()Deprecated.intgetMode()getZone()com.google.api.services.compute.model.Instanceinstance()static IntegerintOrDefault(String toParse, Integer defaultTo) booleanbooleanbooleanbooleanbooleanDeprecated.booleanstatic LonglongOrDefault(String toParse, Long defaultTo) protected ObjectInitializes transient propertiesvoidsetAcceleratorConfiguration(AcceleratorConfiguration acceleratorConfiguration) voidsetBootDiskAutoDelete(boolean bootDiskAutoDelete) voidsetBootDiskSizeGb(Long bootDiskSizeGb) voidsetBootDiskSizeGbStr(String bootDiskSizeGbStr) voidsetBootDiskSourceImageName(String bootDiskSourceImageName) voidsetBootDiskSourceImageProject(String bootDiskSourceImageProject) voidsetBootDiskType(String bootDiskType) protected voidsetCloud(ComputeEngineCloud cloud) voidsetCreateSnapshot(boolean createSnapshot) voidsetDescription(String description) voidsetExternalAddress(Boolean externalAddress) Deprecated.voidsetGoogleLabels(Map<String, String> googleLabels) voidsetIgnoreProxy(boolean ignoreProxy) voidsetJavaExecPath(String javaExecPath) voidvoidsetLabelSet(Set<LabelAtom> labelSet) voidsetLabelString(String labelString) voidsetLaunchTimeoutSeconds(Integer launchTimeoutSeconds) voidsetLaunchTimeoutSecondsStr(String launchTimeoutSecondsStr) voidsetMachineType(String machineType) voidsetMinCpuPlatform(String minCpuPlatform) voidvoidsetNamePrefix(String namePrefix) voidsetNetworkConfiguration(NetworkConfiguration networkConfiguration) voidsetNetworkInterfaceIpStackMode(NetworkInterfaceIpStackMode networkInterfaceIpStackMode) voidsetNetworkTags(String networkTags) voidsetNumExecutors(Integer numExecutors) voidsetNumExecutorsStr(String numExecutorsStr) voidsetOneShot(boolean oneShot) voidsetPreemptible(boolean preemptible) This setter is kept only to provide JCasC compatibility, don't use for any other.voidsetProvisioningType(ProvisioningType provisioningType) voidvoidsetRemoteFs(String remoteFs) voidsetRetentionTimeMinutes(Integer retentionTimeMinutes) voidsetRetentionTimeMinutesStr(String retentionTimeMinutesStr) voidsetRunAsUser(String runAsUser) voidsetServiceAccountEmail(String serviceAccountEmail) voidsetSshConfiguration(SshConfiguration sshConfiguration) voidsetSshKeyCredential(GoogleKeyCredential sshKeyCredential) voidsetStartupScript(String startupScript) voidsetTemplate(String template) voidsetUseInternalAddress(boolean useInternalAddress) voidsetWindowsConfiguration(WindowsConfiguration windowsConfiguration) void
-
Field Details
-
GUEST_ATTRIBUTES_METADATA_KEY
- See Also:
-
SSH_METADATA_KEY
- See Also:
-
DEFAULT_BOOT_DISK_SIZE_GB
-
DEFAULT_NUM_EXECUTORS
-
DEFAULT_LAUNCH_TIMEOUT_SECONDS
-
DEFAULT_RETENTION_TIME_MINUTES
-
DEFAULT_RUN_AS_USER
- See Also:
-
METADATA_LINUX_STARTUP_SCRIPT_KEY
- See Also:
-
METADATA_WINDOWS_STARTUP_SCRIPT_KEY
- See Also:
-
KNOWN_IMAGE_PROJECTS
-
cloud
-
-
Constructor Details
-
InstanceConfiguration
@DataBoundConstructor public InstanceConfiguration() -
InstanceConfiguration
public InstanceConfiguration(String description, String namePrefix, String region, String zone, String machineType, String numExecutorsStr, String startupScript, ProvisioningType provisioningType, String minCpuPlatform, String labels, String runAsUser, String bootDiskType, boolean bootDiskAutoDelete, String bootDiskSourceImageName, String bootDiskSourceImageProject, NetworkConfiguration networkConfiguration, NetworkInterfaceIpStackMode networkInterfaceIpStackMode, Boolean externalAddress, boolean useInternalAddress, boolean ignoreProxy, String networkTags, String serviceAccountEmail, Node.Mode mode, AcceleratorConfiguration acceleratorConfiguration, String retentionTimeMinutesStr, String launchTimeoutSecondsStr, String bootDiskSizeGbStr, boolean oneShot, String template, @Nullable WindowsConfiguration windowsConfiguration, @Nullable SshConfiguration sshConfiguration, boolean createSnapshot, String remoteFs, String javaExecPath, GoogleKeyCredential sshKeyCredential, Map<String, String> googleLabels, Integer numExecutors, Integer retentionTimeMinutes, Integer launchTimeoutSeconds, Long bootDiskSizeGb, Set<LabelAtom> labelSet, ComputeEngineCloud cloud, boolean preemptible)
-
-
Method Details
-
setNumExecutorsStr
-
setLabelString
-
setNetworkTags
-
setRetentionTimeMinutesStr
-
setLaunchTimeoutSecondsStr
-
setBootDiskSizeGbStr
-
setOneShot
@DataBoundSetter public void setOneShot(boolean oneShot) -
setCreateSnapshot
@DataBoundSetter public void setCreateSnapshot(boolean createSnapshot) -
setPreemptible
@DataBoundSetter public void setPreemptible(boolean preemptible) This setter is kept only to provide JCasC compatibility, don't use for any other. Although JCasC is not "required" to keep compatibility, but in this case, as it is very low effort to keep the compatibility, we have decided to keep it.Previously, JCasC syntax would be
preemptible: true, going forward instead should be done as,provisioningType: preemptibleVmCurrently only caller is, JCasC configurators if the bundle is having `preemptible` field defined in it. Consider deleting it in future (perhaps after a year or so)
-
intOrDefault
-
longOrDefault
-
getDescriptor
- Specified by:
getDescriptorin interfaceDescribable<InstanceConfiguration>
-
getLabelString
-
getLabelSet
-
getDisplayName
-
getLaunchTimeoutMillis
public int getLaunchTimeoutMillis() -
appendLabels
-
appendLabel
-
provision
- Throws:
IOException
-
readResolve
Initializes transient properties -
instance
- Throws:
IOException
-
builder
-
getDescription
-
getNamePrefix
-
getRegion
-
getZone
-
getMachineType
-
getNumExecutorsStr
-
getStartupScript
-
getProvisioningType
-
getMinCpuPlatform
-
getLabels
-
getRunAsUser
-
getBootDiskType
-
isBootDiskAutoDelete
public boolean isBootDiskAutoDelete() -
getBootDiskSourceImageName
-
getBootDiskSourceImageProject
-
getNetworkConfiguration
-
getNetworkInterfaceIpStackMode
-
getExternalAddress
Deprecated. -
isUseInternalAddress
public boolean isUseInternalAddress() -
isIgnoreProxy
public boolean isIgnoreProxy() -
getNetworkTags
-
getServiceAccountEmail
-
getMode
-
getAcceleratorConfiguration
-
getRetentionTimeMinutesStr
-
getLaunchTimeoutSecondsStr
-
getBootDiskSizeGbStr
-
isOneShot
public boolean isOneShot() -
getTemplate
-
getWindowsConfiguration
-
getSshConfiguration
-
isCreateSnapshot
public boolean isCreateSnapshot() -
getRemoteFs
-
getJavaExecPath
-
getSshKeyCredential
-
getGoogleLabels
-
getNumExecutors
-
getRetentionTimeMinutes
-
getLaunchTimeoutSeconds
-
getBootDiskSizeGb
-
isPreemptible
Deprecated.UseprovisioningTypeinstead. -
setDescription
-
setNamePrefix
-
setRegion
-
setZone
-
setMachineType
-
setStartupScript
-
setProvisioningType
-
setMinCpuPlatform
-
setLabels
-
setRunAsUser
-
setBootDiskType
-
setBootDiskAutoDelete
@DataBoundSetter public void setBootDiskAutoDelete(boolean bootDiskAutoDelete) -
setBootDiskSourceImageName
-
setBootDiskSourceImageProject
-
setNetworkConfiguration
-
setNetworkInterfaceIpStackMode
@DataBoundSetter public void setNetworkInterfaceIpStackMode(NetworkInterfaceIpStackMode networkInterfaceIpStackMode) -
setExternalAddress
Deprecated. -
setUseInternalAddress
@DataBoundSetter public void setUseInternalAddress(boolean useInternalAddress) -
setIgnoreProxy
@DataBoundSetter public void setIgnoreProxy(boolean ignoreProxy) -
setServiceAccountEmail
-
setMode
-
setAcceleratorConfiguration
@DataBoundSetter public void setAcceleratorConfiguration(AcceleratorConfiguration acceleratorConfiguration) -
setTemplate
-
setWindowsConfiguration
@DataBoundSetter public void setWindowsConfiguration(@Nullable WindowsConfiguration windowsConfiguration) -
setSshConfiguration
-
setRemoteFs
-
setJavaExecPath
-
setSshKeyCredential
-
setGoogleLabels
-
setNumExecutors
-
setRetentionTimeMinutes
-
setLaunchTimeoutSeconds
-
setBootDiskSizeGb
-
setLabelSet
-
getCloud
-
setCloud
-
provisioningTypeinstead.