Package jenkins.plugins.jclouds.compute
Class JCloudsSlaveTemplate
java.lang.Object
hudson.model.AbstractDescribableImpl<JCloudsSlaveTemplate>
jenkins.plugins.jclouds.compute.JCloudsSlaveTemplate
- All Implemented Interfaces:
com.google.common.base.Supplier<JCloudsNodeMetadata>,Describable<JCloudsSlaveTemplate>,Supplier<JCloudsNodeMetadata>
public class JCloudsSlaveTemplate
extends AbstractDescribableImpl<JCloudsSlaveTemplate>
implements com.google.common.base.Supplier<JCloudsNodeMetadata>
- Author:
- Vijay Kiran
-
Nested Class Summary
Nested Classes -
Field Summary
FieldsModifier and TypeFieldDescriptionfinal booleanfinal booleanfinal doublefinal Stringfinal Stringfinal Stringfinal Stringfinal booleanfinal booleanfinal Stringfinal Stringfinal Stringfinal Node.Modefinal Stringfinal Stringfinal intfinal Stringfinal Stringfinal Integerfinal booleanfinal intfinal Stringfinal intfinal booleanfinal booleanfinal booleanfinal int -
Constructor Summary
ConstructorsConstructorDescriptionJCloudsSlaveTemplate(String name, String imageId, String imageNameRegex, String hardwareId, double cores, int ram, String osFamily, String osVersion, String locationId, String labelString, String description, String initScriptId, int numExecutors, boolean stopOnTerminate, String jvmOptions, boolean preExistingJenkinsUser, String fsRoot, boolean allowSudo, boolean installPrivateKey, Integer overrideRetentionTime, boolean hasOverrideRetentionTime, int spoolDelayMs, boolean assignFloatingIp, boolean waitPhoneHome, int waitPhoneHomeTimeout, String keyPairName, boolean assignPublicIp, String networks, String securityGroups, String credentialsId, String adminCredentialsId, String mode, boolean useConfigDrive, boolean isPreemptible, List<UserData> userDataEntries, String preferredAddress, boolean useJnlp, boolean jnlpProvision) -
Method Summary
Modifier and TypeMethodDescriptionDeletes the template.get()This is where the actual provisioning (accessing the cloud provider) happens.getCloud()booleanintgetUrl()booleanbooleanprovisionSlave(TaskListener listener, org.jenkinsci.plugins.cloudstats.ProvisioningActivity.Id provisioningId) protected ObjectInitializes data structure that we don't persist.voidMethods inherited from class hudson.model.AbstractDescribableImpl
getDescriptor
-
Field Details
-
name
-
imageId
-
imageNameRegex
-
hardwareId
-
cores
public final double cores -
ram
public final int ram -
osFamily
-
labelString
-
description
-
osVersion
-
locationId
-
numExecutors
public final int numExecutors -
stopOnTerminate
public final boolean stopOnTerminate -
preExistingJenkinsUser
public final boolean preExistingJenkinsUser -
allowSudo
public final boolean allowSudo -
installPrivateKey
public final boolean installPrivateKey -
overrideRetentionTime
-
spoolDelayMs
public final int spoolDelayMs -
waitPhoneHome
public final boolean waitPhoneHome -
waitPhoneHomeTimeout
public final int waitPhoneHomeTimeout -
keyPairName
-
assignPublicIp
public final boolean assignPublicIp -
networks
-
securityGroups
-
mode
-
useConfigDrive
public final boolean useConfigDrive -
isPreemptible
public final boolean isPreemptible
-
-
Constructor Details
-
JCloudsSlaveTemplate
@DataBoundConstructor public JCloudsSlaveTemplate(String name, String imageId, String imageNameRegex, String hardwareId, double cores, int ram, String osFamily, String osVersion, String locationId, String labelString, String description, String initScriptId, int numExecutors, boolean stopOnTerminate, String jvmOptions, boolean preExistingJenkinsUser, String fsRoot, boolean allowSudo, boolean installPrivateKey, Integer overrideRetentionTime, boolean hasOverrideRetentionTime, int spoolDelayMs, boolean assignFloatingIp, boolean waitPhoneHome, int waitPhoneHomeTimeout, String keyPairName, boolean assignPublicIp, String networks, String securityGroups, String credentialsId, String adminCredentialsId, String mode, boolean useConfigDrive, boolean isPreemptible, List<UserData> userDataEntries, String preferredAddress, boolean useJnlp, boolean jnlpProvision)
-
-
Method Details
-
getCredentialsId
-
getAdminCredentialsId
-
getUserDataEntries
-
getInitScriptId
-
getPreferredAddress
-
getShortDescription
-
getUseJnlp
public boolean getUseJnlp() -
getJnlpProvision
public boolean getJnlpProvision() -
getUrl
-
getCloud
-
setCloud
-
readResolve
Initializes data structure that we don't persist.- Returns:
- The initialized object.
-
getJenkinsUser
-
getJenkinsPrivateKey
-
getJenkinsPublicKey
-
getAdminUser
-
getJvmOptions
-
getNumExecutors
public int getNumExecutors() -
getFsRoot
-
getLabelSet
-
provisionSlave
public JCloudsSlave provisionSlave(TaskListener listener, org.jenkinsci.plugins.cloudstats.ProvisioningActivity.Id provisioningId) throws IOException - Throws:
IOException
-
getUserDataIds
-
get
This is where the actual provisioning (accessing the cloud provider) happens.- Specified by:
getin interfacecom.google.common.base.Supplier<JCloudsNodeMetadata>- Specified by:
getin interfaceSupplier<JCloudsNodeMetadata>
-
hasOverrideRetentionTime
public boolean hasOverrideRetentionTime() -
doDoDelete
Deletes the template.- Throws:
IOException
-
doConfigSubmit
@POST public HttpResponse doConfigSubmit(StaplerRequest2 req, @AncestorInPath JCloudsCloud c) throws IOException, jakarta.servlet.ServletException, Descriptor.FormException - Throws:
IOExceptionjakarta.servlet.ServletExceptionDescriptor.FormException
-