Class JCloudsCloud

All Implemented Interfaces:
ExtensionPoint, Describable<Cloud>, ModelObject, SearchableModelObject, SearchItem, AccessControlled, ModelObjectWithContextMenu, SlaveOptions.Holder

public class JCloudsCloud extends Cloud implements SlaveOptions.Holder
The JClouds version of the Jenkins Cloud.
Author:
Vijay Kiran
  • Constructor Details

    • JCloudsCloud

      @DataBoundConstructor @Restricted(org.kohsuke.accmod.restrictions.DoNotUse.class) public JCloudsCloud(@Nonnull String name, @Nonnull String endPointUrl, boolean ignoreSsl, @CheckForNull String zone, @CheckForNull SlaveOptions slaveOptions, @CheckForNull List<JCloudsSlaveTemplate> templates, @Nonnull String credentialsId)
  • Method Details

    • getClouds

      @Nonnull public static List<JCloudsCloud> getClouds()
    • getByName

      @Nonnull public static JCloudsCloud getByName(@Nonnull String name) throws IllegalArgumentException
      Throws:
      IllegalArgumentException - If the OpenStack cloud with given name does not exist.
    • getEffectiveSlaveOptions

      @Nonnull public SlaveOptions getEffectiveSlaveOptions()
      Description copied from interface: SlaveOptions.Holder
      Get effective options declared by this object. This is supposed to correctly evaluate all the overriding.
      Specified by:
      getEffectiveSlaveOptions in interface SlaveOptions.Holder
    • getRawSlaveOptions

      @Nonnull public SlaveOptions getRawSlaveOptions()
      Description copied from interface: SlaveOptions.Holder
      Get configured options held by this object. This holds only the user configured diffs compared to parent.
      Specified by:
      getRawSlaveOptions in interface SlaveOptions.Holder
    • getTemplates

      @Nonnull public List<JCloudsSlaveTemplate> getTemplates()
    • getEndPointUrl

      @Nonnull public String getEndPointUrl()
    • getZone

      @CheckForNull public String getZone()
    • provision

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

      @Restricted(org.kohsuke.accmod.restrictions.NoExternalUse.class) @CheckForNull public String slaveIsWaitingFor(@Nonnull JCloudsSlave slave) throws JCloudsCloud.ProvisioningFailedException
      Throws:
      JCloudsCloud.ProvisioningFailedException
    • canProvision

      public boolean canProvision(Label label)
      Overrides:
      canProvision in class Cloud
    • getTemplate

      @CheckForNull public JCloudsSlaveTemplate getTemplate(String name)
    • doProvision

      @Restricted(org.kohsuke.accmod.restrictions.NoExternalUse.class) public void doProvision(org.kohsuke.stapler.StaplerRequest req, org.kohsuke.stapler.StaplerResponse rsp, @QueryParameter String name) throws IOException
      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:
      IOException
    • getOpenstack

      @Restricted(org.kohsuke.accmod.restrictions.NoExternalUse.class) @Nonnull public Openstack getOpenstack() throws jenkins.plugins.openstack.compute.JCloudsCloud.LoginFailure
      Get connected OpenStack client wrapper.
      Throws:
      jenkins.plugins.openstack.compute.JCloudsCloud.LoginFailure - In case the details are incomplete or rejected by OpenStack.
    • getCredentialsId

      public String getCredentialsId()
    • getIgnoreSsl

      @Restricted(org.kohsuke.accmod.restrictions.DoNotUse.class) public boolean getIgnoreSsl()
    • toString

      public String toString()
      Overrides:
      toString in class Object