Search in sources :

Example 1 with LogLevel

use of com.synopsys.integration.log.LogLevel in project synopsys-detect by blackducksoftware.

the class DetectableOptionFactory method createDockerDetectableOptions.

public DockerDetectableOptions createDockerDetectableOptions() {
    Boolean dockerPathRequired = detectConfiguration.getValue(DetectProperties.DETECT_DOCKER_PATH_REQUIRED);
    String suppliedDockerImage = detectConfiguration.getNullableValue(DetectProperties.DETECT_DOCKER_IMAGE);
    String dockerImageId = detectConfiguration.getNullableValue(DetectProperties.DETECT_DOCKER_IMAGE_ID);
    String suppliedDockerTar = detectConfiguration.getNullableValue(DetectProperties.DETECT_DOCKER_TAR);
    LogLevel dockerInspectorLoggingLevel;
    if (detectConfiguration.wasPropertyProvided(DetectProperties.LOGGING_LEVEL_DETECT)) {
        dockerInspectorLoggingLevel = detectConfiguration.getValue(DetectProperties.LOGGING_LEVEL_DETECT);
    } else {
        dockerInspectorLoggingLevel = detectConfiguration.getValue(DetectProperties.LOGGING_LEVEL_COM_SYNOPSYS_INTEGRATION);
    }
    String dockerInspectorVersion = detectConfiguration.getNullableValue(DetectProperties.DETECT_DOCKER_INSPECTOR_VERSION);
    Map<String, String> additionalDockerProperties = detectConfiguration.getRaw(DetectProperties.DOCKER_PASSTHROUGH);
    if (diagnosticSystem != null) {
        additionalDockerProperties.putAll(diagnosticSystem.getAdditionalDockerProperties());
    }
    Path dockerInspectorPath = detectConfiguration.getPathOrNull(DetectProperties.DETECT_DOCKER_INSPECTOR_PATH);
    String dockerPlatformTopLayerId = detectConfiguration.getNullableValue(DetectProperties.DETECT_DOCKER_PLATFORM_TOP_LAYER_ID);
    return new DockerDetectableOptions(dockerPathRequired, suppliedDockerImage, dockerImageId, suppliedDockerTar, dockerInspectorLoggingLevel, dockerInspectorVersion, additionalDockerProperties, dockerInspectorPath, dockerPlatformTopLayerId);
}
Also used : Path(java.nio.file.Path) LogLevel(com.synopsys.integration.log.LogLevel) DockerDetectableOptions(com.synopsys.integration.detectable.detectables.docker.DockerDetectableOptions)

Aggregations

DockerDetectableOptions (com.synopsys.integration.detectable.detectables.docker.DockerDetectableOptions)1 LogLevel (com.synopsys.integration.log.LogLevel)1 Path (java.nio.file.Path)1