Class TowerConnector
java.lang.Object
org.jenkinsci.plugins.ansible_tower.util.TowerConnector
- All Implemented Interfaces:
Serializable
- See Also:
-
Field Summary
Fields -
Constructor Summary
ConstructorsConstructorDescriptionTowerConnector(String url, String username, String password) TowerConnector(String url, String username, String password, String oauthToken, Boolean trustAllCerts, Boolean debug) TowerConnector(String url, String username, String password, String oauthToken, Boolean trustAllCerts, Boolean debug, String apiBasePath) -
Method Summary
Modifier and TypeMethodDescriptionvoidvoidcheckTemplateType(String templateType) convertPotentialStringToID(String idToCheck, String api_endpoint) net.sf.json.JSONObjectgetJobTemplate(String jobTemplate, String templateType) getLogEvents(long jobID, String templateType) getMethodName(int methodId) getProjectSyncURL(long syncID) getURL()voidbooleanisJobCommpleted(long jobID, String templateType) Deprecated.Use isJobCompletedbooleanisJobCompleted(long jobID, String templateType) booleanisJobFailed(long jobID, String templateType) org.apache.http.HttpResponsemakeRequest(int requestType, String endpoint, net.sf.json.JSONObject body, boolean noAuth) net.sf.json.JSONObjectrawLookupByString(String idToCheck, String api_endpoint) voidvoidsetConsole(PrintStream console) voidsetDebug(boolean debug) voidsetGetFullLogs(boolean getFullLogs) voidsetGetWorkflowChildLogs(boolean importChildWorkflowLogs) voidsetRemoveColor(boolean removeColor) voidsetTrustAllCerts(boolean trustAllCerts) Deprecated.Certificate validation is always enforced.longsubmitTemplate(long jobTemplate, String extraVars, String limit, String jobTags, String skipJobTags, String jobType, String inventory, String credential, String scmBranch, String templateType) void
-
Field Details
-
GET
public static final int GET- See Also:
-
POST
public static final int POST- See Also:
-
PATCH
public static final int PATCH- See Also:
-
JOB_TEMPLATE_TYPE
- See Also:
-
WORKFLOW_TEMPLATE_TYPE
- See Also:
-
API_BASE_PATH_LEGACY
- See Also:
-
API_BASE_PATH_AAP_CONTROLLER
- See Also:
-
API_GATEWAY_TOKEN_ENDPOINT
- See Also:
-
-
Constructor Details
-
TowerConnector
-
TowerConnector
-
TowerConnector
-
-
Method Details
-
setTrustAllCerts
Deprecated.Certificate validation is always enforced. -
setDebug
public void setDebug(boolean debug) -
setConsole
-
setRemoveColor
public void setRemoveColor(boolean removeColor) -
setGetWorkflowChildLogs
public void setGetWorkflowChildLogs(boolean importChildWorkflowLogs) -
setGetFullLogs
public void setGetFullLogs(boolean getFullLogs) -
getJenkinsExports
-
makeRequest
public org.apache.http.HttpResponse makeRequest(int requestType, String endpoint, net.sf.json.JSONObject body, boolean noAuth) throws AnsibleTowerException, AnsibleTowerItemDoesNotExist -
getURL
-
getVersion
- Throws:
AnsibleTowerException
-
testConnection
- Throws:
AnsibleTowerException
-
convertPotentialStringToID
public String convertPotentialStringToID(String idToCheck, String api_endpoint) throws AnsibleTowerException, AnsibleTowerItemDoesNotExist -
rawLookupByString
public net.sf.json.JSONObject rawLookupByString(String idToCheck, String api_endpoint) throws AnsibleTowerException, AnsibleTowerItemDoesNotExist -
getJobTemplate
public net.sf.json.JSONObject getJobTemplate(String jobTemplate, String templateType) throws AnsibleTowerException - Throws:
AnsibleTowerException
-
submitTemplate
public long submitTemplate(long jobTemplate, String extraVars, String limit, String jobTags, String skipJobTags, String jobType, String inventory, String credential, String scmBranch, String templateType) throws AnsibleTowerException - Throws:
AnsibleTowerException
-
checkTemplateType
- Throws:
AnsibleTowerException
-
isJobCompleted
- Throws:
AnsibleTowerException
-
cancelJob
- Throws:
AnsibleTowerException
-
isJobCommpleted
@Deprecated public boolean isJobCommpleted(long jobID, String templateType) throws AnsibleTowerException Deprecated.Use isJobCompleted- Throws:
AnsibleTowerException
-
getLogEvents
- Throws:
AnsibleTowerException
-
logLine
- Throws:
AnsibleTowerException
-
isJobFailed
- Throws:
AnsibleTowerException
-
getJobURL
-
getProjectSyncURL
-
releaseToken
public void releaseToken() -
getMethodName
-