Package io.jenkins.plugins.yc
Class AbstractCloud
- java.lang.Object
-
- hudson.model.AbstractModelObject
-
- hudson.model.Actionable
-
- hudson.slaves.Cloud
-
- io.jenkins.plugins.yc.AbstractCloud
-
- All Implemented Interfaces:
ExtensionPoint
,Describable<Cloud>
,ModelObject
,SearchableModelObject
,SearchItem
,AccessControlled
,ModelObjectWithContextMenu
- Direct Known Subclasses:
YandexCloud
public abstract class AbstractCloud extends Cloud
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
AbstractCloud.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, ModelObjectWithContextMenu.MenuItemType
-
-
Constructor Summary
Constructors Modifier Constructor Description protected
AbstractCloud(String name, List<? extends YandexTemplate> templates, String credentialsId, String sshKeysCredentialsId, int authSleepMs)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description boolean
canProvision(Cloud.CloudState state)
NodeProvisioner.PlannedNode
createPlannedNode(YandexTemplate t, YCAbstractSlave slave)
YCAbstractSlave
getNewOrExistingAvailableSlave(YandexTemplate t, int number, boolean forceCreateNew)
Obtains a agent whose matches the given template, and that also has requiredLabel (if requiredLabel is non-null) forceCreateNew specifies that the creation of a new agent is required.String
getSshKeysCredentialsId()
YandexTemplate
getTemplate(String template)
List<YandexTemplate>
getTemplates()
Collection<YandexTemplate>
getTemplates(Label label)
Gets list ofYandexTemplate
that matchesLabel
.protected Object
readResolve()
YCPrivateKey
resolvePrivateKey()
-
Methods inherited from class hudson.slaves.Cloud
all, canProvision, doConfigSubmit, doDoDelete, getACL, getDescriptor, getDisplayName, getIcon, getIconAltText, getIconClassName, getSearchUrl, getUrl, provision, provision, reconfigure, 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
-
-
-
-
Constructor Detail
-
AbstractCloud
protected AbstractCloud(String name, List<? extends YandexTemplate> templates, String credentialsId, String sshKeysCredentialsId, int authSleepMs)
-
-
Method Detail
-
canProvision
public boolean canProvision(Cloud.CloudState state)
- Overrides:
canProvision
in classCloud
-
getNewOrExistingAvailableSlave
public YCAbstractSlave getNewOrExistingAvailableSlave(YandexTemplate t, int number, boolean forceCreateNew) throws Exception
Obtains a agent whose matches the given template, and that also has requiredLabel (if requiredLabel is non-null) forceCreateNew specifies that the creation of a new agent is required. Otherwise, an existing matching agent may be re-used- Throws:
Exception
-
readResolve
protected Object readResolve()
-
resolvePrivateKey
@CheckForNull public YCPrivateKey resolvePrivateKey()
-
getTemplates
public List<YandexTemplate> getTemplates()
-
getTemplate
@CheckForNull public YandexTemplate getTemplate(String template)
-
getTemplates
public Collection<YandexTemplate> getTemplates(Label label)
Gets list ofYandexTemplate
that matchesLabel
.- Parameters:
label
- - required label- Returns:
- template collections by label
-
createPlannedNode
public NodeProvisioner.PlannedNode createPlannedNode(YandexTemplate t, YCAbstractSlave slave)
-
getSshKeysCredentialsId
@CheckForNull public String getSshKeysCredentialsId()
-
-