Package org.jenkinsci.plugins.vmanager
Class Utils
java.lang.Object
org.jenkinsci.plugins.vmanager.Utils
-
Constructor Summary
ConstructorsConstructorDescriptionUtils()
Utils
(Run run, TaskListener listener) Utils
(Run run, TaskListener listener, FilePath filePath) -
Method Summary
Modifier and TypeMethodDescriptionvoid
batchExecManager
(TaskListener listener, String executionScript, String executionShellLocation, String executionVsifFile, String buildId, int buildNumber, Launcher launcher) checkExtraStaticAttr
(String url, boolean requireAuth, String user, String password, String listOfAttr) checkVAPIConnection
(String url, boolean requireAuth, String user, String password) static void
configureAllowAll
(HttpsURLConnection connection) executeAPI
(String jSON, String apiUrl, String url, boolean requireAuth, String user, String password, String requestMethod, TaskListener listener, boolean dynamicUserId, String buildID, int buildNumber, String workPlacePath, int connConnTimeOut, int connReadTimeout, boolean advConfig) executeVSIFLaunch
(String[] vsifs, String url, boolean requireAuth, String user, String password, TaskListener listener, boolean dynamicUserId, String buildID, int buildNumber, String workPlacePath, int connConnTimeOut, int connReadTimeout, boolean advConfig, String jsonEnvInput, boolean useUserOnFarm, String userFarmType, String[] farmUserPassword, StepHolder stepHolder, String envSourceInputFile, String workingJobDir, VMGRBuildArchiver vMGRBuildArchiver, boolean userPrivateSSHKey, String jsonAttrValuesInput, String executionType, String[] sessionNames, String envSourceInputFileType, Launcher launcher, String jsonDefineInput) static String
getRegressionURLFromVAPIURL
(String vAPIUrl) getVAPIConnection
(String apiUrl, boolean requireAuth, String user, String password, String requestMethod, boolean dynamicUserId, String buildID, int buildNumber, String workPlacePath, TaskListener listener, int connConnTimeOut, int connReadTimeout, boolean advConfig) String[]
loadDataFromInputFiles
(String buildID, int buildNumber, String workPlacePath, String inputFile, TaskListener listener, boolean deleteInputFile, String type, String fileEnding) String[]
loadFileCredentials
(String buildID, int buildNumber, String workPlacePath, String credentialInputFile, TaskListener listener, boolean deleteInputFile) loadFileFromWorkSpace
(String buildID, int buildNumber, String workPlacePath, String inputFile, TaskListener listener, boolean deleteInputFile, String fileTypeEndingName) loadJSONAttrValuesFromTextArea
(String buildID, int buildNumber, String workPlacePath, TaskListener listener, String textarea) loadJSONAttrValuesInput
(String buildID, int buildNumber, String workPlacePath, String attrValuesFile, TaskListener listener) loadJSONDefineInput
(String buildID, int buildNumber, String workPlacePath, String envInputFile, TaskListener listener) loadJSONDefineValuesFromTextArea
(String buildID, int buildNumber, String workPlacePath, TaskListener listener, String textarea) loadJSONEnvInput
(String buildID, int buildNumber, String workPlacePath, String envInputFile, TaskListener listener) loadJSONFromFile
(String buildID, int buildNumber, String workPlacePath, String vInputFile, TaskListener listener, boolean deleteInputFile) loadUserSyntaxForSummaryReport
(String buildID, int buildNumber, String workPlacePath, String inputFile, TaskListener listener, boolean deleteInputFile) void
moveFromNodeToMaster
(String fileName) processErrorFromRespone
(HttpURLConnection conn, TaskListener listener, boolean notInTestMode) readFileOnDisk
(String fileOnDiskPath) void
saveFileOnDisk
(String fileOnDiskPath, String output) standardReadFromDisk
(String fileOnDiskPath) void
standardWriteToDisk
(String fileOnDiskPath, String output) void
waitTillSessionEnds
(String url, boolean requireAuth, String user, String password, TaskListener listener, boolean dynamicUserId, String buildID, int buildNumber, String workPlacePath, int connConnTimeOut, int connReadTimeout, boolean advConfig, StepHolder stepHolder, List listOfSessions, boolean notInTestMode, String workingJobDir, Launcher launcher)
-
Constructor Details
-
Utils
-
Utils
-
Utils
public Utils()
-
-
Method Details
-
getFilePath
-
loadFileFromWorkSpace
public BufferedReader loadFileFromWorkSpace(String buildID, int buildNumber, String workPlacePath, String inputFile, TaskListener listener, boolean deleteInputFile, String fileTypeEndingName) throws Exception - Throws:
Exception
-
loadDataFromInputFiles
public String[] loadDataFromInputFiles(String buildID, int buildNumber, String workPlacePath, String inputFile, TaskListener listener, boolean deleteInputFile, String type, String fileEnding) throws Exception - Throws:
Exception
-
loadUserSyntaxForSummaryReport
public String loadUserSyntaxForSummaryReport(String buildID, int buildNumber, String workPlacePath, String inputFile, TaskListener listener, boolean deleteInputFile) throws Exception - Throws:
Exception
-
loadFileCredentials
public String[] loadFileCredentials(String buildID, int buildNumber, String workPlacePath, String credentialInputFile, TaskListener listener, boolean deleteInputFile) throws Exception - Throws:
Exception
-
loadJSONEnvInput
public String loadJSONEnvInput(String buildID, int buildNumber, String workPlacePath, String envInputFile, TaskListener listener) throws Exception - Throws:
Exception
-
getRegressionURLFromVAPIURL
-
loadJSONAttrValuesInput
public String loadJSONAttrValuesInput(String buildID, int buildNumber, String workPlacePath, String attrValuesFile, TaskListener listener) throws Exception - Throws:
Exception
-
loadJSONDefineInput
public String loadJSONDefineInput(String buildID, int buildNumber, String workPlacePath, String envInputFile, TaskListener listener) throws Exception - Throws:
Exception
-
loadJSONAttrValuesFromTextArea
public String loadJSONAttrValuesFromTextArea(String buildID, int buildNumber, String workPlacePath, TaskListener listener, String textarea) throws Exception - Throws:
Exception
-
loadJSONDefineValuesFromTextArea
public String loadJSONDefineValuesFromTextArea(String buildID, int buildNumber, String workPlacePath, TaskListener listener, String textarea) throws Exception - Throws:
Exception
-
loadJSONFromFile
public String loadJSONFromFile(String buildID, int buildNumber, String workPlacePath, String vInputFile, TaskListener listener, boolean deleteInputFile) throws Exception - Throws:
Exception
-
checkVAPIConnection
public String checkVAPIConnection(String url, boolean requireAuth, String user, String password) throws Exception - Throws:
Exception
-
checkExtraStaticAttr
public String checkExtraStaticAttr(String url, boolean requireAuth, String user, String password, String listOfAttr) throws Exception - Throws:
Exception
-
getVAPIConnection
public HttpURLConnection getVAPIConnection(String apiUrl, boolean requireAuth, String user, String password, String requestMethod, boolean dynamicUserId, String buildID, int buildNumber, String workPlacePath, TaskListener listener, int connConnTimeOut, int connReadTimeout, boolean advConfig) throws Exception - Throws:
Exception
-
executeVSIFLaunch
public String executeVSIFLaunch(String[] vsifs, String url, boolean requireAuth, String user, String password, TaskListener listener, boolean dynamicUserId, String buildID, int buildNumber, String workPlacePath, int connConnTimeOut, int connReadTimeout, boolean advConfig, String jsonEnvInput, boolean useUserOnFarm, String userFarmType, String[] farmUserPassword, StepHolder stepHolder, String envSourceInputFile, String workingJobDir, VMGRBuildArchiver vMGRBuildArchiver, boolean userPrivateSSHKey, String jsonAttrValuesInput, String executionType, String[] sessionNames, String envSourceInputFileType, Launcher launcher, String jsonDefineInput) throws Exception - Throws:
Exception
-
executeAPI
public String executeAPI(String jSON, String apiUrl, String url, boolean requireAuth, String user, String password, String requestMethod, TaskListener listener, boolean dynamicUserId, String buildID, int buildNumber, String workPlacePath, int connConnTimeOut, int connReadTimeout, boolean advConfig) throws Exception - Throws:
Exception
-
waitTillSessionEnds
public void waitTillSessionEnds(String url, boolean requireAuth, String user, String password, TaskListener listener, boolean dynamicUserId, String buildID, int buildNumber, String workPlacePath, int connConnTimeOut, int connReadTimeout, boolean advConfig, StepHolder stepHolder, List listOfSessions, boolean notInTestMode, String workingJobDir, Launcher launcher) throws Exception - Throws:
Exception
-
configureAllowAll
-
processErrorFromRespone
public String processErrorFromRespone(HttpURLConnection conn, TaskListener listener, boolean notInTestMode) throws IOException - Throws:
IOException
-
saveFileOnDisk
- Throws:
IOException
-
readFileOnDisk
- Throws:
IOException
-
standardWriteToDisk
- Throws:
IOException
-
standardReadFromDisk
- Throws:
IOException
-
moveFromNodeToMaster
- Throws:
IOException
InterruptedException
-
batchExecManager
public void batchExecManager(TaskListener listener, String executionScript, String executionShellLocation, String executionVsifFile, String buildId, int buildNumber, Launcher launcher) throws IOException - Throws:
IOException
-