Package hudson.slaves

Class 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 label
      Only reacts to provisioning for this label.
      int numProvisioned  
      • Fields inherited from class hudson.slaves.Cloud

        ALL, name, PROVISION
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      boolean canProvision​(hudson.model.Label label)  
      hudson.model.Descriptor<hudson.slaves.Cloud> getDescriptor()  
      List<hudson.slaves.NodeProperty<?>> getNodeProperties()  
      Collection<hudson.slaves.NodeProvisioner.PlannedNode> provision​(hudson.model.Label label, int excessWorkload)  
      • Methods inherited from class hudson.slaves.Cloud

        all, canProvision, getACL, 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 interface hudson.security.AccessControlled

        checkAnyPermission, checkPermission, hasAnyPermission, hasPermission, hasPermission, hasPermission2
    • Field Detail

      • numProvisioned

        public int numProvisioned
      • label

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

      • DummyCloudImpl

        public DummyCloudImpl​(JenkinsRule rule,
                              int delay)
      • DummyCloudImpl

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

      • 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