Class BaremetalCloud
java.lang.Object
hudson.model.AbstractModelObject
hudson.model.Actionable
hudson.slaves.Cloud
hudson.slaves.AbstractCloudImpl
com.oracle.cloud.baremetal.jenkins.BaremetalCloud
- All Implemented Interfaces:
ExtensionPoint,Describable<Cloud>,ModelObject,SearchableModelObject,SearchItem,AccessControlled,ModelObjectWithContextMenu
-
Nested Class Summary
Nested ClassesNested classes/interfaces inherited from class hudson.slaves.Cloud
Cloud.CloudStateNested classes/interfaces inherited from interface hudson.ExtensionPoint
ExtensionPoint.LegacyInstancesAreScopedToHudsonNested classes/interfaces inherited from interface jenkins.model.ModelObjectWithContextMenu
ModelObjectWithContextMenu.ContextMenu, ModelObjectWithContextMenu.ContextMenuVisibility, ModelObjectWithContextMenu.MenuItem, ModelObjectWithContextMenu.MenuItemType -
Field Summary
Fields -
Constructor Summary
ConstructorsConstructorDescriptionBaremetalCloud(String cloudName, String credentialsId, String instanceCapStr, String maxAsyncThreads, int nextTemplateId, List<? extends BaremetalCloudAgentTemplate> templates) -
Method Summary
Modifier and TypeMethodDescriptionbooleancanProvision(Label label) org.kohsuke.stapler.HttpResponsedoIndex()The breadcrumb on theprovisionArguments.jellypage contains a link to this object.voiddoProvision(int numberOfComputers, int templateId, org.kohsuke.stapler.StaplerRequest req, org.kohsuke.stapler.StaplerResponse rsp) Called byprovisionArguments.jellywhen explicitly provisioning a new node via the nodes page.voiddoProvisionArguments(int templateId, org.kohsuke.stapler.StaplerRequest req, org.kohsuke.stapler.StaplerResponse rsp) Called bycomputerSet.jellywhen explicitly provisioning a new node via the nodes page.intClass<?>Called byprovisionArguments.jellyandprovision.jellyto show a sidepanel.getProvisionStartedMessage(javax.servlet.http.HttpServletRequest req) Display a provisioning message based on request attributes set bydoProvision(int, int, org.kohsuke.stapler.StaplerRequest, org.kohsuke.stapler.StaplerResponse).getTemplate(Label label) intgetTemplateId(javax.servlet.http.HttpServletRequest req) Called byprovisionArguments.jellyto pass templateId to doProvision()protected intgetTemplateNodeCount(int templateId) List<? extends BaremetalCloudAgentTemplate>getTerminationRetry(Callable<String> task) static com.cloudbees.plugins.credentials.CredentialsmatchCredentials(Class c, String id) voidrecycleCloudResources(String instanceId) voidstopCloudResources(String instanceId) Methods inherited from class hudson.slaves.AbstractCloudImpl
getInstanceCap, getInstanceCapStr, setInstanceCap, setInstanceCapStrMethods inherited from class hudson.slaves.Cloud
all, canProvision, doConfigSubmit, doDoDelete, getACL, getDescriptor, getIcon, getIconAltText, getIconClassName, getSearchUrl, getUrl, provision, reconfigure, registerPermissionsMethods inherited from class hudson.model.Actionable
addAction, addOrReplaceAction, doContextMenu, getAction, getAction, getActions, getActions, getAllActions, getDynamic, removeAction, removeActions, replaceAction, replaceActionsMethods inherited from class hudson.model.AbstractModelObject
getSearch, getSearchIndex, getSearchName, makeSearchIndex, requirePOST, sendError, sendError, sendError, sendError, sendErrorMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface hudson.security.AccessControlled
checkAnyPermission, checkPermission, hasAnyPermission, hasPermission, hasPermission, hasPermission2
-
Field Details
-
NAME_PREFIX
The prefix to add to names provided by the user in the UI to ensure that names of clouds in different plugins do not conflict. We use the term "name" to mean the full name with a prefix (to match Cloud.name), and we use the term "cloud name" to be the short name without a prefix.- See Also:
-
cloudNameToName(java.lang.String)nameToCloudName(java.lang.String)getCloudName()BaremetalCloud.DescriptorImpl.doCheckCloudName(java.lang.String)- Constant Field Values
-
INSTANCE_NAME_PREFIX
The prefix to add to the names of created instances.- See Also:
-
-
Constructor Details
-
BaremetalCloud
-
-
Method Details
-
getDisplayName
- Specified by:
getDisplayNamein interfaceModelObject- Overrides:
getDisplayNamein classCloud
-
getCloudName
-
getCredentialsId
-
getMaxAsyncThreads
-
getNextTemplateId
public int getNextTemplateId() -
getTemplates
-
provision
-
recycleCloudResources
- Throws:
IOException
-
stopCloudResources
- Throws:
IOException
-
getTerminationRetry
-
getTemplate
-
doProvisionArguments
public void doProvisionArguments(@QueryParameter int templateId, org.kohsuke.stapler.StaplerRequest req, org.kohsuke.stapler.StaplerResponse rsp) throws javax.servlet.ServletException, IOException Called bycomputerSet.jellywhen explicitly provisioning a new node via the nodes page.- Parameters:
templateId- template idreq- requestrsp- response- Throws:
javax.servlet.ServletException- if a servlet exception occursIOException- if a IO error occurs
-
doProvision
public void doProvision(@QueryParameter int numberOfComputers, @QueryParameter int templateId, org.kohsuke.stapler.StaplerRequest req, org.kohsuke.stapler.StaplerResponse rsp) throws javax.servlet.ServletException, IOException Called byprovisionArguments.jellywhen explicitly provisioning a new node via the nodes page.- Parameters:
numberOfComputers- a number of agentstemplateId- template idreq- requestrsp- response- Throws:
javax.servlet.ServletException- if a servlet exception occursIOException- if a IO error occurs
-
getTemplateId
public int getTemplateId(javax.servlet.http.HttpServletRequest req) Called byprovisionArguments.jellyto pass templateId to doProvision()- Parameters:
req- request- Returns:
- template id
-
getProvisionSidePanelClass
Called byprovisionArguments.jellyandprovision.jellyto show a sidepanel.- Returns:
- provision side panel class
-
getProvisionStartedMessage
Display a provisioning message based on request attributes set bydoProvision(int, int, org.kohsuke.stapler.StaplerRequest, org.kohsuke.stapler.StaplerResponse).- Parameters:
req- request- Returns:
- provision started message
-
doIndex
The breadcrumb on theprovisionArguments.jellypage contains a link to this object. We have no data to display, so redirect the user to the computer set page.- Returns:
- the http response
- Throws:
IOException- if an IO error occurs
-
getClient
-
getTemplateNodeCount
protected int getTemplateNodeCount(int templateId) -
canProvision
- Overrides:
canProvisionin classCloud
-
matchCredentials
-