Class PluginImpl

  • All Implemented Interfaces:
    Saveable, org.kohsuke.stapler.StaplerProxy

    public class PluginImpl
    extends Plugin
    Exposes an entry point to add a new Swarm agent.
    Author:
    Kohsuke Kawaguchi
    • Constructor Detail

      • PluginImpl

        public PluginImpl()
    • Method Detail

      • doGetSlaveLabels

        public void doGetSlaveLabels​(org.kohsuke.stapler.StaplerRequest req,
                                     org.kohsuke.stapler.StaplerResponse rsp,
                                     @QueryParameter
                                     String name)
                              throws IOException
        Get the list of labels for an agent.
        Throws:
        IOException
      • doAddSlaveLabels

        @POST
        public void doAddSlaveLabels​(org.kohsuke.stapler.StaplerRequest req,
                                     org.kohsuke.stapler.StaplerResponse rsp,
                                     @QueryParameter
                                     String name,
                                     @QueryParameter
                                     String labels)
                              throws IOException
        Add labels to an agent.
        Throws:
        IOException
      • doRemoveSlaveLabels

        @POST
        public void doRemoveSlaveLabels​(org.kohsuke.stapler.StaplerRequest req,
                                        org.kohsuke.stapler.StaplerResponse rsp,
                                        @QueryParameter
                                        String name,
                                        @QueryParameter
                                        String labels)
                                 throws IOException
        Remove labels from an agent.
        Throws:
        IOException
      • doCreateSlave

        @POST
        public void doCreateSlave​(org.kohsuke.stapler.StaplerRequest req,
                                  org.kohsuke.stapler.StaplerResponse rsp,
                                  @QueryParameter
                                  String name,
                                  @QueryParameter(fixEmpty=true)
                                  String description,
                                  @QueryParameter
                                  int executors,
                                  @QueryParameter
                                  String remoteFsRoot,
                                  @QueryParameter
                                  String labels,
                                  @QueryParameter
                                  Node.Mode mode,
                                  @QueryParameter(fixEmpty=true)
                                  String hash,
                                  @QueryParameter
                                  boolean deleteExistingClients,
                                  @QueryParameter
                                  boolean keepDisconnectedClients)
                           throws IOException
        Add a new Swarm agent.
        Throws:
        IOException