Class AgentsControl

java.lang.Object
com.atlassian.bamboo.testutils.backdoor.BackdoorControl<AgentsControl>
com.atlassian.bamboo.testutils.backdoor.AgentsControl

public class AgentsControl extends BackdoorControl<AgentsControl>
  • Constructor Details

  • Method Details

    • createResource

      protected javax.ws.rs.client.WebTarget createResource()
      Description copied from class: BackdoorControl
      Creates the resource that corresponds to the root of the TestKit REST API, using the values returned by BackdoorControl.getRestModulePath(). Note that the created WebResource has the following properties:
      • it logs all GET/POST/etc requests made through it
      • it sets the Content-Type: application/json by default (override with WebTarget.request(MediaType...))
      . To create a WebResource for a different root, use BackdoorControl.createResourceForPath(java.lang.String)
      Overrides:
      createResource in class BackdoorControl<AgentsControl>
      Returns:
      a WebResource for the TestKit REST API root
      See Also:
    • waitForOfflineAgent

      public void waitForOfflineAgent(long remoteAgentId)
    • createLocalAgent

      public RestAgent createLocalAgent()
      Creates a new local agent with a random name and default configuration.
    • createLocalAgent

      public RestAgent createLocalAgent(boolean removeAfter)
    • tearDown

      public void tearDown()
      Description copied from class: BackdoorControl
      Cleanup resources
      Overrides:
      tearDown in class BackdoorControl<AgentsControl>
    • deleteAgent

      public void deleteAgent(long agentId)
      Deletes a Bamboo agent.
    • deleteAllLocalAgents

      public void deleteAllLocalAgents()
    • enableAllAgents

      public void enableAllAgents()
    • approveAllAgents

      public void approveAllAgents()
    • getAgentsToken

      public String getAgentsToken()
    • getAgentsDedicatedToken

      public String getAgentsDedicatedToken(String resultKey)
    • enableRemoteAgents

      public void enableRemoteAgents(boolean enabled)
    • getEnabledAgentsIds

      public Set<Long> getEnabledAgentsIds()
    • disableAllAgents

      public void disableAllAgents()
    • undedicateAllAgents

      public void undedicateAllAgents()
    • dedicateAgentToDeploymentProject

      public void dedicateAgentToDeploymentProject(long agentId, long deploymentProjectId)
    • dedicateAgentToEnvironment

      public void dedicateAgentToEnvironment(long agentId, long environmentId)
    • dedicateAgentToPlan

      public void dedicateAgentToPlan(long agentId, long planId)
    • dedicateEphemeralTemplateToEntity

      public void dedicateEphemeralTemplateToEntity(long agentId, long entityId, AgentAssignment.ExecutableType entityType)
    • getAgentAssignments

      public List<RestDedicatedAgent> getAgentAssignments(long agentId)
    • disableEphemeralAgents

      public void disableEphemeralAgents()
    • enableEphemeralAgents

      public void enableEphemeralAgents(String label, String pathToConfig)
    • enableEphemeralAgents

      public void enableEphemeralAgents(String label, String pathToConfig, boolean cleanupEnabled, int cleanupInterval)
    • createEphemeralAgentTemplate

      public RestEphemeralAgentTemplate createEphemeralAgentTemplate(String name, String yamlTemplate)
    • removeAlreadyDeletedEphemeralAgentTemplate

      public void removeAlreadyDeletedEphemeralAgentTemplate(Long templateId)
    • deleteEphemeralAgentTemplate

      public void deleteEphemeralAgentTemplate(Long templateId)