Package jenkins.plugins.jclouds.compute
Class JCloudsCloud
- java.lang.Object
-
- hudson.model.AbstractModelObject
-
- hudson.model.Actionable
-
- hudson.slaves.Cloud
-
- jenkins.plugins.jclouds.compute.JCloudsCloud
-
- All Implemented Interfaces:
ExtensionPoint
,Describable<Cloud>
,ModelObject
,SearchableModelObject
,SearchItem
,AccessControlled
,ModelObjectWithContextMenu
public class JCloudsCloud extends Cloud
The JClouds version of the Jenkins Cloud.- Author:
- Vijay Kiran
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
JCloudsCloud.ConverterImpl
static class
JCloudsCloud.DescriptorImpl
-
Nested classes/interfaces inherited from class hudson.slaves.Cloud
Cloud.CloudState
-
Nested classes/interfaces inherited from interface hudson.ExtensionPoint
ExtensionPoint.LegacyInstancesAreScopedToHudson
-
Nested classes/interfaces inherited from interface jenkins.model.ModelObjectWithContextMenu
ModelObjectWithContextMenu.ContextMenu, ModelObjectWithContextMenu.ContextMenuVisibility, ModelObjectWithContextMenu.MenuItem
-
-
Field Summary
Fields Modifier and Type Field Description String
endPointUrl
int
instanceCap
String
profile
String
providerName
int
scriptTimeout
int
startTimeout
List<JCloudsSlaveTemplate>
templates
String
zones
-
Constructor Summary
Constructors Constructor Description JCloudsCloud(String profile, String providerName, String cloudCredentialsId, String cloudGlobalKeyId, String endPointUrl, int instanceCap, int retentionTime, int errorRetentionTime, int scriptTimeout, int startTimeout, String zones, String groupPrefix, boolean trustAll, List<JCloudsSlaveTemplate> templates)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description boolean
allowGzippedUserData()
boolean
canProvision(Cloud.CloudState state)
void
doProvision(StaplerRequest req, StaplerResponse rsp, String name)
Provisions a new node manually (by clicking a button in the computer list).String
getCloudCredentialsId()
String
getCloudGlobalKeyId()
ComputeService
getCompute()
int
getErrorRetentionTime()
Get the error retention time in minutes or default value from CloudInstanceDefaults if it is zero.String
getGlobalPrivateKey()
String
getGlobalPublicKey()
String
getGroupPrefix()
int
getRetentionTime()
Get the retention time in minutes or default value from CloudInstanceDefaults if it is zero.List<JCloudsSlaveTemplate>
getTemplates()
boolean
getTrustAll()
<A extends Closeable>
AnewApi(Class<A> apitype)
ComputeService
newCompute()
boolean
phoneHomeNotify(String name)
Collection<NodeProvisioner.PlannedNode>
provision(Cloud.CloudState state, int excessWorkload)
protected Object
readResolve()
void
setCloudCredentialsId(String value)
void
setCloudGlobalKeyId(String value)
void
unregisterPhoneHomeMonitor(jenkins.plugins.jclouds.compute.PhoneHomeMonitor monitor)
-
Methods inherited from class hudson.slaves.Cloud
all, canProvision, getACL, getDescriptor, getDisplayName, getSearchUrl, getUrl, provision, registerPermissions
-
Methods inherited from class hudson.model.Actionable
addAction, addOrReplaceAction, doContextMenu, getAction, getAction, getActions, getActions, getAllActions, getDynamic, removeAction, removeActions, replaceAction, replaceActions
-
Methods inherited from class hudson.model.AbstractModelObject
getSearch, getSearchIndex, getSearchName, makeSearchIndex, requirePOST, sendError, sendError, sendError, sendError, sendError
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface hudson.security.AccessControlled
checkAnyPermission, checkPermission, hasAnyPermission, hasPermission, hasPermission, hasPermission2
-
-
-
-
Field Detail
-
providerName
public final String providerName
-
endPointUrl
public final String endPointUrl
-
profile
public final String profile
-
instanceCap
public int instanceCap
-
templates
public final List<JCloudsSlaveTemplate> templates
-
scriptTimeout
public final int scriptTimeout
-
startTimeout
public final int startTimeout
-
zones
public final String zones
-
-
Constructor Detail
-
JCloudsCloud
@DataBoundConstructor public JCloudsCloud(String profile, String providerName, String cloudCredentialsId, String cloudGlobalKeyId, String endPointUrl, int instanceCap, int retentionTime, int errorRetentionTime, int scriptTimeout, int startTimeout, String zones, String groupPrefix, boolean trustAll, List<JCloudsSlaveTemplate> templates)
-
-
Method Detail
-
getCloudCredentialsId
public String getCloudCredentialsId()
-
getTrustAll
public boolean getTrustAll()
-
setCloudCredentialsId
public void setCloudCredentialsId(String value)
-
getCloudGlobalKeyId
public String getCloudGlobalKeyId()
-
setCloudGlobalKeyId
public void setCloudGlobalKeyId(String value)
-
getGlobalPrivateKey
public String getGlobalPrivateKey()
-
getGlobalPublicKey
public String getGlobalPublicKey()
-
getGroupPrefix
public String getGroupPrefix()
-
readResolve
protected Object readResolve()
-
getRetentionTime
public int getRetentionTime()
Get the retention time in minutes or default value from CloudInstanceDefaults if it is zero.- Returns:
- The retention time in minutes.
- See Also:
CloudInstanceDefaults.DEFAULT_INSTANCE_RETENTION_TIME_IN_MINUTES
-
getErrorRetentionTime
public int getErrorRetentionTime()
Get the error retention time in minutes or default value from CloudInstanceDefaults if it is zero.- Returns:
- The retention time in minutes.
- See Also:
CloudInstanceDefaults.DEFAULT_INSTANCE_RETENTION_TIME_IN_MINUTES
-
newCompute
public ComputeService newCompute()
-
getCompute
public ComputeService getCompute()
-
getTemplates
public List<JCloudsSlaveTemplate> getTemplates()
-
provision
public Collection<NodeProvisioner.PlannedNode> provision(Cloud.CloudState state, int excessWorkload)
-
canProvision
public boolean canProvision(Cloud.CloudState state)
- Overrides:
canProvision
in classCloud
-
doProvision
public void doProvision(StaplerRequest req, StaplerResponse rsp, @QueryParameter String name) throws ServletException, IOException, Descriptor.FormException
Provisions a new node manually (by clicking a button in the computer list).- Parameters:
req
-StaplerRequest
.rsp
-StaplerResponse
.name
- Name of the template to provision.- Throws:
ServletException
- if an error occurs.IOException
- if an error occurs.Descriptor.FormException
- if the form does not validate.
-
unregisterPhoneHomeMonitor
public void unregisterPhoneHomeMonitor(jenkins.plugins.jclouds.compute.PhoneHomeMonitor monitor)
-
phoneHomeNotify
public boolean phoneHomeNotify(String name)
-
allowGzippedUserData
public boolean allowGzippedUserData()
-
-