use of com.hp.octane.integrations.OctaneClient in project octane-ci-java-sdk by MicroFocus.
the class MfUftConverter method isAddGlobalParameters.
private boolean isAddGlobalParameters(Map<String, String> globalParameters) {
boolean addGlobalParameters = false;
if (globalParameters != null) {
// check job level params
addGlobalParameters = globalParameters.containsKey(SdkConstants.JobParameters.ADD_GLOBAL_PARAMETERS_TO_TESTS_PARAM) && "true".equalsIgnoreCase(globalParameters.getOrDefault(SdkConstants.JobParameters.ADD_GLOBAL_PARAMETERS_TO_TESTS_PARAM, "false"));
// check global param
if (!addGlobalParameters && globalParameters.containsKey(SdkConstants.JobParameters.OCTANE_CONFIG_ID_PARAMETER_NAME)) {
try {
OctaneClient octaneClient = OctaneSDK.getClientByInstanceId(globalParameters.get(SdkConstants.JobParameters.OCTANE_CONFIG_ID_PARAMETER_NAME));
addGlobalParameters = ConfigurationParameterFactory.addGlobalParametersToTests(octaneClient.getConfigurationService().getConfiguration());
} catch (Exception e) {
logger.info("Failed to get octane client by id " + globalParameters.get(SdkConstants.JobParameters.OCTANE_CONFIG_ID_PARAMETER_NAME));
}
}
}
return addGlobalParameters;
}
Aggregations