Package hudson.slaves

Class DummyCloudImpl

java.lang.Object
hudson.model.AbstractModelObject
hudson.model.Actionable
hudson.slaves.Cloud
hudson.slaves.DummyCloudImpl
All Implemented Interfaces:
hudson.ExtensionPoint, hudson.model.Describable<hudson.slaves.Cloud>, hudson.model.ModelObject, hudson.search.SearchableModelObject, hudson.search.SearchItem, hudson.security.AccessControlled, jenkins.model.ModelObjectWithContextMenu

public class DummyCloudImpl extends hudson.slaves.Cloud
Cloud implementation useful for testing.

This implementation launches "java -jar slave.jar" on the localhost when provisioning a new slave.

Author:
Kohsuke Kawaguchi
  • Nested Class Summary

    Nested classes/interfaces inherited from class hudson.slaves.Cloud

    hudson.slaves.Cloud.CloudState

    Nested classes/interfaces inherited from interface hudson.ExtensionPoint

    hudson.ExtensionPoint.LegacyInstancesAreScopedToHudson

    Nested classes/interfaces inherited from interface jenkins.model.ModelObjectWithContextMenu

    jenkins.model.ModelObjectWithContextMenu.ContextMenu, jenkins.model.ModelObjectWithContextMenu.ContextMenuVisibility, jenkins.model.ModelObjectWithContextMenu.MenuItem, jenkins.model.ModelObjectWithContextMenu.MenuItemType
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    hudson.model.Label
    Only reacts to provisioning for this label.
    int
     

    Fields inherited from class hudson.slaves.Cloud

    ALL, name, PROVISION
  • Constructor Summary

    Constructors
    Constructor
    Description
    DummyCloudImpl(JenkinsRule rule, int delay)
     
    DummyCloudImpl(JenkinsRule rule, int delay, List<hudson.slaves.NodeProperty<?>> nodeProperties)
     
  • Method Summary

    Modifier and Type
    Method
    Description
    boolean
    canProvision(hudson.model.Label label)
     
    hudson.model.Descriptor<hudson.slaves.Cloud>
     
    List<hudson.slaves.NodeProperty<?>>
     
    Collection<hudson.slaves.NodeProvisioner.PlannedNode>
    provision(hudson.model.Label label, int excessWorkload)
     

    Methods inherited from class hudson.slaves.Cloud

    all, canProvision, doConfigSubmit, doDoDelete, getACL, getDisplayName, getIcon, getIconAltText, getIconClassName, getSearchUrl, getUrl, provision, reconfigure, reconfigure, registerPermissions

    Methods inherited from class hudson.model.Actionable

    addAction, addOrReplaceAction, doContextMenu, doContextMenu, getAction, getAction, getActions, getActions, getAllActions, getDynamic, getDynamic, removeAction, removeActions, replaceAction, replaceActions

    Methods inherited from class hudson.model.AbstractModelObject

    getSearch, getSearchIndex, getSearchName, makeSearchIndex, requirePOST, sendError, sendError, sendError, 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 Details

    • numProvisioned

      public int numProvisioned
    • label

      public hudson.model.Label label
      Only reacts to provisioning for this label.
  • Constructor Details

    • DummyCloudImpl

      public DummyCloudImpl(JenkinsRule rule, int delay)
    • DummyCloudImpl

      public DummyCloudImpl(JenkinsRule rule, int delay, List<hudson.slaves.NodeProperty<?>> nodeProperties)
  • Method Details

    • getNodeProperties

      public List<hudson.slaves.NodeProperty<?>> getNodeProperties()
    • provision

      public Collection<hudson.slaves.NodeProvisioner.PlannedNode> provision(hudson.model.Label label, int excessWorkload)
      Overrides:
      provision in class hudson.slaves.Cloud
    • canProvision

      public boolean canProvision(hudson.model.Label label)
      Overrides:
      canProvision in class hudson.slaves.Cloud
    • getDescriptor

      public hudson.model.Descriptor<hudson.slaves.Cloud> getDescriptor()
      Specified by:
      getDescriptor in interface hudson.model.Describable<hudson.slaves.Cloud>
      Overrides:
      getDescriptor in class hudson.slaves.Cloud