public class TowerConnector extends Object implements Serializable
Modifier and Type | Field and Description |
---|---|
static int |
GET |
static String |
JOB_TEMPLATE_TYPE |
static int |
PATCH |
static int |
POST |
static String |
WORKFLOW_TEMPLATE_TYPE |
Constructor and Description |
---|
TowerConnector(String url,
String username,
String password) |
TowerConnector(String url,
String username,
String password,
String oauthToken,
Boolean trustAllCerts,
Boolean debug) |
Modifier and Type | Method and Description |
---|---|
void |
cancelJob(int jobID,
String templateType) |
void |
checkTemplateType(String templateType) |
String |
convertPotentialStringToID(String idToCheck,
String api_endpoint) |
HashMap<String,String> |
getJenkinsExports() |
net.sf.json.JSONObject |
getJobTemplate(String jobTemplate,
String templateType) |
String |
getJobURL(int myJobID,
String templateType) |
Vector<String> |
getLogEvents(int jobID,
String templateType) |
String |
getMethodName(int methodId) |
String |
getURL() |
void |
getVersion() |
boolean |
isJobCommpleted(int jobID,
String templateType)
Deprecated.
Use isJobCompleted
|
boolean |
isJobCompleted(int jobID,
String templateType) |
boolean |
isJobFailed(int jobID,
String templateType) |
Vector<String> |
logLine(String output) |
org.apache.http.HttpResponse |
makeRequest(int requestType,
String endpoint,
net.sf.json.JSONObject body,
boolean noAuth) |
net.sf.json.JSONObject |
rawLookupByString(String idToCheck,
String api_endpoint) |
void |
releaseToken() |
void |
setDebug(boolean debug) |
void |
setGetFullLogs(boolean getFullLogs) |
void |
setGetWorkflowChildLogs(boolean importChildWorkflowLogs) |
void |
setRemoveColor(boolean removeColor) |
void |
setTrustAllCerts(boolean trustAllCerts) |
int |
submitTemplate(int jobTemplate,
String extraVars,
String limit,
String jobTags,
String skipJobTags,
String jobType,
String inventory,
String credential,
String scmBranch,
String templateType) |
void |
testConnection() |
public static final int GET
public static final int POST
public static final int PATCH
public static final String JOB_TEMPLATE_TYPE
public static final String WORKFLOW_TEMPLATE_TYPE
public void setTrustAllCerts(boolean trustAllCerts)
public void setDebug(boolean debug)
public void setRemoveColor(boolean removeColor)
public void setGetWorkflowChildLogs(boolean importChildWorkflowLogs)
public void setGetFullLogs(boolean getFullLogs)
public org.apache.http.HttpResponse makeRequest(int requestType, String endpoint, net.sf.json.JSONObject body, boolean noAuth) throws AnsibleTowerException, AnsibleTowerItemDoesNotExist
public String getURL()
public void getVersion() throws AnsibleTowerException
AnsibleTowerException
public void testConnection() throws AnsibleTowerException
AnsibleTowerException
public String convertPotentialStringToID(String idToCheck, String api_endpoint) throws AnsibleTowerException, AnsibleTowerItemDoesNotExist
public net.sf.json.JSONObject rawLookupByString(String idToCheck, String api_endpoint) throws AnsibleTowerException, AnsibleTowerItemDoesNotExist
public net.sf.json.JSONObject getJobTemplate(String jobTemplate, String templateType) throws AnsibleTowerException
AnsibleTowerException
public int submitTemplate(int jobTemplate, String extraVars, String limit, String jobTags, String skipJobTags, String jobType, String inventory, String credential, String scmBranch, String templateType) throws AnsibleTowerException
AnsibleTowerException
public void checkTemplateType(String templateType) throws AnsibleTowerException
AnsibleTowerException
public boolean isJobCompleted(int jobID, String templateType) throws AnsibleTowerException
AnsibleTowerException
public void cancelJob(int jobID, String templateType) throws AnsibleTowerException
AnsibleTowerException
@Deprecated public boolean isJobCommpleted(int jobID, String templateType) throws AnsibleTowerException
AnsibleTowerException
public Vector<String> getLogEvents(int jobID, String templateType) throws AnsibleTowerException
AnsibleTowerException
public Vector<String> logLine(String output) throws AnsibleTowerException
AnsibleTowerException
public boolean isJobFailed(int jobID, String templateType) throws AnsibleTowerException
AnsibleTowerException
public void releaseToken()
public String getMethodName(int methodId)
Copyright © 2016–2020. All rights reserved.