Class AgentsControl
java.lang.Object
com.atlassian.bamboo.testutils.backdoor.BackdoorControl<AgentsControl>
com.atlassian.bamboo.testutils.backdoor.AgentsControl
-
Nested Class Summary
Nested classes/interfaces inherited from class com.atlassian.bamboo.testutils.backdoor.BackdoorControl
BackdoorControl.AddXsrfNoCheckTokenFilter, BackdoorControl.JsonMediaTypeFilter
-
Field Summary
Fields inherited from class com.atlassian.bamboo.testutils.backdoor.BackdoorControl
ADMIN_REST_PATH, API_REST_PATH, DEFAULT_REST_PATH, XSRF_NO_CHECK, XSRF_TOKEN_HEADER
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionvoid
createEphemeralAgentTemplate
(String name, String yamlTemplate) Creates a new local agent with a random name and default configuration.createLocalAgent
(boolean removeAfter) protected javax.ws.rs.client.WebTarget
Creates the resource that corresponds to the root of the TestKit REST API, using the values returned byBackdoorControl.getRestModulePath()
.void
dedicateAgentToDeploymentProject
(long agentId, long deploymentProjectId) void
dedicateAgentToEnvironment
(long agentId, long environmentId) void
dedicateAgentToPlan
(long agentId, long planId) void
dedicateEphemeralTemplateToEntity
(long agentId, long entityId, AgentAssignment.ExecutableType entityType) void
deleteAgent
(long agentId) Deletes a Bamboo agent.void
void
deleteEphemeralAgentTemplate
(Long templateId) void
void
void
void
enableEphemeralAgents
(String label, String pathToConfig) void
enableEphemeralAgents
(String label, String pathToConfig, boolean cleanupEnabled, int cleanupInterval) void
enableRemoteAgents
(boolean enabled) getAgentAssignments
(long agentId) getAgentsDedicatedToken
(String resultKey) void
removeAlreadyDeletedEphemeralAgentTemplate
(Long templateId) void
tearDown()
Cleanup resourcesvoid
void
waitForOfflineAgent
(long remoteAgentId) Methods inherited from class com.atlassian.bamboo.testutils.backdoor.BackdoorControl
anonymousResourceRoot, client, createResourceForPath, createResourceForPath, get, getEnvironmentData, getRestModulePath, getRootPath, percentEncode, ping, post, resourceRoot
-
Constructor Details
-
AgentsControl
-
-
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 byBackdoorControl.getRestModulePath()
. Note that the createdWebResource
has the following properties:- it logs all GET/POST/etc requests made through it
- it sets the
Content-Type: application/json
by default (override withWebTarget.request(MediaType...)
)
BackdoorControl.createResourceForPath(java.lang.String)
- Overrides:
createResource
in classBackdoorControl<AgentsControl>
- Returns:
- a WebResource for the TestKit REST API root
- See Also:
-
waitForOfflineAgent
public void waitForOfflineAgent(long remoteAgentId) -
createLocalAgent
Creates a new local agent with a random name and default configuration. -
createLocalAgent
-
tearDown
public void tearDown()Description copied from class:BackdoorControl
Cleanup resources- Overrides:
tearDown
in classBackdoorControl<AgentsControl>
-
deleteAgent
public void deleteAgent(long agentId) Deletes a Bamboo agent. -
deleteAllLocalAgents
public void deleteAllLocalAgents() -
enableAllAgents
public void enableAllAgents() -
approveAllAgents
public void approveAllAgents() -
getAgentsToken
-
getAgentsDedicatedToken
-
enableRemoteAgents
public void enableRemoteAgents(boolean enabled) -
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
-
disableEphemeralAgents
public void disableEphemeralAgents() -
enableEphemeralAgents
-
enableEphemeralAgents
-
createEphemeralAgentTemplate
-
removeAlreadyDeletedEphemeralAgentTemplate
-
deleteEphemeralAgentTemplate
-