diff --git a/.github/CODEOWNERS b/.github/CODEOWNERS index 920c0e9741..6a9b050347 100644 --- a/.github/CODEOWNERS +++ b/.github/CODEOWNERS @@ -27,7 +27,6 @@ infrastructures/** @garagatyi plugins/plugin*debugger/** @tolusha plugins/plugin-gdb/** @tolusha plugins/plugin-docker/** @garagatyi -plugins/plugin-docker/che-plugin-openshift-client/** @l0rd plugins/plugin-java/** @evidolob plugins/plugin-languageserver/** @evidolob @dkuleshov plugins/plugin-maven/** @evidolob diff --git a/assembly-multiuser/assembly-wsmaster-war/pom.xml b/assembly-multiuser/assembly-wsmaster-war/pom.xml index b66f370906..765c2570e7 100644 --- a/assembly-multiuser/assembly-wsmaster-war/pom.xml +++ b/assembly-multiuser/assembly-wsmaster-war/pom.xml @@ -27,10 +27,6 @@ assembly-wsmaster-war war - - org.eclipse.che - infrastructure-openshift - org.eclipse.che.core che-core-api-factory @@ -51,6 +47,10 @@ org.eclipse.che.core che-core-db-vendor-postgresql + + org.eclipse.che.infrastructure + infrastructure-openshift + org.eclipse.che.multiuser che-multiuser-api-authorization-impl diff --git a/assembly/assembly-ide-war/pom.xml b/assembly/assembly-ide-war/pom.xml index 789d899e4a..370320997f 100644 --- a/assembly/assembly-ide-war/pom.xml +++ b/assembly/assembly-ide-war/pom.xml @@ -31,6 +31,10 @@ org.eclipse.che.core che-ide-core + + org.eclipse.che.infrastructure.docker + docker-client + org.eclipse.che.plugin che-plugin-activity-ide @@ -51,10 +55,6 @@ org.eclipse.che.plugin che-plugin-debugger-ide - - org.eclipse.che.plugin - che-plugin-docker-client - org.eclipse.che.plugin che-plugin-ext-dashboard-client @@ -143,10 +143,6 @@ org.eclipse.che.plugin che-plugin-nodejs-lang-shared - - org.eclipse.che.plugin - che-plugin-openshift-client - org.eclipse.che.plugin che-plugin-orion-compare diff --git a/assembly/assembly-wsmaster-war/pom.xml b/assembly/assembly-wsmaster-war/pom.xml index 76b6b1941b..291c90d7fd 100644 --- a/assembly/assembly-wsmaster-war/pom.xml +++ b/assembly/assembly-wsmaster-war/pom.xml @@ -76,14 +76,6 @@ org.eclipse.che git-credentials-agent - - org.eclipse.che - infrastructure-docker - - - org.eclipse.che - infrastructure-openshift - org.eclipse.che ls-csharp-agent @@ -196,6 +188,18 @@ org.eclipse.che.core wsmaster-local + + org.eclipse.che.infrastructure + infrastructure-openshift + + + org.eclipse.che.infrastructure.docker + docker-client + + + org.eclipse.che.infrastructure.docker + infrastructure-docker + org.eclipse.che.lib che-swagger-module @@ -204,15 +208,6 @@ org.eclipse.che.plugin che-plugin-activity-wsmaster - - org.eclipse.che.plugin - che-plugin-docker-client - - - - - - org.eclipse.che.plugin che-plugin-github-factory-resolver @@ -225,23 +220,6 @@ org.eclipse.che.plugin che-plugin-github-shared - - - - - - - org.eclipse.che.plugin - che-plugin-maven-wsmaster - - - org.eclipse.che.plugin - che-plugin-openshift-client - - - org.eclipse.che.plugin - che-plugin-traefik-docker - org.eclipse.che.plugin che-plugin-url-factory diff --git a/plugins/plugin-docker/che-plugin-docker-client/pom.xml b/infrastructures/docker/docker-client/pom.xml similarity index 92% rename from plugins/plugin-docker/che-plugin-docker-client/pom.xml rename to infrastructures/docker/docker-client/pom.xml index 800576f471..f6f1874c45 100644 --- a/plugins/plugin-docker/che-plugin-docker-client/pom.xml +++ b/infrastructures/docker/docker-client/pom.xml @@ -14,13 +14,14 @@ 4.0.0 - che-plugin-docker-parent - org.eclipse.che.plugin + che-infrastructures-docker-parent + org.eclipse.che.infrastructure.docker 5.20.0-SNAPSHOT + ../pom.xml - che-plugin-docker-client + docker-client jar - Che Plugin :: Docker :: Docker Client + Infrastructure :: Docker :: Docker Client false @@ -154,18 +155,18 @@ - org.eclipse.che.plugin.docker.client.dto + org.eclipse.che.infrastructure.docker.client.dto ${dto-generator-out-directory} - org.eclipse.che.plugin.docker.client.dto.DtoServerImpls + org.eclipse.che.infrastructure.docker.client.dto.DtoServerImpls server - org.eclipse.che.plugin - che-plugin-docker-client + org.eclipse.che.infrastructure.docker + docker-client ${project.version} diff --git a/plugins/plugin-docker/che-plugin-docker-client/src/main/java/org/eclipse/che/plugin/docker/client/CLibrary.java b/infrastructures/docker/docker-client/src/main/java/org/eclipse/che/infrastructure/docker/client/CLibrary.java similarity index 97% rename from plugins/plugin-docker/che-plugin-docker-client/src/main/java/org/eclipse/che/plugin/docker/client/CLibrary.java rename to infrastructures/docker/docker-client/src/main/java/org/eclipse/che/infrastructure/docker/client/CLibrary.java index 1eedd81d50..20ed03a3bb 100644 --- a/plugins/plugin-docker/che-plugin-docker-client/src/main/java/org/eclipse/che/plugin/docker/client/CLibrary.java +++ b/infrastructures/docker/docker-client/src/main/java/org/eclipse/che/infrastructure/docker/client/CLibrary.java @@ -8,7 +8,7 @@ * Contributors: * Red Hat, Inc. - initial API and implementation */ -package org.eclipse.che.plugin.docker.client; +package org.eclipse.che.infrastructure.docker.client; import com.sun.jna.Library; import com.sun.jna.Structure; diff --git a/plugins/plugin-docker/che-plugin-docker-client/src/main/java/org/eclipse/che/plugin/docker/client/CLibraryFactory.java b/infrastructures/docker/docker-client/src/main/java/org/eclipse/che/infrastructure/docker/client/CLibraryFactory.java similarity index 95% rename from plugins/plugin-docker/che-plugin-docker-client/src/main/java/org/eclipse/che/plugin/docker/client/CLibraryFactory.java rename to infrastructures/docker/docker-client/src/main/java/org/eclipse/che/infrastructure/docker/client/CLibraryFactory.java index ea7ef15d1f..dc4b86acb5 100644 --- a/plugins/plugin-docker/che-plugin-docker-client/src/main/java/org/eclipse/che/plugin/docker/client/CLibraryFactory.java +++ b/infrastructures/docker/docker-client/src/main/java/org/eclipse/che/infrastructure/docker/client/CLibraryFactory.java @@ -8,7 +8,7 @@ * Contributors: * Red Hat, Inc. - initial API and implementation */ -package org.eclipse.che.plugin.docker.client; +package org.eclipse.che.infrastructure.docker.client; import com.sun.jna.Native; import org.eclipse.che.api.core.util.SystemInfo; diff --git a/plugins/plugin-docker/che-plugin-docker-client/src/main/java/org/eclipse/che/plugin/docker/client/CgroupOOMDetector.java b/infrastructures/docker/docker-client/src/main/java/org/eclipse/che/infrastructure/docker/client/CgroupOOMDetector.java similarity index 98% rename from plugins/plugin-docker/che-plugin-docker-client/src/main/java/org/eclipse/che/plugin/docker/client/CgroupOOMDetector.java rename to infrastructures/docker/docker-client/src/main/java/org/eclipse/che/infrastructure/docker/client/CgroupOOMDetector.java index 5c22feb808..aa2d5bf8ba 100644 --- a/plugins/plugin-docker/che-plugin-docker-client/src/main/java/org/eclipse/che/plugin/docker/client/CgroupOOMDetector.java +++ b/infrastructures/docker/docker-client/src/main/java/org/eclipse/che/infrastructure/docker/client/CgroupOOMDetector.java @@ -8,9 +8,7 @@ * Contributors: * Red Hat, Inc. - initial API and implementation */ -package org.eclipse.che.plugin.docker.client; - -import static org.eclipse.che.plugin.docker.client.CLibraryFactory.getCLibrary; +package org.eclipse.che.infrastructure.docker.client; import com.google.common.util.concurrent.ThreadFactoryBuilder; import com.sun.jna.ptr.LongByReference; @@ -186,7 +184,7 @@ public class CgroupOOMDetector implements DockerOOMDetector { this.container = container; this.containerLogProcessor = containerLogProcessor; this.memory = memory; - cLib = getCLibrary(); + cLib = CLibraryFactory.getCLibrary(); if (systemd) { containerCgroup = cgroupMount + "/memory/system.slice/docker-" + container + ".scope/"; diff --git a/plugins/plugin-docker/che-plugin-docker-client/src/main/java/org/eclipse/che/plugin/docker/client/DockerApiVersionPathPrefixProvider.java b/infrastructures/docker/docker-client/src/main/java/org/eclipse/che/infrastructure/docker/client/DockerApiVersionPathPrefixProvider.java similarity index 97% rename from plugins/plugin-docker/che-plugin-docker-client/src/main/java/org/eclipse/che/plugin/docker/client/DockerApiVersionPathPrefixProvider.java rename to infrastructures/docker/docker-client/src/main/java/org/eclipse/che/infrastructure/docker/client/DockerApiVersionPathPrefixProvider.java index b67f1953d4..307508602b 100644 --- a/plugins/plugin-docker/che-plugin-docker-client/src/main/java/org/eclipse/che/plugin/docker/client/DockerApiVersionPathPrefixProvider.java +++ b/infrastructures/docker/docker-client/src/main/java/org/eclipse/che/infrastructure/docker/client/DockerApiVersionPathPrefixProvider.java @@ -8,7 +8,7 @@ * Contributors: * Red Hat, Inc. - initial API and implementation */ -package org.eclipse.che.plugin.docker.client; +package org.eclipse.che.infrastructure.docker.client; import static java.lang.String.format; diff --git a/plugins/plugin-docker/che-plugin-docker-client/src/main/java/org/eclipse/che/plugin/docker/client/DockerCertificates.java b/infrastructures/docker/docker-client/src/main/java/org/eclipse/che/infrastructure/docker/client/DockerCertificates.java similarity index 99% rename from plugins/plugin-docker/che-plugin-docker-client/src/main/java/org/eclipse/che/plugin/docker/client/DockerCertificates.java rename to infrastructures/docker/docker-client/src/main/java/org/eclipse/che/infrastructure/docker/client/DockerCertificates.java index 9b979b3405..97ce4c39c3 100644 --- a/plugins/plugin-docker/che-plugin-docker-client/src/main/java/org/eclipse/che/plugin/docker/client/DockerCertificates.java +++ b/infrastructures/docker/docker-client/src/main/java/org/eclipse/che/infrastructure/docker/client/DockerCertificates.java @@ -8,7 +8,7 @@ * Contributors: * Red Hat, Inc. - initial API and implementation */ -package org.eclipse.che.plugin.docker.client; +package org.eclipse.che.infrastructure.docker.client; import java.io.File; import java.io.IOException; diff --git a/plugins/plugin-docker/che-plugin-docker-client/src/main/java/org/eclipse/che/plugin/docker/client/DockerConnector.java b/infrastructures/docker/docker-client/src/main/java/org/eclipse/che/infrastructure/docker/client/DockerConnector.java similarity index 92% rename from plugins/plugin-docker/che-plugin-docker-client/src/main/java/org/eclipse/che/plugin/docker/client/DockerConnector.java rename to infrastructures/docker/docker-client/src/main/java/org/eclipse/che/infrastructure/docker/client/DockerConnector.java index 3de10310f9..0d1836e5dd 100644 --- a/plugins/plugin-docker/che-plugin-docker-client/src/main/java/org/eclipse/che/plugin/docker/client/DockerConnector.java +++ b/infrastructures/docker/docker-client/src/main/java/org/eclipse/che/infrastructure/docker/client/DockerConnector.java @@ -8,7 +8,7 @@ * Contributors: * Red Hat, Inc. - initial API and implementation */ -package org.eclipse.che.plugin.docker.client; +package org.eclipse.che.infrastructure.docker.client; import static com.google.common.base.MoreObjects.firstNonNull; import static com.google.common.net.UrlEscapers.urlPathSegmentEscaper; @@ -51,67 +51,67 @@ import org.eclipse.che.commons.annotation.Nullable; import org.eclipse.che.commons.lang.TarUtils; import org.eclipse.che.commons.lang.concurrent.LoggingUncaughtExceptionHandler; import org.eclipse.che.commons.lang.ws.rs.ExtMediaType; -import org.eclipse.che.plugin.docker.client.connection.CloseConnectionInputStream; -import org.eclipse.che.plugin.docker.client.connection.DockerConnection; -import org.eclipse.che.plugin.docker.client.connection.DockerConnectionFactory; -import org.eclipse.che.plugin.docker.client.connection.DockerResponse; -import org.eclipse.che.plugin.docker.client.exception.ContainerNotFoundException; -import org.eclipse.che.plugin.docker.client.exception.DockerException; -import org.eclipse.che.plugin.docker.client.exception.ExecNotFoundException; -import org.eclipse.che.plugin.docker.client.exception.ImageNotFoundException; -import org.eclipse.che.plugin.docker.client.exception.NetworkNotFoundException; -import org.eclipse.che.plugin.docker.client.json.ContainerCommitted; -import org.eclipse.che.plugin.docker.client.json.ContainerCreated; -import org.eclipse.che.plugin.docker.client.json.ContainerExitStatus; -import org.eclipse.che.plugin.docker.client.json.ContainerInfo; -import org.eclipse.che.plugin.docker.client.json.ContainerListEntry; -import org.eclipse.che.plugin.docker.client.json.ContainerProcesses; -import org.eclipse.che.plugin.docker.client.json.Event; -import org.eclipse.che.plugin.docker.client.json.ExecConfig; -import org.eclipse.che.plugin.docker.client.json.ExecCreated; -import org.eclipse.che.plugin.docker.client.json.ExecInfo; -import org.eclipse.che.plugin.docker.client.json.ExecStart; -import org.eclipse.che.plugin.docker.client.json.Filters; -import org.eclipse.che.plugin.docker.client.json.Image; -import org.eclipse.che.plugin.docker.client.json.ImageInfo; -import org.eclipse.che.plugin.docker.client.json.NetworkCreated; -import org.eclipse.che.plugin.docker.client.json.ProgressStatus; -import org.eclipse.che.plugin.docker.client.json.SystemInfo; -import org.eclipse.che.plugin.docker.client.json.Version; -import org.eclipse.che.plugin.docker.client.json.network.ConnectContainer; -import org.eclipse.che.plugin.docker.client.json.network.DisconnectContainer; -import org.eclipse.che.plugin.docker.client.json.network.Network; -import org.eclipse.che.plugin.docker.client.params.AttachContainerParams; -import org.eclipse.che.plugin.docker.client.params.BuildImageParams; -import org.eclipse.che.plugin.docker.client.params.CommitParams; -import org.eclipse.che.plugin.docker.client.params.CreateContainerParams; -import org.eclipse.che.plugin.docker.client.params.CreateExecParams; -import org.eclipse.che.plugin.docker.client.params.GetContainerLogsParams; -import org.eclipse.che.plugin.docker.client.params.GetEventsParams; -import org.eclipse.che.plugin.docker.client.params.GetExecInfoParams; -import org.eclipse.che.plugin.docker.client.params.GetResourceParams; -import org.eclipse.che.plugin.docker.client.params.InspectContainerParams; -import org.eclipse.che.plugin.docker.client.params.InspectImageParams; -import org.eclipse.che.plugin.docker.client.params.KillContainerParams; -import org.eclipse.che.plugin.docker.client.params.ListContainersParams; -import org.eclipse.che.plugin.docker.client.params.ListImagesParams; -import org.eclipse.che.plugin.docker.client.params.PullParams; -import org.eclipse.che.plugin.docker.client.params.PushParams; -import org.eclipse.che.plugin.docker.client.params.PutResourceParams; -import org.eclipse.che.plugin.docker.client.params.RemoveContainerParams; -import org.eclipse.che.plugin.docker.client.params.RemoveImageParams; -import org.eclipse.che.plugin.docker.client.params.StartContainerParams; -import org.eclipse.che.plugin.docker.client.params.StartExecParams; -import org.eclipse.che.plugin.docker.client.params.StopContainerParams; -import org.eclipse.che.plugin.docker.client.params.TagParams; -import org.eclipse.che.plugin.docker.client.params.TopParams; -import org.eclipse.che.plugin.docker.client.params.WaitContainerParams; -import org.eclipse.che.plugin.docker.client.params.network.ConnectContainerToNetworkParams; -import org.eclipse.che.plugin.docker.client.params.network.CreateNetworkParams; -import org.eclipse.che.plugin.docker.client.params.network.DisconnectContainerFromNetworkParams; -import org.eclipse.che.plugin.docker.client.params.network.GetNetworksParams; -import org.eclipse.che.plugin.docker.client.params.network.InspectNetworkParams; -import org.eclipse.che.plugin.docker.client.params.network.RemoveNetworkParams; +import org.eclipse.che.infrastructure.docker.client.connection.CloseConnectionInputStream; +import org.eclipse.che.infrastructure.docker.client.connection.DockerConnection; +import org.eclipse.che.infrastructure.docker.client.connection.DockerConnectionFactory; +import org.eclipse.che.infrastructure.docker.client.connection.DockerResponse; +import org.eclipse.che.infrastructure.docker.client.exception.ContainerNotFoundException; +import org.eclipse.che.infrastructure.docker.client.exception.DockerException; +import org.eclipse.che.infrastructure.docker.client.exception.ExecNotFoundException; +import org.eclipse.che.infrastructure.docker.client.exception.ImageNotFoundException; +import org.eclipse.che.infrastructure.docker.client.exception.NetworkNotFoundException; +import org.eclipse.che.infrastructure.docker.client.json.ContainerCommitted; +import org.eclipse.che.infrastructure.docker.client.json.ContainerCreated; +import org.eclipse.che.infrastructure.docker.client.json.ContainerExitStatus; +import org.eclipse.che.infrastructure.docker.client.json.ContainerInfo; +import org.eclipse.che.infrastructure.docker.client.json.ContainerListEntry; +import org.eclipse.che.infrastructure.docker.client.json.ContainerProcesses; +import org.eclipse.che.infrastructure.docker.client.json.Event; +import org.eclipse.che.infrastructure.docker.client.json.ExecConfig; +import org.eclipse.che.infrastructure.docker.client.json.ExecCreated; +import org.eclipse.che.infrastructure.docker.client.json.ExecInfo; +import org.eclipse.che.infrastructure.docker.client.json.ExecStart; +import org.eclipse.che.infrastructure.docker.client.json.Filters; +import org.eclipse.che.infrastructure.docker.client.json.Image; +import org.eclipse.che.infrastructure.docker.client.json.ImageInfo; +import org.eclipse.che.infrastructure.docker.client.json.NetworkCreated; +import org.eclipse.che.infrastructure.docker.client.json.ProgressStatus; +import org.eclipse.che.infrastructure.docker.client.json.SystemInfo; +import org.eclipse.che.infrastructure.docker.client.json.Version; +import org.eclipse.che.infrastructure.docker.client.json.network.ConnectContainer; +import org.eclipse.che.infrastructure.docker.client.json.network.DisconnectContainer; +import org.eclipse.che.infrastructure.docker.client.json.network.Network; +import org.eclipse.che.infrastructure.docker.client.params.AttachContainerParams; +import org.eclipse.che.infrastructure.docker.client.params.BuildImageParams; +import org.eclipse.che.infrastructure.docker.client.params.CommitParams; +import org.eclipse.che.infrastructure.docker.client.params.CreateContainerParams; +import org.eclipse.che.infrastructure.docker.client.params.CreateExecParams; +import org.eclipse.che.infrastructure.docker.client.params.GetContainerLogsParams; +import org.eclipse.che.infrastructure.docker.client.params.GetEventsParams; +import org.eclipse.che.infrastructure.docker.client.params.GetExecInfoParams; +import org.eclipse.che.infrastructure.docker.client.params.GetResourceParams; +import org.eclipse.che.infrastructure.docker.client.params.InspectContainerParams; +import org.eclipse.che.infrastructure.docker.client.params.InspectImageParams; +import org.eclipse.che.infrastructure.docker.client.params.KillContainerParams; +import org.eclipse.che.infrastructure.docker.client.params.ListContainersParams; +import org.eclipse.che.infrastructure.docker.client.params.ListImagesParams; +import org.eclipse.che.infrastructure.docker.client.params.PullParams; +import org.eclipse.che.infrastructure.docker.client.params.PushParams; +import org.eclipse.che.infrastructure.docker.client.params.PutResourceParams; +import org.eclipse.che.infrastructure.docker.client.params.RemoveContainerParams; +import org.eclipse.che.infrastructure.docker.client.params.RemoveImageParams; +import org.eclipse.che.infrastructure.docker.client.params.StartContainerParams; +import org.eclipse.che.infrastructure.docker.client.params.StartExecParams; +import org.eclipse.che.infrastructure.docker.client.params.StopContainerParams; +import org.eclipse.che.infrastructure.docker.client.params.TagParams; +import org.eclipse.che.infrastructure.docker.client.params.TopParams; +import org.eclipse.che.infrastructure.docker.client.params.WaitContainerParams; +import org.eclipse.che.infrastructure.docker.client.params.network.ConnectContainerToNetworkParams; +import org.eclipse.che.infrastructure.docker.client.params.network.CreateNetworkParams; +import org.eclipse.che.infrastructure.docker.client.params.network.DisconnectContainerFromNetworkParams; +import org.eclipse.che.infrastructure.docker.client.params.network.GetNetworksParams; +import org.eclipse.che.infrastructure.docker.client.params.network.InspectNetworkParams; +import org.eclipse.che.infrastructure.docker.client.params.network.RemoveNetworkParams; import org.slf4j.Logger; import org.slf4j.LoggerFactory; diff --git a/plugins/plugin-docker/che-plugin-docker-client/src/main/java/org/eclipse/che/plugin/docker/client/DockerConnectorConfiguration.java b/infrastructures/docker/docker-client/src/main/java/org/eclipse/che/infrastructure/docker/client/DockerConnectorConfiguration.java similarity index 98% rename from plugins/plugin-docker/che-plugin-docker-client/src/main/java/org/eclipse/che/plugin/docker/client/DockerConnectorConfiguration.java rename to infrastructures/docker/docker-client/src/main/java/org/eclipse/che/infrastructure/docker/client/DockerConnectorConfiguration.java index c03f6c1393..d264cecfef 100644 --- a/plugins/plugin-docker/che-plugin-docker-client/src/main/java/org/eclipse/che/plugin/docker/client/DockerConnectorConfiguration.java +++ b/infrastructures/docker/docker-client/src/main/java/org/eclipse/che/infrastructure/docker/client/DockerConnectorConfiguration.java @@ -8,7 +8,7 @@ * Contributors: * Red Hat, Inc. - initial API and implementation */ -package org.eclipse.che.plugin.docker.client; +package org.eclipse.che.infrastructure.docker.client; import static java.io.File.separatorChar; @@ -25,7 +25,7 @@ import java.util.regex.Matcher; import java.util.regex.Pattern; import javax.validation.constraints.NotNull; import org.eclipse.che.api.core.util.SystemInfo; -import org.eclipse.che.plugin.docker.client.helper.NetworkFinder; +import org.eclipse.che.infrastructure.docker.client.helper.NetworkFinder; import org.slf4j.Logger; import org.slf4j.LoggerFactory; diff --git a/plugins/plugin-docker/che-plugin-docker-client/src/main/java/org/eclipse/che/plugin/docker/client/DockerConnectorProvider.java b/infrastructures/docker/docker-client/src/main/java/org/eclipse/che/infrastructure/docker/client/DockerConnectorProvider.java similarity index 96% rename from plugins/plugin-docker/che-plugin-docker-client/src/main/java/org/eclipse/che/plugin/docker/client/DockerConnectorProvider.java rename to infrastructures/docker/docker-client/src/main/java/org/eclipse/che/infrastructure/docker/client/DockerConnectorProvider.java index 28c9fea122..a2df73928b 100644 --- a/plugins/plugin-docker/che-plugin-docker-client/src/main/java/org/eclipse/che/plugin/docker/client/DockerConnectorProvider.java +++ b/infrastructures/docker/docker-client/src/main/java/org/eclipse/che/infrastructure/docker/client/DockerConnectorProvider.java @@ -8,7 +8,7 @@ * Contributors: * Red Hat, Inc. - initial API and implementation */ -package org.eclipse.che.plugin.docker.client; +package org.eclipse.che.infrastructure.docker.client; import com.google.inject.Inject; import com.google.inject.Provider; diff --git a/plugins/plugin-docker/che-plugin-docker-client/src/main/java/org/eclipse/che/plugin/docker/client/DockerFileException.java b/infrastructures/docker/docker-client/src/main/java/org/eclipse/che/infrastructure/docker/client/DockerFileException.java similarity index 94% rename from plugins/plugin-docker/che-plugin-docker-client/src/main/java/org/eclipse/che/plugin/docker/client/DockerFileException.java rename to infrastructures/docker/docker-client/src/main/java/org/eclipse/che/infrastructure/docker/client/DockerFileException.java index 0a8f880d71..f6619ae2e7 100644 --- a/plugins/plugin-docker/che-plugin-docker-client/src/main/java/org/eclipse/che/plugin/docker/client/DockerFileException.java +++ b/infrastructures/docker/docker-client/src/main/java/org/eclipse/che/infrastructure/docker/client/DockerFileException.java @@ -8,7 +8,7 @@ * Contributors: * Red Hat, Inc. - initial API and implementation */ -package org.eclipse.che.plugin.docker.client; +package org.eclipse.che.infrastructure.docker.client; import org.eclipse.che.api.core.ApiException; import org.eclipse.che.api.core.rest.shared.dto.ServiceError; diff --git a/plugins/plugin-docker/che-plugin-docker-client/src/main/java/org/eclipse/che/plugin/docker/client/DockerImage.java b/infrastructures/docker/docker-client/src/main/java/org/eclipse/che/infrastructure/docker/client/DockerImage.java similarity index 97% rename from plugins/plugin-docker/che-plugin-docker-client/src/main/java/org/eclipse/che/plugin/docker/client/DockerImage.java rename to infrastructures/docker/docker-client/src/main/java/org/eclipse/che/infrastructure/docker/client/DockerImage.java index 6e977e263d..3d1aa1d2a8 100644 --- a/plugins/plugin-docker/che-plugin-docker-client/src/main/java/org/eclipse/che/plugin/docker/client/DockerImage.java +++ b/infrastructures/docker/docker-client/src/main/java/org/eclipse/che/infrastructure/docker/client/DockerImage.java @@ -8,7 +8,7 @@ * Contributors: * Red Hat, Inc. - initial API and implementation */ -package org.eclipse.che.plugin.docker.client; +package org.eclipse.che.infrastructure.docker.client; import java.util.LinkedHashMap; import java.util.LinkedList; diff --git a/plugins/plugin-docker/che-plugin-docker-client/src/main/java/org/eclipse/che/plugin/docker/client/DockerOOMDetector.java b/infrastructures/docker/docker-client/src/main/java/org/eclipse/che/infrastructure/docker/client/DockerOOMDetector.java similarity index 96% rename from plugins/plugin-docker/che-plugin-docker-client/src/main/java/org/eclipse/che/plugin/docker/client/DockerOOMDetector.java rename to infrastructures/docker/docker-client/src/main/java/org/eclipse/che/infrastructure/docker/client/DockerOOMDetector.java index db4f1d0926..1b5e978d65 100644 --- a/plugins/plugin-docker/che-plugin-docker-client/src/main/java/org/eclipse/che/plugin/docker/client/DockerOOMDetector.java +++ b/infrastructures/docker/docker-client/src/main/java/org/eclipse/che/infrastructure/docker/client/DockerOOMDetector.java @@ -8,7 +8,7 @@ * Contributors: * Red Hat, Inc. - initial API and implementation */ -package org.eclipse.che.plugin.docker.client; +package org.eclipse.che.infrastructure.docker.client; import com.google.inject.ImplementedBy; diff --git a/plugins/plugin-docker/che-plugin-docker-client/src/main/java/org/eclipse/che/plugin/docker/client/DockerRegistryAuthResolver.java b/infrastructures/docker/docker-client/src/main/java/org/eclipse/che/infrastructure/docker/client/DockerRegistryAuthResolver.java similarity index 96% rename from plugins/plugin-docker/che-plugin-docker-client/src/main/java/org/eclipse/che/plugin/docker/client/DockerRegistryAuthResolver.java rename to infrastructures/docker/docker-client/src/main/java/org/eclipse/che/infrastructure/docker/client/DockerRegistryAuthResolver.java index 8ab02b17ad..8d0a40c2e1 100644 --- a/plugins/plugin-docker/che-plugin-docker-client/src/main/java/org/eclipse/che/plugin/docker/client/DockerRegistryAuthResolver.java +++ b/infrastructures/docker/docker-client/src/main/java/org/eclipse/che/infrastructure/docker/client/DockerRegistryAuthResolver.java @@ -8,7 +8,7 @@ * Contributors: * Red Hat, Inc. - initial API and implementation */ -package org.eclipse.che.plugin.docker.client; +package org.eclipse.che.infrastructure.docker.client; import static com.google.common.collect.Sets.newHashSet; @@ -20,8 +20,8 @@ import java.util.Map; import java.util.Set; import org.eclipse.che.commons.annotation.Nullable; import org.eclipse.che.commons.json.JsonHelper; -import org.eclipse.che.plugin.docker.client.dto.AuthConfig; -import org.eclipse.che.plugin.docker.client.dto.AuthConfigs; +import org.eclipse.che.infrastructure.docker.client.dto.AuthConfig; +import org.eclipse.che.infrastructure.docker.client.dto.AuthConfigs; /** * Class for preparing auth header value for docker registry. diff --git a/plugins/plugin-docker/che-plugin-docker-client/src/main/java/org/eclipse/che/plugin/docker/client/DockerRegistryChecker.java b/infrastructures/docker/docker-client/src/main/java/org/eclipse/che/infrastructure/docker/client/DockerRegistryChecker.java similarity index 97% rename from plugins/plugin-docker/che-plugin-docker-client/src/main/java/org/eclipse/che/plugin/docker/client/DockerRegistryChecker.java rename to infrastructures/docker/docker-client/src/main/java/org/eclipse/che/infrastructure/docker/client/DockerRegistryChecker.java index 5015d8ac98..dc8006fa78 100644 --- a/plugins/plugin-docker/che-plugin-docker-client/src/main/java/org/eclipse/che/plugin/docker/client/DockerRegistryChecker.java +++ b/infrastructures/docker/docker-client/src/main/java/org/eclipse/che/infrastructure/docker/client/DockerRegistryChecker.java @@ -8,7 +8,7 @@ * Contributors: * Red Hat, Inc. - initial API and implementation */ -package org.eclipse.che.plugin.docker.client; +package org.eclipse.che.infrastructure.docker.client; import static com.google.common.base.Strings.isNullOrEmpty; diff --git a/plugins/plugin-docker/che-plugin-docker-client/src/main/java/org/eclipse/che/plugin/docker/client/DockerRegistryDynamicAuthResolver.java b/infrastructures/docker/docker-client/src/main/java/org/eclipse/che/infrastructure/docker/client/DockerRegistryDynamicAuthResolver.java similarity index 91% rename from plugins/plugin-docker/che-plugin-docker-client/src/main/java/org/eclipse/che/plugin/docker/client/DockerRegistryDynamicAuthResolver.java rename to infrastructures/docker/docker-client/src/main/java/org/eclipse/che/infrastructure/docker/client/DockerRegistryDynamicAuthResolver.java index 91d7110c37..96fbd36d44 100644 --- a/plugins/plugin-docker/che-plugin-docker-client/src/main/java/org/eclipse/che/plugin/docker/client/DockerRegistryDynamicAuthResolver.java +++ b/infrastructures/docker/docker-client/src/main/java/org/eclipse/che/infrastructure/docker/client/DockerRegistryDynamicAuthResolver.java @@ -8,11 +8,11 @@ * Contributors: * Red Hat, Inc. - initial API and implementation */ -package org.eclipse.che.plugin.docker.client; +package org.eclipse.che.infrastructure.docker.client; import java.util.Map; import org.eclipse.che.commons.annotation.Nullable; -import org.eclipse.che.plugin.docker.client.dto.AuthConfig; +import org.eclipse.che.infrastructure.docker.client.dto.AuthConfig; /** * Resolves dynamic auth config for docker registries. diff --git a/plugins/plugin-docker/che-plugin-docker-client/src/main/java/org/eclipse/che/plugin/docker/client/Dockerfile.java b/infrastructures/docker/docker-client/src/main/java/org/eclipse/che/infrastructure/docker/client/Dockerfile.java similarity index 99% rename from plugins/plugin-docker/che-plugin-docker-client/src/main/java/org/eclipse/che/plugin/docker/client/Dockerfile.java rename to infrastructures/docker/docker-client/src/main/java/org/eclipse/che/infrastructure/docker/client/Dockerfile.java index e60151c6a3..00cde327ce 100644 --- a/plugins/plugin-docker/che-plugin-docker-client/src/main/java/org/eclipse/che/plugin/docker/client/Dockerfile.java +++ b/infrastructures/docker/docker-client/src/main/java/org/eclipse/che/infrastructure/docker/client/Dockerfile.java @@ -8,7 +8,7 @@ * Contributors: * Red Hat, Inc. - initial API and implementation */ -package org.eclipse.che.plugin.docker.client; +package org.eclipse.che.infrastructure.docker.client; import java.io.FileWriter; import java.io.IOException; diff --git a/plugins/plugin-docker/che-plugin-docker-client/src/main/java/org/eclipse/che/plugin/docker/client/DockerfileParser.java b/infrastructures/docker/docker-client/src/main/java/org/eclipse/che/infrastructure/docker/client/DockerfileParser.java similarity index 99% rename from plugins/plugin-docker/che-plugin-docker-client/src/main/java/org/eclipse/che/plugin/docker/client/DockerfileParser.java rename to infrastructures/docker/docker-client/src/main/java/org/eclipse/che/infrastructure/docker/client/DockerfileParser.java index b68a99b148..f5109f267d 100644 --- a/plugins/plugin-docker/che-plugin-docker-client/src/main/java/org/eclipse/che/plugin/docker/client/DockerfileParser.java +++ b/infrastructures/docker/docker-client/src/main/java/org/eclipse/che/infrastructure/docker/client/DockerfileParser.java @@ -8,7 +8,7 @@ * Contributors: * Red Hat, Inc. - initial API and implementation */ -package org.eclipse.che.plugin.docker.client; +package org.eclipse.che.infrastructure.docker.client; import com.google.common.io.CharSource; import com.google.common.io.CharStreams; diff --git a/plugins/plugin-docker/che-plugin-docker-client/src/main/java/org/eclipse/che/plugin/docker/client/Exec.java b/infrastructures/docker/docker-client/src/main/java/org/eclipse/che/infrastructure/docker/client/Exec.java similarity index 95% rename from plugins/plugin-docker/che-plugin-docker-client/src/main/java/org/eclipse/che/plugin/docker/client/Exec.java rename to infrastructures/docker/docker-client/src/main/java/org/eclipse/che/infrastructure/docker/client/Exec.java index 49146f42f5..72d86fbb91 100644 --- a/plugins/plugin-docker/che-plugin-docker-client/src/main/java/org/eclipse/che/plugin/docker/client/Exec.java +++ b/infrastructures/docker/docker-client/src/main/java/org/eclipse/che/infrastructure/docker/client/Exec.java @@ -8,7 +8,7 @@ * Contributors: * Red Hat, Inc. - initial API and implementation */ -package org.eclipse.che.plugin.docker.client; +package org.eclipse.che.infrastructure.docker.client; import java.util.Arrays; import java.util.Objects; diff --git a/plugins/plugin-docker/che-plugin-docker-client/src/main/java/org/eclipse/che/plugin/docker/client/InitialAuthConfig.java b/infrastructures/docker/docker-client/src/main/java/org/eclipse/che/infrastructure/docker/client/InitialAuthConfig.java similarity index 93% rename from plugins/plugin-docker/che-plugin-docker-client/src/main/java/org/eclipse/che/plugin/docker/client/InitialAuthConfig.java rename to infrastructures/docker/docker-client/src/main/java/org/eclipse/che/infrastructure/docker/client/InitialAuthConfig.java index f2229f9383..99d1ff13fe 100644 --- a/plugins/plugin-docker/che-plugin-docker-client/src/main/java/org/eclipse/che/plugin/docker/client/InitialAuthConfig.java +++ b/infrastructures/docker/docker-client/src/main/java/org/eclipse/che/infrastructure/docker/client/InitialAuthConfig.java @@ -8,13 +8,12 @@ * Contributors: * Red Hat, Inc. - initial API and implementation */ -package org.eclipse.che.plugin.docker.client; +package org.eclipse.che.infrastructure.docker.client; import static com.google.common.base.Strings.isNullOrEmpty; import static com.google.common.collect.Maps.newHashMapWithExpectedSize; import static java.lang.String.format; import static org.eclipse.che.dto.server.DtoFactory.newDto; -import static org.eclipse.che.plugin.docker.client.DockerRegistryAuthResolver.DEFAULT_REGISTRY_SYNONYMS; import com.google.common.annotations.VisibleForTesting; import java.util.Map; @@ -22,9 +21,9 @@ import java.util.Set; import java.util.stream.Collectors; import javax.inject.Inject; import javax.inject.Singleton; +import org.eclipse.che.infrastructure.docker.client.dto.AuthConfig; +import org.eclipse.che.infrastructure.docker.client.dto.AuthConfigs; import org.eclipse.che.inject.ConfigurationProperties; -import org.eclipse.che.plugin.docker.client.dto.AuthConfig; -import org.eclipse.che.plugin.docker.client.dto.AuthConfigs; import org.slf4j.Logger; import org.slf4j.LoggerFactory; @@ -136,7 +135,7 @@ public class InitialAuthConfig { private void ensureDockerHubConfiguredNoMoreThanOnce(Map configMap) { boolean isDockerHubConfigured = false; - for (String defaultRegistryAlias : DEFAULT_REGISTRY_SYNONYMS) { + for (String defaultRegistryAlias : DockerRegistryAuthResolver.DEFAULT_REGISTRY_SYNONYMS) { if (configMap.containsKey(defaultRegistryAlias)) { if (isDockerHubConfigured) { throw new IllegalArgumentException( diff --git a/plugins/plugin-docker/che-plugin-docker-client/src/main/java/org/eclipse/che/plugin/docker/client/JsonMessageReader.java b/infrastructures/docker/docker-client/src/main/java/org/eclipse/che/infrastructure/docker/client/JsonMessageReader.java similarity index 98% rename from plugins/plugin-docker/che-plugin-docker-client/src/main/java/org/eclipse/che/plugin/docker/client/JsonMessageReader.java rename to infrastructures/docker/docker-client/src/main/java/org/eclipse/che/infrastructure/docker/client/JsonMessageReader.java index 60d136aa43..33e6c9afab 100644 --- a/plugins/plugin-docker/che-plugin-docker-client/src/main/java/org/eclipse/che/plugin/docker/client/JsonMessageReader.java +++ b/infrastructures/docker/docker-client/src/main/java/org/eclipse/che/infrastructure/docker/client/JsonMessageReader.java @@ -8,7 +8,7 @@ * Contributors: * Red Hat, Inc. - initial API and implementation */ -package org.eclipse.che.plugin.docker.client; +package org.eclipse.che.infrastructure.docker.client; import com.google.gson.Gson; import com.google.gson.JsonIOException; diff --git a/plugins/plugin-docker/che-plugin-docker-client/src/main/java/org/eclipse/che/plugin/docker/client/LogMessage.java b/infrastructures/docker/docker-client/src/main/java/org/eclipse/che/infrastructure/docker/client/LogMessage.java similarity index 94% rename from plugins/plugin-docker/che-plugin-docker-client/src/main/java/org/eclipse/che/plugin/docker/client/LogMessage.java rename to infrastructures/docker/docker-client/src/main/java/org/eclipse/che/infrastructure/docker/client/LogMessage.java index aae9ae2ccb..bea3851f4e 100644 --- a/plugins/plugin-docker/che-plugin-docker-client/src/main/java/org/eclipse/che/plugin/docker/client/LogMessage.java +++ b/infrastructures/docker/docker-client/src/main/java/org/eclipse/che/infrastructure/docker/client/LogMessage.java @@ -8,7 +8,7 @@ * Contributors: * Red Hat, Inc. - initial API and implementation */ -package org.eclipse.che.plugin.docker.client; +package org.eclipse.che.infrastructure.docker.client; /** @author andrew00x */ public class LogMessage { diff --git a/plugins/plugin-docker/che-plugin-docker-client/src/main/java/org/eclipse/che/plugin/docker/client/LogMessageFormatter.java b/infrastructures/docker/docker-client/src/main/java/org/eclipse/che/infrastructure/docker/client/LogMessageFormatter.java similarity index 96% rename from plugins/plugin-docker/che-plugin-docker-client/src/main/java/org/eclipse/che/plugin/docker/client/LogMessageFormatter.java rename to infrastructures/docker/docker-client/src/main/java/org/eclipse/che/infrastructure/docker/client/LogMessageFormatter.java index ff193d9ca0..de68a70804 100644 --- a/plugins/plugin-docker/che-plugin-docker-client/src/main/java/org/eclipse/che/plugin/docker/client/LogMessageFormatter.java +++ b/infrastructures/docker/docker-client/src/main/java/org/eclipse/che/infrastructure/docker/client/LogMessageFormatter.java @@ -8,7 +8,7 @@ * Contributors: * Red Hat, Inc. - initial API and implementation */ -package org.eclipse.che.plugin.docker.client; +package org.eclipse.che.infrastructure.docker.client; /** * Format/beautify string representation of log messages returned by docker. diff --git a/plugins/plugin-docker/che-plugin-docker-client/src/main/java/org/eclipse/che/plugin/docker/client/LogMessagePumper.java b/infrastructures/docker/docker-client/src/main/java/org/eclipse/che/infrastructure/docker/client/LogMessagePumper.java similarity index 98% rename from plugins/plugin-docker/che-plugin-docker-client/src/main/java/org/eclipse/che/plugin/docker/client/LogMessagePumper.java rename to infrastructures/docker/docker-client/src/main/java/org/eclipse/che/infrastructure/docker/client/LogMessagePumper.java index 34bb803562..e642249eeb 100644 --- a/plugins/plugin-docker/che-plugin-docker-client/src/main/java/org/eclipse/che/plugin/docker/client/LogMessagePumper.java +++ b/infrastructures/docker/docker-client/src/main/java/org/eclipse/che/infrastructure/docker/client/LogMessagePumper.java @@ -8,7 +8,7 @@ * Contributors: * Red Hat, Inc. - initial API and implementation */ -package org.eclipse.che.plugin.docker.client; +package org.eclipse.che.infrastructure.docker.client; import com.google.common.io.ByteStreams; import java.io.IOException; diff --git a/plugins/plugin-docker/che-plugin-docker-client/src/main/java/org/eclipse/che/plugin/docker/client/MessageFormatter.java b/infrastructures/docker/docker-client/src/main/java/org/eclipse/che/infrastructure/docker/client/MessageFormatter.java similarity index 90% rename from plugins/plugin-docker/che-plugin-docker-client/src/main/java/org/eclipse/che/plugin/docker/client/MessageFormatter.java rename to infrastructures/docker/docker-client/src/main/java/org/eclipse/che/infrastructure/docker/client/MessageFormatter.java index 1c7b20e8ba..40e698e5d3 100644 --- a/plugins/plugin-docker/che-plugin-docker-client/src/main/java/org/eclipse/che/plugin/docker/client/MessageFormatter.java +++ b/infrastructures/docker/docker-client/src/main/java/org/eclipse/che/infrastructure/docker/client/MessageFormatter.java @@ -8,7 +8,7 @@ * Contributors: * Red Hat, Inc. - initial API and implementation */ -package org.eclipse.che.plugin.docker.client; +package org.eclipse.che.infrastructure.docker.client; /** * Format/beautify string representation of docker messages diff --git a/plugins/plugin-docker/che-plugin-docker-client/src/main/java/org/eclipse/che/plugin/docker/client/MessageProcessor.java b/infrastructures/docker/docker-client/src/main/java/org/eclipse/che/infrastructure/docker/client/MessageProcessor.java similarity index 92% rename from plugins/plugin-docker/che-plugin-docker-client/src/main/java/org/eclipse/che/plugin/docker/client/MessageProcessor.java rename to infrastructures/docker/docker-client/src/main/java/org/eclipse/che/infrastructure/docker/client/MessageProcessor.java index cf44ccbf61..01c93d86fc 100644 --- a/plugins/plugin-docker/che-plugin-docker-client/src/main/java/org/eclipse/che/plugin/docker/client/MessageProcessor.java +++ b/infrastructures/docker/docker-client/src/main/java/org/eclipse/che/infrastructure/docker/client/MessageProcessor.java @@ -8,7 +8,7 @@ * Contributors: * Red Hat, Inc. - initial API and implementation */ -package org.eclipse.che.plugin.docker.client; +package org.eclipse.che.infrastructure.docker.client; /** @author Alexander Garagatyi */ public interface MessageProcessor { diff --git a/plugins/plugin-docker/che-plugin-docker-client/src/main/java/org/eclipse/che/plugin/docker/client/MessagePumper.java b/infrastructures/docker/docker-client/src/main/java/org/eclipse/che/infrastructure/docker/client/MessagePumper.java similarity index 94% rename from plugins/plugin-docker/che-plugin-docker-client/src/main/java/org/eclipse/che/plugin/docker/client/MessagePumper.java rename to infrastructures/docker/docker-client/src/main/java/org/eclipse/che/infrastructure/docker/client/MessagePumper.java index 33d6fb52a7..b28b759832 100644 --- a/plugins/plugin-docker/che-plugin-docker-client/src/main/java/org/eclipse/che/plugin/docker/client/MessagePumper.java +++ b/infrastructures/docker/docker-client/src/main/java/org/eclipse/che/infrastructure/docker/client/MessagePumper.java @@ -8,7 +8,7 @@ * Contributors: * Red Hat, Inc. - initial API and implementation */ -package org.eclipse.che.plugin.docker.client; +package org.eclipse.che.infrastructure.docker.client; import java.io.IOException; diff --git a/plugins/plugin-docker/che-plugin-docker-client/src/main/java/org/eclipse/che/plugin/docker/client/NoOpDockerRegistryDynamicAuthResolverImpl.java b/infrastructures/docker/docker-client/src/main/java/org/eclipse/che/infrastructure/docker/client/NoOpDockerRegistryDynamicAuthResolverImpl.java similarity index 87% rename from plugins/plugin-docker/che-plugin-docker-client/src/main/java/org/eclipse/che/plugin/docker/client/NoOpDockerRegistryDynamicAuthResolverImpl.java rename to infrastructures/docker/docker-client/src/main/java/org/eclipse/che/infrastructure/docker/client/NoOpDockerRegistryDynamicAuthResolverImpl.java index d13971d80a..1bb4693da9 100644 --- a/plugins/plugin-docker/che-plugin-docker-client/src/main/java/org/eclipse/che/plugin/docker/client/NoOpDockerRegistryDynamicAuthResolverImpl.java +++ b/infrastructures/docker/docker-client/src/main/java/org/eclipse/che/infrastructure/docker/client/NoOpDockerRegistryDynamicAuthResolverImpl.java @@ -8,12 +8,12 @@ * Contributors: * Red Hat, Inc. - initial API and implementation */ -package org.eclipse.che.plugin.docker.client; +package org.eclipse.che.infrastructure.docker.client; import java.util.Collections; import java.util.Map; import org.eclipse.che.commons.annotation.Nullable; -import org.eclipse.che.plugin.docker.client.dto.AuthConfig; +import org.eclipse.che.infrastructure.docker.client.dto.AuthConfig; /** @author Mykola Morhun */ public class NoOpDockerRegistryDynamicAuthResolverImpl diff --git a/plugins/plugin-docker/che-plugin-docker-client/src/main/java/org/eclipse/che/plugin/docker/client/ProgressLineFormatterImpl.java b/infrastructures/docker/docker-client/src/main/java/org/eclipse/che/infrastructure/docker/client/ProgressLineFormatterImpl.java similarity index 95% rename from plugins/plugin-docker/che-plugin-docker-client/src/main/java/org/eclipse/che/plugin/docker/client/ProgressLineFormatterImpl.java rename to infrastructures/docker/docker-client/src/main/java/org/eclipse/che/infrastructure/docker/client/ProgressLineFormatterImpl.java index 9148f00988..43c3595495 100644 --- a/plugins/plugin-docker/che-plugin-docker-client/src/main/java/org/eclipse/che/plugin/docker/client/ProgressLineFormatterImpl.java +++ b/infrastructures/docker/docker-client/src/main/java/org/eclipse/che/infrastructure/docker/client/ProgressLineFormatterImpl.java @@ -8,9 +8,9 @@ * Contributors: * Red Hat, Inc. - initial API and implementation */ -package org.eclipse.che.plugin.docker.client; +package org.eclipse.che.infrastructure.docker.client; -import org.eclipse.che.plugin.docker.client.json.ProgressStatus; +import org.eclipse.che.infrastructure.docker.client.json.ProgressStatus; /** * Beatify {@link ProgressStatus} messages. diff --git a/plugins/plugin-docker/che-plugin-docker-client/src/main/java/org/eclipse/che/plugin/docker/client/ProgressMonitor.java b/infrastructures/docker/docker-client/src/main/java/org/eclipse/che/infrastructure/docker/client/ProgressMonitor.java similarity index 85% rename from plugins/plugin-docker/che-plugin-docker-client/src/main/java/org/eclipse/che/plugin/docker/client/ProgressMonitor.java rename to infrastructures/docker/docker-client/src/main/java/org/eclipse/che/infrastructure/docker/client/ProgressMonitor.java index aebcdaf7d1..d165502d35 100644 --- a/plugins/plugin-docker/che-plugin-docker-client/src/main/java/org/eclipse/che/plugin/docker/client/ProgressMonitor.java +++ b/infrastructures/docker/docker-client/src/main/java/org/eclipse/che/infrastructure/docker/client/ProgressMonitor.java @@ -8,9 +8,9 @@ * Contributors: * Red Hat, Inc. - initial API and implementation */ -package org.eclipse.che.plugin.docker.client; +package org.eclipse.che.infrastructure.docker.client; -import org.eclipse.che.plugin.docker.client.json.ProgressStatus; +import org.eclipse.che.infrastructure.docker.client.json.ProgressStatus; /** * Receives updated progress statuses to be able to show user beatified progress info. diff --git a/plugins/plugin-docker/che-plugin-docker-client/src/main/java/org/eclipse/che/plugin/docker/client/UserSpecificDockerRegistryCredentialsProvider.java b/infrastructures/docker/docker-client/src/main/java/org/eclipse/che/infrastructure/docker/client/UserSpecificDockerRegistryCredentialsProvider.java similarity index 92% rename from plugins/plugin-docker/che-plugin-docker-client/src/main/java/org/eclipse/che/plugin/docker/client/UserSpecificDockerRegistryCredentialsProvider.java rename to infrastructures/docker/docker-client/src/main/java/org/eclipse/che/infrastructure/docker/client/UserSpecificDockerRegistryCredentialsProvider.java index 35b47f1fe8..6ebbb6c0ee 100644 --- a/plugins/plugin-docker/che-plugin-docker-client/src/main/java/org/eclipse/che/plugin/docker/client/UserSpecificDockerRegistryCredentialsProvider.java +++ b/infrastructures/docker/docker-client/src/main/java/org/eclipse/che/infrastructure/docker/client/UserSpecificDockerRegistryCredentialsProvider.java @@ -8,7 +8,7 @@ * Contributors: * Red Hat, Inc. - initial API and implementation */ -package org.eclipse.che.plugin.docker.client; +package org.eclipse.che.infrastructure.docker.client; import com.google.inject.Inject; import com.google.inject.Singleton; @@ -17,8 +17,8 @@ import org.eclipse.che.api.user.server.PreferenceManager; import org.eclipse.che.commons.annotation.Nullable; import org.eclipse.che.commons.env.EnvironmentContext; import org.eclipse.che.dto.server.DtoFactory; -import org.eclipse.che.plugin.docker.client.dto.AuthConfig; -import org.eclipse.che.plugin.docker.client.dto.AuthConfigs; +import org.eclipse.che.infrastructure.docker.client.dto.AuthConfig; +import org.eclipse.che.infrastructure.docker.client.dto.AuthConfigs; import org.slf4j.Logger; import org.slf4j.LoggerFactory; diff --git a/plugins/plugin-docker/che-plugin-docker-client/src/main/java/org/eclipse/che/plugin/docker/client/connection/ChunkedInputStream.java b/infrastructures/docker/docker-client/src/main/java/org/eclipse/che/infrastructure/docker/client/connection/ChunkedInputStream.java similarity index 97% rename from plugins/plugin-docker/che-plugin-docker-client/src/main/java/org/eclipse/che/plugin/docker/client/connection/ChunkedInputStream.java rename to infrastructures/docker/docker-client/src/main/java/org/eclipse/che/infrastructure/docker/client/connection/ChunkedInputStream.java index e8d282480d..1186b17a29 100644 --- a/plugins/plugin-docker/che-plugin-docker-client/src/main/java/org/eclipse/che/plugin/docker/client/connection/ChunkedInputStream.java +++ b/infrastructures/docker/docker-client/src/main/java/org/eclipse/che/infrastructure/docker/client/connection/ChunkedInputStream.java @@ -8,7 +8,7 @@ * Contributors: * Red Hat, Inc. - initial API and implementation */ -package org.eclipse.che.plugin.docker.client.connection; +package org.eclipse.che.infrastructure.docker.client.connection; import java.io.IOException; import java.io.InputStream; diff --git a/plugins/plugin-docker/che-plugin-docker-client/src/main/java/org/eclipse/che/plugin/docker/client/connection/CloseConnectionInputStream.java b/infrastructures/docker/docker-client/src/main/java/org/eclipse/che/infrastructure/docker/client/connection/CloseConnectionInputStream.java similarity index 95% rename from plugins/plugin-docker/che-plugin-docker-client/src/main/java/org/eclipse/che/plugin/docker/client/connection/CloseConnectionInputStream.java rename to infrastructures/docker/docker-client/src/main/java/org/eclipse/che/infrastructure/docker/client/connection/CloseConnectionInputStream.java index 7a8ed71855..4c9ce28ef2 100644 --- a/plugins/plugin-docker/che-plugin-docker-client/src/main/java/org/eclipse/che/plugin/docker/client/connection/CloseConnectionInputStream.java +++ b/infrastructures/docker/docker-client/src/main/java/org/eclipse/che/infrastructure/docker/client/connection/CloseConnectionInputStream.java @@ -8,7 +8,7 @@ * Contributors: * Red Hat, Inc. - initial API and implementation */ -package org.eclipse.che.plugin.docker.client.connection; +package org.eclipse.che.infrastructure.docker.client.connection; import java.io.IOException; import java.io.InputStream; diff --git a/plugins/plugin-docker/che-plugin-docker-client/src/main/java/org/eclipse/che/plugin/docker/client/connection/DockerConnection.java b/infrastructures/docker/docker-client/src/main/java/org/eclipse/che/infrastructure/docker/client/connection/DockerConnection.java similarity index 98% rename from plugins/plugin-docker/che-plugin-docker-client/src/main/java/org/eclipse/che/plugin/docker/client/connection/DockerConnection.java rename to infrastructures/docker/docker-client/src/main/java/org/eclipse/che/infrastructure/docker/client/connection/DockerConnection.java index d508454e95..f9d5ef355c 100644 --- a/plugins/plugin-docker/che-plugin-docker-client/src/main/java/org/eclipse/che/plugin/docker/client/connection/DockerConnection.java +++ b/infrastructures/docker/docker-client/src/main/java/org/eclipse/che/infrastructure/docker/client/connection/DockerConnection.java @@ -8,7 +8,7 @@ * Contributors: * Red Hat, Inc. - initial API and implementation */ -package org.eclipse.che.plugin.docker.client.connection; +package org.eclipse.che.infrastructure.docker.client.connection; import com.google.common.io.ByteStreams; import java.io.Closeable; diff --git a/plugins/plugin-docker/che-plugin-docker-client/src/main/java/org/eclipse/che/plugin/docker/client/connection/DockerConnectionFactory.java b/infrastructures/docker/docker-client/src/main/java/org/eclipse/che/infrastructure/docker/client/connection/DockerConnectionFactory.java similarity index 88% rename from plugins/plugin-docker/che-plugin-docker-client/src/main/java/org/eclipse/che/plugin/docker/client/connection/DockerConnectionFactory.java rename to infrastructures/docker/docker-client/src/main/java/org/eclipse/che/infrastructure/docker/client/connection/DockerConnectionFactory.java index f803d62485..e31b7bc54c 100644 --- a/plugins/plugin-docker/che-plugin-docker-client/src/main/java/org/eclipse/che/plugin/docker/client/connection/DockerConnectionFactory.java +++ b/infrastructures/docker/docker-client/src/main/java/org/eclipse/che/infrastructure/docker/client/connection/DockerConnectionFactory.java @@ -8,13 +8,13 @@ * Contributors: * Red Hat, Inc. - initial API and implementation */ -package org.eclipse.che.plugin.docker.client.connection; +package org.eclipse.che.infrastructure.docker.client.connection; import com.google.inject.Inject; import java.net.URI; import javax.inject.Named; -import org.eclipse.che.plugin.docker.client.DockerCertificates; -import org.eclipse.che.plugin.docker.client.DockerConnectorConfiguration; +import org.eclipse.che.infrastructure.docker.client.DockerCertificates; +import org.eclipse.che.infrastructure.docker.client.DockerConnectorConfiguration; /** * Factory for connections to docker API. diff --git a/plugins/plugin-docker/che-plugin-docker-client/src/main/java/org/eclipse/che/plugin/docker/client/connection/DockerResponse.java b/infrastructures/docker/docker-client/src/main/java/org/eclipse/che/infrastructure/docker/client/connection/DockerResponse.java similarity index 92% rename from plugins/plugin-docker/che-plugin-docker-client/src/main/java/org/eclipse/che/plugin/docker/client/connection/DockerResponse.java rename to infrastructures/docker/docker-client/src/main/java/org/eclipse/che/infrastructure/docker/client/connection/DockerResponse.java index ebcb76237e..4560586ec8 100644 --- a/plugins/plugin-docker/che-plugin-docker-client/src/main/java/org/eclipse/che/plugin/docker/client/connection/DockerResponse.java +++ b/infrastructures/docker/docker-client/src/main/java/org/eclipse/che/infrastructure/docker/client/connection/DockerResponse.java @@ -8,7 +8,7 @@ * Contributors: * Red Hat, Inc. - initial API and implementation */ -package org.eclipse.che.plugin.docker.client.connection; +package org.eclipse.che.infrastructure.docker.client.connection; import java.io.IOException; import java.io.InputStream; diff --git a/plugins/plugin-docker/che-plugin-docker-client/src/main/java/org/eclipse/che/plugin/docker/client/connection/LimitedInputStream.java b/infrastructures/docker/docker-client/src/main/java/org/eclipse/che/infrastructure/docker/client/connection/LimitedInputStream.java similarity index 96% rename from plugins/plugin-docker/che-plugin-docker-client/src/main/java/org/eclipse/che/plugin/docker/client/connection/LimitedInputStream.java rename to infrastructures/docker/docker-client/src/main/java/org/eclipse/che/infrastructure/docker/client/connection/LimitedInputStream.java index b798ce7588..e7ae690d83 100644 --- a/plugins/plugin-docker/che-plugin-docker-client/src/main/java/org/eclipse/che/plugin/docker/client/connection/LimitedInputStream.java +++ b/infrastructures/docker/docker-client/src/main/java/org/eclipse/che/infrastructure/docker/client/connection/LimitedInputStream.java @@ -8,7 +8,7 @@ * Contributors: * Red Hat, Inc. - initial API and implementation */ -package org.eclipse.che.plugin.docker.client.connection; +package org.eclipse.che.infrastructure.docker.client.connection; import java.io.IOException; import java.io.InputStream; diff --git a/plugins/plugin-docker/che-plugin-docker-client/src/main/java/org/eclipse/che/plugin/docker/client/connection/TcpConnection.java b/infrastructures/docker/docker-client/src/main/java/org/eclipse/che/infrastructure/docker/client/connection/TcpConnection.java similarity index 95% rename from plugins/plugin-docker/che-plugin-docker-client/src/main/java/org/eclipse/che/plugin/docker/client/connection/TcpConnection.java rename to infrastructures/docker/docker-client/src/main/java/org/eclipse/che/infrastructure/docker/client/connection/TcpConnection.java index f8763628e3..5fef0f8470 100644 --- a/plugins/plugin-docker/che-plugin-docker-client/src/main/java/org/eclipse/che/plugin/docker/client/connection/TcpConnection.java +++ b/infrastructures/docker/docker-client/src/main/java/org/eclipse/che/infrastructure/docker/client/connection/TcpConnection.java @@ -8,7 +8,7 @@ * Contributors: * Red Hat, Inc. - initial API and implementation */ -package org.eclipse.che.plugin.docker.client.connection; +package org.eclipse.che.infrastructure.docker.client.connection; import com.google.common.base.Strings; import java.io.IOException; @@ -19,7 +19,7 @@ import java.net.URL; import java.util.List; import javax.net.ssl.HttpsURLConnection; import org.eclipse.che.commons.lang.Pair; -import org.eclipse.che.plugin.docker.client.DockerCertificates; +import org.eclipse.che.infrastructure.docker.client.DockerCertificates; /** * @author andrew00x diff --git a/plugins/plugin-docker/che-plugin-docker-client/src/main/java/org/eclipse/che/plugin/docker/client/connection/TcpDockerResponse.java b/infrastructures/docker/docker-client/src/main/java/org/eclipse/che/infrastructure/docker/client/connection/TcpDockerResponse.java similarity index 96% rename from plugins/plugin-docker/che-plugin-docker-client/src/main/java/org/eclipse/che/plugin/docker/client/connection/TcpDockerResponse.java rename to infrastructures/docker/docker-client/src/main/java/org/eclipse/che/infrastructure/docker/client/connection/TcpDockerResponse.java index 6355e81fff..382cfa4c43 100644 --- a/plugins/plugin-docker/che-plugin-docker-client/src/main/java/org/eclipse/che/plugin/docker/client/connection/TcpDockerResponse.java +++ b/infrastructures/docker/docker-client/src/main/java/org/eclipse/che/infrastructure/docker/client/connection/TcpDockerResponse.java @@ -8,7 +8,7 @@ * Contributors: * Red Hat, Inc. - initial API and implementation */ -package org.eclipse.che.plugin.docker.client.connection; +package org.eclipse.che.infrastructure.docker.client.connection; import java.io.IOException; import java.io.InputStream; diff --git a/plugins/plugin-docker/che-plugin-docker-client/src/main/java/org/eclipse/che/plugin/docker/client/connection/UnixSocketConnection.java b/infrastructures/docker/docker-client/src/main/java/org/eclipse/che/infrastructure/docker/client/connection/UnixSocketConnection.java similarity index 87% rename from plugins/plugin-docker/che-plugin-docker-client/src/main/java/org/eclipse/che/plugin/docker/client/connection/UnixSocketConnection.java rename to infrastructures/docker/docker-client/src/main/java/org/eclipse/che/infrastructure/docker/client/connection/UnixSocketConnection.java index 8ff5eac92e..c1d8d4037d 100644 --- a/plugins/plugin-docker/che-plugin-docker-client/src/main/java/org/eclipse/che/plugin/docker/client/connection/UnixSocketConnection.java +++ b/infrastructures/docker/docker-client/src/main/java/org/eclipse/che/infrastructure/docker/client/connection/UnixSocketConnection.java @@ -8,12 +8,12 @@ * Contributors: * Red Hat, Inc. - initial API and implementation */ -package org.eclipse.che.plugin.docker.client.connection; +package org.eclipse.che.infrastructure.docker.client.connection; -import static org.eclipse.che.plugin.docker.client.CLibrary.AF_UNIX; -import static org.eclipse.che.plugin.docker.client.CLibrary.SOCK_STREAM; -import static org.eclipse.che.plugin.docker.client.CLibrary.SockAddrUn; -import static org.eclipse.che.plugin.docker.client.CLibraryFactory.getCLibrary; +import static org.eclipse.che.infrastructure.docker.client.CLibrary.AF_UNIX; +import static org.eclipse.che.infrastructure.docker.client.CLibrary.SOCK_STREAM; +import static org.eclipse.che.infrastructure.docker.client.CLibrary.SockAddrUn; +import static org.eclipse.che.infrastructure.docker.client.CLibraryFactory.getCLibrary; import com.google.common.base.Strings; import java.io.BufferedInputStream; @@ -26,7 +26,7 @@ import java.io.Writer; import java.net.ConnectException; import java.util.List; import org.eclipse.che.commons.lang.Pair; -import org.eclipse.che.plugin.docker.client.CLibrary; +import org.eclipse.che.infrastructure.docker.client.CLibrary; /** * @author andrew00x diff --git a/plugins/plugin-docker/che-plugin-docker-client/src/main/java/org/eclipse/che/plugin/docker/client/connection/UnixSocketDockerResponse.java b/infrastructures/docker/docker-client/src/main/java/org/eclipse/che/infrastructure/docker/client/connection/UnixSocketDockerResponse.java similarity index 98% rename from plugins/plugin-docker/che-plugin-docker-client/src/main/java/org/eclipse/che/plugin/docker/client/connection/UnixSocketDockerResponse.java rename to infrastructures/docker/docker-client/src/main/java/org/eclipse/che/infrastructure/docker/client/connection/UnixSocketDockerResponse.java index 4a1c4db319..906217314f 100644 --- a/plugins/plugin-docker/che-plugin-docker-client/src/main/java/org/eclipse/che/plugin/docker/client/connection/UnixSocketDockerResponse.java +++ b/infrastructures/docker/docker-client/src/main/java/org/eclipse/che/infrastructure/docker/client/connection/UnixSocketDockerResponse.java @@ -8,7 +8,7 @@ * Contributors: * Red Hat, Inc. - initial API and implementation */ -package org.eclipse.che.plugin.docker.client.connection; +package org.eclipse.che.infrastructure.docker.client.connection; import java.io.IOException; import java.io.InputStream; diff --git a/plugins/plugin-docker/che-plugin-docker-client/src/main/java/org/eclipse/che/plugin/docker/client/connection/UnixSocketInputStream.java b/infrastructures/docker/docker-client/src/main/java/org/eclipse/che/infrastructure/docker/client/connection/UnixSocketInputStream.java similarity index 87% rename from plugins/plugin-docker/che-plugin-docker-client/src/main/java/org/eclipse/che/plugin/docker/client/connection/UnixSocketInputStream.java rename to infrastructures/docker/docker-client/src/main/java/org/eclipse/che/infrastructure/docker/client/connection/UnixSocketInputStream.java index 40f9bc0f9e..a5109b145d 100644 --- a/plugins/plugin-docker/che-plugin-docker-client/src/main/java/org/eclipse/che/plugin/docker/client/connection/UnixSocketInputStream.java +++ b/infrastructures/docker/docker-client/src/main/java/org/eclipse/che/infrastructure/docker/client/connection/UnixSocketInputStream.java @@ -8,14 +8,14 @@ * Contributors: * Red Hat, Inc. - initial API and implementation */ -package org.eclipse.che.plugin.docker.client.connection; +package org.eclipse.che.infrastructure.docker.client.connection; -import static org.eclipse.che.plugin.docker.client.CLibraryFactory.getCLibrary; +import static org.eclipse.che.infrastructure.docker.client.CLibraryFactory.getCLibrary; import com.sun.jna.LastErrorException; import java.io.IOException; import java.io.InputStream; -import org.eclipse.che.plugin.docker.client.CLibrary; +import org.eclipse.che.infrastructure.docker.client.CLibrary; /** @author andrew00x */ public class UnixSocketInputStream extends InputStream { diff --git a/plugins/plugin-docker/che-plugin-docker-client/src/main/java/org/eclipse/che/plugin/docker/client/connection/UnixSocketOutputStream.java b/infrastructures/docker/docker-client/src/main/java/org/eclipse/che/infrastructure/docker/client/connection/UnixSocketOutputStream.java similarity index 85% rename from plugins/plugin-docker/che-plugin-docker-client/src/main/java/org/eclipse/che/plugin/docker/client/connection/UnixSocketOutputStream.java rename to infrastructures/docker/docker-client/src/main/java/org/eclipse/che/infrastructure/docker/client/connection/UnixSocketOutputStream.java index 421bb1e5c3..9b28c104c3 100644 --- a/plugins/plugin-docker/che-plugin-docker-client/src/main/java/org/eclipse/che/plugin/docker/client/connection/UnixSocketOutputStream.java +++ b/infrastructures/docker/docker-client/src/main/java/org/eclipse/che/infrastructure/docker/client/connection/UnixSocketOutputStream.java @@ -8,14 +8,14 @@ * Contributors: * Red Hat, Inc. - initial API and implementation */ -package org.eclipse.che.plugin.docker.client.connection; +package org.eclipse.che.infrastructure.docker.client.connection; -import static org.eclipse.che.plugin.docker.client.CLibraryFactory.getCLibrary; +import static org.eclipse.che.infrastructure.docker.client.CLibraryFactory.getCLibrary; import com.sun.jna.LastErrorException; import java.io.IOException; import java.io.OutputStream; -import org.eclipse.che.plugin.docker.client.CLibrary; +import org.eclipse.che.infrastructure.docker.client.CLibrary; /** @author andrew00x */ public class UnixSocketOutputStream extends OutputStream { diff --git a/plugins/plugin-docker/che-plugin-docker-client/src/main/java/org/eclipse/che/plugin/docker/client/dto/AuthConfig.java b/infrastructures/docker/docker-client/src/main/java/org/eclipse/che/infrastructure/docker/client/dto/AuthConfig.java similarity index 93% rename from plugins/plugin-docker/che-plugin-docker-client/src/main/java/org/eclipse/che/plugin/docker/client/dto/AuthConfig.java rename to infrastructures/docker/docker-client/src/main/java/org/eclipse/che/infrastructure/docker/client/dto/AuthConfig.java index ea8a72d10a..f888ce7411 100644 --- a/plugins/plugin-docker/che-plugin-docker-client/src/main/java/org/eclipse/che/plugin/docker/client/dto/AuthConfig.java +++ b/infrastructures/docker/docker-client/src/main/java/org/eclipse/che/infrastructure/docker/client/dto/AuthConfig.java @@ -8,7 +8,7 @@ * Contributors: * Red Hat, Inc. - initial API and implementation */ -package org.eclipse.che.plugin.docker.client.dto; +package org.eclipse.che.infrastructure.docker.client.dto; import org.eclipse.che.dto.shared.DTO; diff --git a/plugins/plugin-docker/che-plugin-docker-client/src/main/java/org/eclipse/che/plugin/docker/client/dto/AuthConfigs.java b/infrastructures/docker/docker-client/src/main/java/org/eclipse/che/infrastructure/docker/client/dto/AuthConfigs.java similarity index 93% rename from plugins/plugin-docker/che-plugin-docker-client/src/main/java/org/eclipse/che/plugin/docker/client/dto/AuthConfigs.java rename to infrastructures/docker/docker-client/src/main/java/org/eclipse/che/infrastructure/docker/client/dto/AuthConfigs.java index b6339cf0be..75bc261d5e 100644 --- a/plugins/plugin-docker/che-plugin-docker-client/src/main/java/org/eclipse/che/plugin/docker/client/dto/AuthConfigs.java +++ b/infrastructures/docker/docker-client/src/main/java/org/eclipse/che/infrastructure/docker/client/dto/AuthConfigs.java @@ -8,7 +8,7 @@ * Contributors: * Red Hat, Inc. - initial API and implementation */ -package org.eclipse.che.plugin.docker.client.dto; +package org.eclipse.che.infrastructure.docker.client.dto; import java.util.Map; import org.eclipse.che.dto.shared.DTO; diff --git a/plugins/plugin-docker/che-plugin-docker-client/src/main/java/org/eclipse/che/plugin/docker/client/exception/ContainerNotFoundException.java b/infrastructures/docker/docker-client/src/main/java/org/eclipse/che/infrastructure/docker/client/exception/ContainerNotFoundException.java similarity index 90% rename from plugins/plugin-docker/che-plugin-docker-client/src/main/java/org/eclipse/che/plugin/docker/client/exception/ContainerNotFoundException.java rename to infrastructures/docker/docker-client/src/main/java/org/eclipse/che/infrastructure/docker/client/exception/ContainerNotFoundException.java index b275483fe5..fec6133165 100644 --- a/plugins/plugin-docker/che-plugin-docker-client/src/main/java/org/eclipse/che/plugin/docker/client/exception/ContainerNotFoundException.java +++ b/infrastructures/docker/docker-client/src/main/java/org/eclipse/che/infrastructure/docker/client/exception/ContainerNotFoundException.java @@ -8,7 +8,7 @@ * Contributors: * Red Hat, Inc. - initial API and implementation */ -package org.eclipse.che.plugin.docker.client.exception; +package org.eclipse.che.infrastructure.docker.client.exception; /** * Occurs when docker container is not found. diff --git a/plugins/plugin-docker/che-plugin-docker-client/src/main/java/org/eclipse/che/plugin/docker/client/exception/DockerException.java b/infrastructures/docker/docker-client/src/main/java/org/eclipse/che/infrastructure/docker/client/exception/DockerException.java similarity index 93% rename from plugins/plugin-docker/che-plugin-docker-client/src/main/java/org/eclipse/che/plugin/docker/client/exception/DockerException.java rename to infrastructures/docker/docker-client/src/main/java/org/eclipse/che/infrastructure/docker/client/exception/DockerException.java index 59df5b98ef..4bbbd2fdc9 100644 --- a/plugins/plugin-docker/che-plugin-docker-client/src/main/java/org/eclipse/che/plugin/docker/client/exception/DockerException.java +++ b/infrastructures/docker/docker-client/src/main/java/org/eclipse/che/infrastructure/docker/client/exception/DockerException.java @@ -8,7 +8,7 @@ * Contributors: * Red Hat, Inc. - initial API and implementation */ -package org.eclipse.che.plugin.docker.client.exception; +package org.eclipse.che.infrastructure.docker.client.exception; import java.io.IOException; diff --git a/plugins/plugin-docker/che-plugin-docker-client/src/main/java/org/eclipse/che/plugin/docker/client/exception/ExecNotFoundException.java b/infrastructures/docker/docker-client/src/main/java/org/eclipse/che/infrastructure/docker/client/exception/ExecNotFoundException.java similarity index 90% rename from plugins/plugin-docker/che-plugin-docker-client/src/main/java/org/eclipse/che/plugin/docker/client/exception/ExecNotFoundException.java rename to infrastructures/docker/docker-client/src/main/java/org/eclipse/che/infrastructure/docker/client/exception/ExecNotFoundException.java index d85e46f2a9..7acc196abd 100644 --- a/plugins/plugin-docker/che-plugin-docker-client/src/main/java/org/eclipse/che/plugin/docker/client/exception/ExecNotFoundException.java +++ b/infrastructures/docker/docker-client/src/main/java/org/eclipse/che/infrastructure/docker/client/exception/ExecNotFoundException.java @@ -8,7 +8,7 @@ * Contributors: * Red Hat, Inc. - initial API and implementation */ -package org.eclipse.che.plugin.docker.client.exception; +package org.eclipse.che.infrastructure.docker.client.exception; /** * Occurs when docker exec is not found. diff --git a/plugins/plugin-docker/che-plugin-docker-client/src/main/java/org/eclipse/che/plugin/docker/client/exception/ImageNotFoundException.java b/infrastructures/docker/docker-client/src/main/java/org/eclipse/che/infrastructure/docker/client/exception/ImageNotFoundException.java similarity index 90% rename from plugins/plugin-docker/che-plugin-docker-client/src/main/java/org/eclipse/che/plugin/docker/client/exception/ImageNotFoundException.java rename to infrastructures/docker/docker-client/src/main/java/org/eclipse/che/infrastructure/docker/client/exception/ImageNotFoundException.java index f237ce4674..0ff4e7e90a 100644 --- a/plugins/plugin-docker/che-plugin-docker-client/src/main/java/org/eclipse/che/plugin/docker/client/exception/ImageNotFoundException.java +++ b/infrastructures/docker/docker-client/src/main/java/org/eclipse/che/infrastructure/docker/client/exception/ImageNotFoundException.java @@ -8,7 +8,7 @@ * Contributors: * Red Hat, Inc. - initial API and implementation */ -package org.eclipse.che.plugin.docker.client.exception; +package org.eclipse.che.infrastructure.docker.client.exception; /** * Occurs when docker image is not found. diff --git a/plugins/plugin-docker/che-plugin-docker-client/src/main/java/org/eclipse/che/plugin/docker/client/exception/NetworkNotFoundException.java b/infrastructures/docker/docker-client/src/main/java/org/eclipse/che/infrastructure/docker/client/exception/NetworkNotFoundException.java similarity index 90% rename from plugins/plugin-docker/che-plugin-docker-client/src/main/java/org/eclipse/che/plugin/docker/client/exception/NetworkNotFoundException.java rename to infrastructures/docker/docker-client/src/main/java/org/eclipse/che/infrastructure/docker/client/exception/NetworkNotFoundException.java index 854a9684b4..901699f8f8 100644 --- a/plugins/plugin-docker/che-plugin-docker-client/src/main/java/org/eclipse/che/plugin/docker/client/exception/NetworkNotFoundException.java +++ b/infrastructures/docker/docker-client/src/main/java/org/eclipse/che/infrastructure/docker/client/exception/NetworkNotFoundException.java @@ -8,7 +8,7 @@ * Contributors: * Red Hat, Inc. - initial API and implementation */ -package org.eclipse.che.plugin.docker.client.exception; +package org.eclipse.che.infrastructure.docker.client.exception; /** * Is thrown when docker network is not found. diff --git a/plugins/plugin-docker/che-plugin-docker-client/src/main/java/org/eclipse/che/plugin/docker/client/helper/DefaultNetworkFinder.java b/infrastructures/docker/docker-client/src/main/java/org/eclipse/che/infrastructure/docker/client/helper/DefaultNetworkFinder.java similarity index 97% rename from plugins/plugin-docker/che-plugin-docker-client/src/main/java/org/eclipse/che/plugin/docker/client/helper/DefaultNetworkFinder.java rename to infrastructures/docker/docker-client/src/main/java/org/eclipse/che/infrastructure/docker/client/helper/DefaultNetworkFinder.java index e7692effb7..9e9ca85a95 100644 --- a/plugins/plugin-docker/che-plugin-docker-client/src/main/java/org/eclipse/che/plugin/docker/client/helper/DefaultNetworkFinder.java +++ b/infrastructures/docker/docker-client/src/main/java/org/eclipse/che/infrastructure/docker/client/helper/DefaultNetworkFinder.java @@ -8,7 +8,7 @@ * Contributors: * Red Hat, Inc. - initial API and implementation */ -package org.eclipse.che.plugin.docker.client.helper; +package org.eclipse.che.infrastructure.docker.client.helper; import java.net.Inet4Address; import java.net.InetAddress; diff --git a/plugins/plugin-docker/che-plugin-docker-client/src/main/java/org/eclipse/che/plugin/docker/client/helper/NetworkFinder.java b/infrastructures/docker/docker-client/src/main/java/org/eclipse/che/infrastructure/docker/client/helper/NetworkFinder.java similarity index 95% rename from plugins/plugin-docker/che-plugin-docker-client/src/main/java/org/eclipse/che/plugin/docker/client/helper/NetworkFinder.java rename to infrastructures/docker/docker-client/src/main/java/org/eclipse/che/infrastructure/docker/client/helper/NetworkFinder.java index 96dace2e67..00fa0e25cc 100644 --- a/plugins/plugin-docker/che-plugin-docker-client/src/main/java/org/eclipse/che/plugin/docker/client/helper/NetworkFinder.java +++ b/infrastructures/docker/docker-client/src/main/java/org/eclipse/che/infrastructure/docker/client/helper/NetworkFinder.java @@ -8,7 +8,7 @@ * Contributors: * Red Hat, Inc. - initial API and implementation */ -package org.eclipse.che.plugin.docker.client.helper; +package org.eclipse.che.infrastructure.docker.client.helper; import com.google.inject.ImplementedBy; import java.net.InetAddress; diff --git a/plugins/plugin-docker/che-plugin-docker-client/src/main/java/org/eclipse/che/plugin/docker/client/json/Actor.java b/infrastructures/docker/docker-client/src/main/java/org/eclipse/che/infrastructure/docker/client/json/Actor.java similarity index 94% rename from plugins/plugin-docker/che-plugin-docker-client/src/main/java/org/eclipse/che/plugin/docker/client/json/Actor.java rename to infrastructures/docker/docker-client/src/main/java/org/eclipse/che/infrastructure/docker/client/json/Actor.java index 9e94773432..2d456d8e69 100644 --- a/plugins/plugin-docker/che-plugin-docker-client/src/main/java/org/eclipse/che/plugin/docker/client/json/Actor.java +++ b/infrastructures/docker/docker-client/src/main/java/org/eclipse/che/infrastructure/docker/client/json/Actor.java @@ -8,7 +8,7 @@ * Contributors: * Red Hat, Inc. - initial API and implementation */ -package org.eclipse.che.plugin.docker.client.json; +package org.eclipse.che.infrastructure.docker.client.json; import com.google.gson.annotations.SerializedName; import java.util.Map; diff --git a/plugins/plugin-docker/che-plugin-docker-client/src/main/java/org/eclipse/che/plugin/docker/client/json/ContainerCommitted.java b/infrastructures/docker/docker-client/src/main/java/org/eclipse/che/infrastructure/docker/client/json/ContainerCommitted.java similarity index 91% rename from plugins/plugin-docker/che-plugin-docker-client/src/main/java/org/eclipse/che/plugin/docker/client/json/ContainerCommitted.java rename to infrastructures/docker/docker-client/src/main/java/org/eclipse/che/infrastructure/docker/client/json/ContainerCommitted.java index decff4748a..dcdfeb18bf 100644 --- a/plugins/plugin-docker/che-plugin-docker-client/src/main/java/org/eclipse/che/plugin/docker/client/json/ContainerCommitted.java +++ b/infrastructures/docker/docker-client/src/main/java/org/eclipse/che/infrastructure/docker/client/json/ContainerCommitted.java @@ -8,7 +8,7 @@ * Contributors: * Red Hat, Inc. - initial API and implementation */ -package org.eclipse.che.plugin.docker.client.json; +package org.eclipse.che.infrastructure.docker.client.json; /** @author andrew00x */ public class ContainerCommitted { diff --git a/plugins/plugin-docker/che-plugin-docker-client/src/main/java/org/eclipse/che/plugin/docker/client/json/ContainerConfig.java b/infrastructures/docker/docker-client/src/main/java/org/eclipse/che/infrastructure/docker/client/json/ContainerConfig.java similarity index 98% rename from plugins/plugin-docker/che-plugin-docker-client/src/main/java/org/eclipse/che/plugin/docker/client/json/ContainerConfig.java rename to infrastructures/docker/docker-client/src/main/java/org/eclipse/che/infrastructure/docker/client/json/ContainerConfig.java index 784f52815b..4091a63fb1 100644 --- a/plugins/plugin-docker/che-plugin-docker-client/src/main/java/org/eclipse/che/plugin/docker/client/json/ContainerConfig.java +++ b/infrastructures/docker/docker-client/src/main/java/org/eclipse/che/infrastructure/docker/client/json/ContainerConfig.java @@ -8,13 +8,13 @@ * Contributors: * Red Hat, Inc. - initial API and implementation */ -package org.eclipse.che.plugin.docker.client.json; +package org.eclipse.che.infrastructure.docker.client.json; import java.util.Arrays; import java.util.HashMap; import java.util.Map; import java.util.Objects; -import org.eclipse.che.plugin.docker.client.json.container.NetworkingConfig; +import org.eclipse.che.infrastructure.docker.client.json.container.NetworkingConfig; /** @author andrew00x */ public class ContainerConfig { diff --git a/plugins/plugin-docker/che-plugin-docker-client/src/main/java/org/eclipse/che/plugin/docker/client/json/ContainerCreated.java b/infrastructures/docker/docker-client/src/main/java/org/eclipse/che/infrastructure/docker/client/json/ContainerCreated.java similarity index 94% rename from plugins/plugin-docker/che-plugin-docker-client/src/main/java/org/eclipse/che/plugin/docker/client/json/ContainerCreated.java rename to infrastructures/docker/docker-client/src/main/java/org/eclipse/che/infrastructure/docker/client/json/ContainerCreated.java index 5c1fd0d822..7eebdc97c2 100644 --- a/plugins/plugin-docker/che-plugin-docker-client/src/main/java/org/eclipse/che/plugin/docker/client/json/ContainerCreated.java +++ b/infrastructures/docker/docker-client/src/main/java/org/eclipse/che/infrastructure/docker/client/json/ContainerCreated.java @@ -8,7 +8,7 @@ * Contributors: * Red Hat, Inc. - initial API and implementation */ -package org.eclipse.che.plugin.docker.client.json; +package org.eclipse.che.infrastructure.docker.client.json; import java.util.Arrays; diff --git a/plugins/plugin-docker/che-plugin-docker-client/src/main/java/org/eclipse/che/plugin/docker/client/json/ContainerExitStatus.java b/infrastructures/docker/docker-client/src/main/java/org/eclipse/che/infrastructure/docker/client/json/ContainerExitStatus.java similarity index 92% rename from plugins/plugin-docker/che-plugin-docker-client/src/main/java/org/eclipse/che/plugin/docker/client/json/ContainerExitStatus.java rename to infrastructures/docker/docker-client/src/main/java/org/eclipse/che/infrastructure/docker/client/json/ContainerExitStatus.java index 562ad05792..b351450e8c 100644 --- a/plugins/plugin-docker/che-plugin-docker-client/src/main/java/org/eclipse/che/plugin/docker/client/json/ContainerExitStatus.java +++ b/infrastructures/docker/docker-client/src/main/java/org/eclipse/che/infrastructure/docker/client/json/ContainerExitStatus.java @@ -8,7 +8,7 @@ * Contributors: * Red Hat, Inc. - initial API and implementation */ -package org.eclipse.che.plugin.docker.client.json; +package org.eclipse.che.infrastructure.docker.client.json; /** @author andrew00x */ public class ContainerExitStatus { diff --git a/plugins/plugin-docker/che-plugin-docker-client/src/main/java/org/eclipse/che/plugin/docker/client/json/ContainerInfo.java b/infrastructures/docker/docker-client/src/main/java/org/eclipse/che/infrastructure/docker/client/json/ContainerInfo.java similarity index 99% rename from plugins/plugin-docker/che-plugin-docker-client/src/main/java/org/eclipse/che/plugin/docker/client/json/ContainerInfo.java rename to infrastructures/docker/docker-client/src/main/java/org/eclipse/che/infrastructure/docker/client/json/ContainerInfo.java index 236c99fcc5..2cb5a7ba0d 100644 --- a/plugins/plugin-docker/che-plugin-docker-client/src/main/java/org/eclipse/che/plugin/docker/client/json/ContainerInfo.java +++ b/infrastructures/docker/docker-client/src/main/java/org/eclipse/che/infrastructure/docker/client/json/ContainerInfo.java @@ -8,7 +8,7 @@ * Contributors: * Red Hat, Inc. - initial API and implementation */ -package org.eclipse.che.plugin.docker.client.json; +package org.eclipse.che.infrastructure.docker.client.json; import java.util.Arrays; import java.util.HashMap; diff --git a/plugins/plugin-docker/che-plugin-docker-client/src/main/java/org/eclipse/che/plugin/docker/client/json/ContainerListEntry.java b/infrastructures/docker/docker-client/src/main/java/org/eclipse/che/infrastructure/docker/client/json/ContainerListEntry.java similarity index 98% rename from plugins/plugin-docker/che-plugin-docker-client/src/main/java/org/eclipse/che/plugin/docker/client/json/ContainerListEntry.java rename to infrastructures/docker/docker-client/src/main/java/org/eclipse/che/infrastructure/docker/client/json/ContainerListEntry.java index ee9bccc915..9b07dae5d2 100644 --- a/plugins/plugin-docker/che-plugin-docker-client/src/main/java/org/eclipse/che/plugin/docker/client/json/ContainerListEntry.java +++ b/infrastructures/docker/docker-client/src/main/java/org/eclipse/che/infrastructure/docker/client/json/ContainerListEntry.java @@ -8,7 +8,7 @@ * Contributors: * Red Hat, Inc. - initial API and implementation */ -package org.eclipse.che.plugin.docker.client.json; +package org.eclipse.che.infrastructure.docker.client.json; import java.util.Arrays; import java.util.Map; diff --git a/plugins/plugin-docker/che-plugin-docker-client/src/main/java/org/eclipse/che/plugin/docker/client/json/ContainerPort.java b/infrastructures/docker/docker-client/src/main/java/org/eclipse/che/infrastructure/docker/client/json/ContainerPort.java similarity index 95% rename from plugins/plugin-docker/che-plugin-docker-client/src/main/java/org/eclipse/che/plugin/docker/client/json/ContainerPort.java rename to infrastructures/docker/docker-client/src/main/java/org/eclipse/che/infrastructure/docker/client/json/ContainerPort.java index 1c1b77575e..a395a4b211 100644 --- a/plugins/plugin-docker/che-plugin-docker-client/src/main/java/org/eclipse/che/plugin/docker/client/json/ContainerPort.java +++ b/infrastructures/docker/docker-client/src/main/java/org/eclipse/che/infrastructure/docker/client/json/ContainerPort.java @@ -8,7 +8,7 @@ * Contributors: * Red Hat, Inc. - initial API and implementation */ -package org.eclipse.che.plugin.docker.client.json; +package org.eclipse.che.infrastructure.docker.client.json; /** * Defines information about container port which was published to the host diff --git a/plugins/plugin-docker/che-plugin-docker-client/src/main/java/org/eclipse/che/plugin/docker/client/json/ContainerProcesses.java b/infrastructures/docker/docker-client/src/main/java/org/eclipse/che/infrastructure/docker/client/json/ContainerProcesses.java similarity index 92% rename from plugins/plugin-docker/che-plugin-docker-client/src/main/java/org/eclipse/che/plugin/docker/client/json/ContainerProcesses.java rename to infrastructures/docker/docker-client/src/main/java/org/eclipse/che/infrastructure/docker/client/json/ContainerProcesses.java index 9e1af8b68e..ffd5161857 100644 --- a/plugins/plugin-docker/che-plugin-docker-client/src/main/java/org/eclipse/che/plugin/docker/client/json/ContainerProcesses.java +++ b/infrastructures/docker/docker-client/src/main/java/org/eclipse/che/infrastructure/docker/client/json/ContainerProcesses.java @@ -8,7 +8,7 @@ * Contributors: * Red Hat, Inc. - initial API and implementation */ -package org.eclipse.che.plugin.docker.client.json; +package org.eclipse.che.infrastructure.docker.client.json; /** @author andrew00x */ public class ContainerProcesses { diff --git a/plugins/plugin-docker/che-plugin-docker-client/src/main/java/org/eclipse/che/plugin/docker/client/json/ContainerResource.java b/infrastructures/docker/docker-client/src/main/java/org/eclipse/che/infrastructure/docker/client/json/ContainerResource.java similarity index 93% rename from plugins/plugin-docker/che-plugin-docker-client/src/main/java/org/eclipse/che/plugin/docker/client/json/ContainerResource.java rename to infrastructures/docker/docker-client/src/main/java/org/eclipse/che/infrastructure/docker/client/json/ContainerResource.java index df08dfb840..d7e6f95028 100644 --- a/plugins/plugin-docker/che-plugin-docker-client/src/main/java/org/eclipse/che/plugin/docker/client/json/ContainerResource.java +++ b/infrastructures/docker/docker-client/src/main/java/org/eclipse/che/infrastructure/docker/client/json/ContainerResource.java @@ -8,7 +8,7 @@ * Contributors: * Red Hat, Inc. - initial API and implementation */ -package org.eclipse.che.plugin.docker.client.json; +package org.eclipse.che.infrastructure.docker.client.json; /** @author andrew00x */ public class ContainerResource { diff --git a/plugins/plugin-docker/che-plugin-docker-client/src/main/java/org/eclipse/che/plugin/docker/client/json/ContainerState.java b/infrastructures/docker/docker-client/src/main/java/org/eclipse/che/infrastructure/docker/client/json/ContainerState.java similarity index 98% rename from plugins/plugin-docker/che-plugin-docker-client/src/main/java/org/eclipse/che/plugin/docker/client/json/ContainerState.java rename to infrastructures/docker/docker-client/src/main/java/org/eclipse/che/infrastructure/docker/client/json/ContainerState.java index 22e96c8dcf..b814f4c720 100644 --- a/plugins/plugin-docker/che-plugin-docker-client/src/main/java/org/eclipse/che/plugin/docker/client/json/ContainerState.java +++ b/infrastructures/docker/docker-client/src/main/java/org/eclipse/che/infrastructure/docker/client/json/ContainerState.java @@ -8,7 +8,7 @@ * Contributors: * Red Hat, Inc. - initial API and implementation */ -package org.eclipse.che.plugin.docker.client.json; +package org.eclipse.che.infrastructure.docker.client.json; import java.util.Objects; diff --git a/plugins/plugin-docker/che-plugin-docker-client/src/main/java/org/eclipse/che/plugin/docker/client/json/Event.java b/infrastructures/docker/docker-client/src/main/java/org/eclipse/che/infrastructure/docker/client/json/Event.java similarity index 97% rename from plugins/plugin-docker/che-plugin-docker-client/src/main/java/org/eclipse/che/plugin/docker/client/json/Event.java rename to infrastructures/docker/docker-client/src/main/java/org/eclipse/che/infrastructure/docker/client/json/Event.java index efc8a74884..62c04f7345 100644 --- a/plugins/plugin-docker/che-plugin-docker-client/src/main/java/org/eclipse/che/plugin/docker/client/json/Event.java +++ b/infrastructures/docker/docker-client/src/main/java/org/eclipse/che/infrastructure/docker/client/json/Event.java @@ -8,7 +8,7 @@ * Contributors: * Red Hat, Inc. - initial API and implementation */ -package org.eclipse.che.plugin.docker.client.json; +package org.eclipse.che.infrastructure.docker.client.json; import com.google.gson.annotations.SerializedName; diff --git a/plugins/plugin-docker/che-plugin-docker-client/src/main/java/org/eclipse/che/plugin/docker/client/json/ExecConfig.java b/infrastructures/docker/docker-client/src/main/java/org/eclipse/che/infrastructure/docker/client/json/ExecConfig.java similarity index 97% rename from plugins/plugin-docker/che-plugin-docker-client/src/main/java/org/eclipse/che/plugin/docker/client/json/ExecConfig.java rename to infrastructures/docker/docker-client/src/main/java/org/eclipse/che/infrastructure/docker/client/json/ExecConfig.java index 3162f1b476..24262de61b 100644 --- a/plugins/plugin-docker/che-plugin-docker-client/src/main/java/org/eclipse/che/plugin/docker/client/json/ExecConfig.java +++ b/infrastructures/docker/docker-client/src/main/java/org/eclipse/che/infrastructure/docker/client/json/ExecConfig.java @@ -8,7 +8,7 @@ * Contributors: * Red Hat, Inc. - initial API and implementation */ -package org.eclipse.che.plugin.docker.client.json; +package org.eclipse.che.infrastructure.docker.client.json; import java.util.Arrays; diff --git a/plugins/plugin-docker/che-plugin-docker-client/src/main/java/org/eclipse/che/plugin/docker/client/json/ExecCreated.java b/infrastructures/docker/docker-client/src/main/java/org/eclipse/che/infrastructure/docker/client/json/ExecCreated.java similarity index 91% rename from plugins/plugin-docker/che-plugin-docker-client/src/main/java/org/eclipse/che/plugin/docker/client/json/ExecCreated.java rename to infrastructures/docker/docker-client/src/main/java/org/eclipse/che/infrastructure/docker/client/json/ExecCreated.java index ad304618ef..8857584b6d 100644 --- a/plugins/plugin-docker/che-plugin-docker-client/src/main/java/org/eclipse/che/plugin/docker/client/json/ExecCreated.java +++ b/infrastructures/docker/docker-client/src/main/java/org/eclipse/che/infrastructure/docker/client/json/ExecCreated.java @@ -8,7 +8,7 @@ * Contributors: * Red Hat, Inc. - initial API and implementation */ -package org.eclipse.che.plugin.docker.client.json; +package org.eclipse.che.infrastructure.docker.client.json; /** @author andrew00x */ public class ExecCreated { diff --git a/plugins/plugin-docker/che-plugin-docker-client/src/main/java/org/eclipse/che/plugin/docker/client/json/ExecInfo.java b/infrastructures/docker/docker-client/src/main/java/org/eclipse/che/infrastructure/docker/client/json/ExecInfo.java similarity index 97% rename from plugins/plugin-docker/che-plugin-docker-client/src/main/java/org/eclipse/che/plugin/docker/client/json/ExecInfo.java rename to infrastructures/docker/docker-client/src/main/java/org/eclipse/che/infrastructure/docker/client/json/ExecInfo.java index 830c41efe0..3ae24af1d9 100644 --- a/plugins/plugin-docker/che-plugin-docker-client/src/main/java/org/eclipse/che/plugin/docker/client/json/ExecInfo.java +++ b/infrastructures/docker/docker-client/src/main/java/org/eclipse/che/infrastructure/docker/client/json/ExecInfo.java @@ -8,7 +8,7 @@ * Contributors: * Red Hat, Inc. - initial API and implementation */ -package org.eclipse.che.plugin.docker.client.json; +package org.eclipse.che.infrastructure.docker.client.json; /** @author Eugene Voevodin */ public class ExecInfo { diff --git a/plugins/plugin-docker/che-plugin-docker-client/src/main/java/org/eclipse/che/plugin/docker/client/json/ExecStart.java b/infrastructures/docker/docker-client/src/main/java/org/eclipse/che/infrastructure/docker/client/json/ExecStart.java similarity index 94% rename from plugins/plugin-docker/che-plugin-docker-client/src/main/java/org/eclipse/che/plugin/docker/client/json/ExecStart.java rename to infrastructures/docker/docker-client/src/main/java/org/eclipse/che/infrastructure/docker/client/json/ExecStart.java index 628b0092eb..39a05d1ea6 100644 --- a/plugins/plugin-docker/che-plugin-docker-client/src/main/java/org/eclipse/che/plugin/docker/client/json/ExecStart.java +++ b/infrastructures/docker/docker-client/src/main/java/org/eclipse/che/infrastructure/docker/client/json/ExecStart.java @@ -8,7 +8,7 @@ * Contributors: * Red Hat, Inc. - initial API and implementation */ -package org.eclipse.che.plugin.docker.client.json; +package org.eclipse.che.infrastructure.docker.client.json; /** @author andrew00x */ public class ExecStart { diff --git a/plugins/plugin-docker/che-plugin-docker-client/src/main/java/org/eclipse/che/plugin/docker/client/json/ExposedPort.java b/infrastructures/docker/docker-client/src/main/java/org/eclipse/che/infrastructure/docker/client/json/ExposedPort.java similarity index 92% rename from plugins/plugin-docker/che-plugin-docker-client/src/main/java/org/eclipse/che/plugin/docker/client/json/ExposedPort.java rename to infrastructures/docker/docker-client/src/main/java/org/eclipse/che/infrastructure/docker/client/json/ExposedPort.java index 6ef3643998..b1b3a8f3a2 100644 --- a/plugins/plugin-docker/che-plugin-docker-client/src/main/java/org/eclipse/che/plugin/docker/client/json/ExposedPort.java +++ b/infrastructures/docker/docker-client/src/main/java/org/eclipse/che/infrastructure/docker/client/json/ExposedPort.java @@ -8,7 +8,7 @@ * Contributors: * Red Hat, Inc. - initial API and implementation */ -package org.eclipse.che.plugin.docker.client.json; +package org.eclipse.che.infrastructure.docker.client.json; /** @author andrew00x */ /* diff --git a/plugins/plugin-docker/che-plugin-docker-client/src/main/java/org/eclipse/che/plugin/docker/client/json/Filters.java b/infrastructures/docker/docker-client/src/main/java/org/eclipse/che/infrastructure/docker/client/json/Filters.java similarity index 96% rename from plugins/plugin-docker/che-plugin-docker-client/src/main/java/org/eclipse/che/plugin/docker/client/json/Filters.java rename to infrastructures/docker/docker-client/src/main/java/org/eclipse/che/infrastructure/docker/client/json/Filters.java index 25c2b08cfd..4f15547df0 100644 --- a/plugins/plugin-docker/che-plugin-docker-client/src/main/java/org/eclipse/che/plugin/docker/client/json/Filters.java +++ b/infrastructures/docker/docker-client/src/main/java/org/eclipse/che/infrastructure/docker/client/json/Filters.java @@ -8,7 +8,7 @@ * Contributors: * Red Hat, Inc. - initial API and implementation */ -package org.eclipse.che.plugin.docker.client.json; +package org.eclipse.che.infrastructure.docker.client.json; import com.google.common.collect.Maps; import java.util.Arrays; diff --git a/plugins/plugin-docker/che-plugin-docker-client/src/main/java/org/eclipse/che/plugin/docker/client/json/HostConfig.java b/infrastructures/docker/docker-client/src/main/java/org/eclipse/che/infrastructure/docker/client/json/HostConfig.java similarity index 99% rename from plugins/plugin-docker/che-plugin-docker-client/src/main/java/org/eclipse/che/plugin/docker/client/json/HostConfig.java rename to infrastructures/docker/docker-client/src/main/java/org/eclipse/che/infrastructure/docker/client/json/HostConfig.java index 5d20143772..d61ba7807f 100644 --- a/plugins/plugin-docker/che-plugin-docker-client/src/main/java/org/eclipse/che/plugin/docker/client/json/HostConfig.java +++ b/infrastructures/docker/docker-client/src/main/java/org/eclipse/che/infrastructure/docker/client/json/HostConfig.java @@ -8,7 +8,7 @@ * Contributors: * Red Hat, Inc. - initial API and implementation */ -package org.eclipse.che.plugin.docker.client.json; +package org.eclipse.che.infrastructure.docker.client.json; import java.util.Arrays; import java.util.HashMap; diff --git a/plugins/plugin-docker/che-plugin-docker-client/src/main/java/org/eclipse/che/plugin/docker/client/json/Image.java b/infrastructures/docker/docker-client/src/main/java/org/eclipse/che/infrastructure/docker/client/json/Image.java similarity index 97% rename from plugins/plugin-docker/che-plugin-docker-client/src/main/java/org/eclipse/che/plugin/docker/client/json/Image.java rename to infrastructures/docker/docker-client/src/main/java/org/eclipse/che/infrastructure/docker/client/json/Image.java index 51b200e86c..2cb195d0b8 100644 --- a/plugins/plugin-docker/che-plugin-docker-client/src/main/java/org/eclipse/che/plugin/docker/client/json/Image.java +++ b/infrastructures/docker/docker-client/src/main/java/org/eclipse/che/infrastructure/docker/client/json/Image.java @@ -8,7 +8,7 @@ * Contributors: * Red Hat, Inc. - initial API and implementation */ -package org.eclipse.che.plugin.docker.client.json; +package org.eclipse.che.infrastructure.docker.client.json; import java.util.Arrays; import java.util.Map; diff --git a/plugins/plugin-docker/che-plugin-docker-client/src/main/java/org/eclipse/che/plugin/docker/client/json/ImageConfig.java b/infrastructures/docker/docker-client/src/main/java/org/eclipse/che/infrastructure/docker/client/json/ImageConfig.java similarity index 99% rename from plugins/plugin-docker/che-plugin-docker-client/src/main/java/org/eclipse/che/plugin/docker/client/json/ImageConfig.java rename to infrastructures/docker/docker-client/src/main/java/org/eclipse/che/infrastructure/docker/client/json/ImageConfig.java index 515de79d1c..f15473e0a5 100644 --- a/plugins/plugin-docker/che-plugin-docker-client/src/main/java/org/eclipse/che/plugin/docker/client/json/ImageConfig.java +++ b/infrastructures/docker/docker-client/src/main/java/org/eclipse/che/infrastructure/docker/client/json/ImageConfig.java @@ -8,7 +8,7 @@ * Contributors: * Red Hat, Inc. - initial API and implementation */ -package org.eclipse.che.plugin.docker.client.json; +package org.eclipse.che.infrastructure.docker.client.json; import java.util.Arrays; import java.util.HashMap; diff --git a/plugins/plugin-docker/che-plugin-docker-client/src/main/java/org/eclipse/che/plugin/docker/client/json/ImageInfo.java b/infrastructures/docker/docker-client/src/main/java/org/eclipse/che/infrastructure/docker/client/json/ImageInfo.java similarity index 98% rename from plugins/plugin-docker/che-plugin-docker-client/src/main/java/org/eclipse/che/plugin/docker/client/json/ImageInfo.java rename to infrastructures/docker/docker-client/src/main/java/org/eclipse/che/infrastructure/docker/client/json/ImageInfo.java index 6fe0f4fe6b..9abb345225 100644 --- a/plugins/plugin-docker/che-plugin-docker-client/src/main/java/org/eclipse/che/plugin/docker/client/json/ImageInfo.java +++ b/infrastructures/docker/docker-client/src/main/java/org/eclipse/che/infrastructure/docker/client/json/ImageInfo.java @@ -8,7 +8,7 @@ * Contributors: * Red Hat, Inc. - initial API and implementation */ -package org.eclipse.che.plugin.docker.client.json; +package org.eclipse.che.infrastructure.docker.client.json; /** @author andrew00x */ public class ImageInfo { diff --git a/plugins/plugin-docker/che-plugin-docker-client/src/main/java/org/eclipse/che/plugin/docker/client/json/LogConfig.java b/infrastructures/docker/docker-client/src/main/java/org/eclipse/che/infrastructure/docker/client/json/LogConfig.java similarity index 94% rename from plugins/plugin-docker/che-plugin-docker-client/src/main/java/org/eclipse/che/plugin/docker/client/json/LogConfig.java rename to infrastructures/docker/docker-client/src/main/java/org/eclipse/che/infrastructure/docker/client/json/LogConfig.java index 8aefc1e6f1..088cf4b46d 100644 --- a/plugins/plugin-docker/che-plugin-docker-client/src/main/java/org/eclipse/che/plugin/docker/client/json/LogConfig.java +++ b/infrastructures/docker/docker-client/src/main/java/org/eclipse/che/infrastructure/docker/client/json/LogConfig.java @@ -8,7 +8,7 @@ * Contributors: * Red Hat, Inc. - initial API and implementation */ -package org.eclipse.che.plugin.docker.client.json; +package org.eclipse.che.infrastructure.docker.client.json; import java.util.HashMap; import java.util.Map; diff --git a/plugins/plugin-docker/che-plugin-docker-client/src/main/java/org/eclipse/che/plugin/docker/client/json/LxcConfParam.java b/infrastructures/docker/docker-client/src/main/java/org/eclipse/che/infrastructure/docker/client/json/LxcConfParam.java similarity index 94% rename from plugins/plugin-docker/che-plugin-docker-client/src/main/java/org/eclipse/che/plugin/docker/client/json/LxcConfParam.java rename to infrastructures/docker/docker-client/src/main/java/org/eclipse/che/infrastructure/docker/client/json/LxcConfParam.java index 09480cbaae..a30aba9a70 100644 --- a/plugins/plugin-docker/che-plugin-docker-client/src/main/java/org/eclipse/che/plugin/docker/client/json/LxcConfParam.java +++ b/infrastructures/docker/docker-client/src/main/java/org/eclipse/che/infrastructure/docker/client/json/LxcConfParam.java @@ -8,7 +8,7 @@ * Contributors: * Red Hat, Inc. - initial API and implementation */ -package org.eclipse.che.plugin.docker.client.json; +package org.eclipse.che.infrastructure.docker.client.json; /** @author andrew00x */ public class LxcConfParam { diff --git a/plugins/plugin-docker/che-plugin-docker-client/src/main/java/org/eclipse/che/plugin/docker/client/json/NetworkCreated.java b/infrastructures/docker/docker-client/src/main/java/org/eclipse/che/infrastructure/docker/client/json/NetworkCreated.java similarity index 96% rename from plugins/plugin-docker/che-plugin-docker-client/src/main/java/org/eclipse/che/plugin/docker/client/json/NetworkCreated.java rename to infrastructures/docker/docker-client/src/main/java/org/eclipse/che/infrastructure/docker/client/json/NetworkCreated.java index 438781b229..2df3c534e1 100644 --- a/plugins/plugin-docker/che-plugin-docker-client/src/main/java/org/eclipse/che/plugin/docker/client/json/NetworkCreated.java +++ b/infrastructures/docker/docker-client/src/main/java/org/eclipse/che/infrastructure/docker/client/json/NetworkCreated.java @@ -8,7 +8,7 @@ * Contributors: * Red Hat, Inc. - initial API and implementation */ -package org.eclipse.che.plugin.docker.client.json; +package org.eclipse.che.infrastructure.docker.client.json; import java.util.Objects; diff --git a/plugins/plugin-docker/che-plugin-docker-client/src/main/java/org/eclipse/che/plugin/docker/client/json/NetworkSettings.java b/infrastructures/docker/docker-client/src/main/java/org/eclipse/che/infrastructure/docker/client/json/NetworkSettings.java similarity index 98% rename from plugins/plugin-docker/che-plugin-docker-client/src/main/java/org/eclipse/che/plugin/docker/client/json/NetworkSettings.java rename to infrastructures/docker/docker-client/src/main/java/org/eclipse/che/infrastructure/docker/client/json/NetworkSettings.java index da1e48c15a..af90aad704 100644 --- a/plugins/plugin-docker/che-plugin-docker-client/src/main/java/org/eclipse/che/plugin/docker/client/json/NetworkSettings.java +++ b/infrastructures/docker/docker-client/src/main/java/org/eclipse/che/infrastructure/docker/client/json/NetworkSettings.java @@ -8,7 +8,7 @@ * Contributors: * Red Hat, Inc. - initial API and implementation */ -package org.eclipse.che.plugin.docker.client.json; +package org.eclipse.che.infrastructure.docker.client.json; import com.google.gson.annotations.SerializedName; import java.util.Arrays; diff --git a/plugins/plugin-docker/che-plugin-docker-client/src/main/java/org/eclipse/che/plugin/docker/client/json/Node.java b/infrastructures/docker/docker-client/src/main/java/org/eclipse/che/infrastructure/docker/client/json/Node.java similarity index 97% rename from plugins/plugin-docker/che-plugin-docker-client/src/main/java/org/eclipse/che/plugin/docker/client/json/Node.java rename to infrastructures/docker/docker-client/src/main/java/org/eclipse/che/infrastructure/docker/client/json/Node.java index 2e3b1050a5..a250b332a2 100644 --- a/plugins/plugin-docker/che-plugin-docker-client/src/main/java/org/eclipse/che/plugin/docker/client/json/Node.java +++ b/infrastructures/docker/docker-client/src/main/java/org/eclipse/che/infrastructure/docker/client/json/Node.java @@ -8,7 +8,7 @@ * Contributors: * Red Hat, Inc. - initial API and implementation */ -package org.eclipse.che.plugin.docker.client.json; +package org.eclipse.che.infrastructure.docker.client.json; import java.util.HashMap; import java.util.Map; diff --git a/plugins/plugin-docker/che-plugin-docker-client/src/main/java/org/eclipse/che/plugin/docker/client/json/PortBinding.java b/infrastructures/docker/docker-client/src/main/java/org/eclipse/che/infrastructure/docker/client/json/PortBinding.java similarity index 95% rename from plugins/plugin-docker/che-plugin-docker-client/src/main/java/org/eclipse/che/plugin/docker/client/json/PortBinding.java rename to infrastructures/docker/docker-client/src/main/java/org/eclipse/che/infrastructure/docker/client/json/PortBinding.java index a4449f931f..21242acbf9 100644 --- a/plugins/plugin-docker/che-plugin-docker-client/src/main/java/org/eclipse/che/plugin/docker/client/json/PortBinding.java +++ b/infrastructures/docker/docker-client/src/main/java/org/eclipse/che/infrastructure/docker/client/json/PortBinding.java @@ -8,7 +8,7 @@ * Contributors: * Red Hat, Inc. - initial API and implementation */ -package org.eclipse.che.plugin.docker.client.json; +package org.eclipse.che.infrastructure.docker.client.json; /** @author andrew00x */ public class PortBinding { diff --git a/plugins/plugin-docker/che-plugin-docker-client/src/main/java/org/eclipse/che/plugin/docker/client/json/ProcessConfig.java b/infrastructures/docker/docker-client/src/main/java/org/eclipse/che/infrastructure/docker/client/json/ProcessConfig.java similarity index 96% rename from plugins/plugin-docker/che-plugin-docker-client/src/main/java/org/eclipse/che/plugin/docker/client/json/ProcessConfig.java rename to infrastructures/docker/docker-client/src/main/java/org/eclipse/che/infrastructure/docker/client/json/ProcessConfig.java index 8fa19de4bc..cc56f5da86 100644 --- a/plugins/plugin-docker/che-plugin-docker-client/src/main/java/org/eclipse/che/plugin/docker/client/json/ProcessConfig.java +++ b/infrastructures/docker/docker-client/src/main/java/org/eclipse/che/infrastructure/docker/client/json/ProcessConfig.java @@ -8,7 +8,7 @@ * Contributors: * Red Hat, Inc. - initial API and implementation */ -package org.eclipse.che.plugin.docker.client.json; +package org.eclipse.che.infrastructure.docker.client.json; import java.util.Arrays; diff --git a/plugins/plugin-docker/che-plugin-docker-client/src/main/java/org/eclipse/che/plugin/docker/client/json/ProgressDetail.java b/infrastructures/docker/docker-client/src/main/java/org/eclipse/che/infrastructure/docker/client/json/ProgressDetail.java similarity index 94% rename from plugins/plugin-docker/che-plugin-docker-client/src/main/java/org/eclipse/che/plugin/docker/client/json/ProgressDetail.java rename to infrastructures/docker/docker-client/src/main/java/org/eclipse/che/infrastructure/docker/client/json/ProgressDetail.java index 0fa6757cd5..2b5cc8c114 100644 --- a/plugins/plugin-docker/che-plugin-docker-client/src/main/java/org/eclipse/che/plugin/docker/client/json/ProgressDetail.java +++ b/infrastructures/docker/docker-client/src/main/java/org/eclipse/che/infrastructure/docker/client/json/ProgressDetail.java @@ -8,7 +8,7 @@ * Contributors: * Red Hat, Inc. - initial API and implementation */ -package org.eclipse.che.plugin.docker.client.json; +package org.eclipse.che.infrastructure.docker.client.json; /** @author andrew00x */ public class ProgressDetail { diff --git a/plugins/plugin-docker/che-plugin-docker-client/src/main/java/org/eclipse/che/plugin/docker/client/json/ProgressStatus.java b/infrastructures/docker/docker-client/src/main/java/org/eclipse/che/infrastructure/docker/client/json/ProgressStatus.java similarity index 96% rename from plugins/plugin-docker/che-plugin-docker-client/src/main/java/org/eclipse/che/plugin/docker/client/json/ProgressStatus.java rename to infrastructures/docker/docker-client/src/main/java/org/eclipse/che/infrastructure/docker/client/json/ProgressStatus.java index 716ec55298..28c2d7f54e 100644 --- a/plugins/plugin-docker/che-plugin-docker-client/src/main/java/org/eclipse/che/plugin/docker/client/json/ProgressStatus.java +++ b/infrastructures/docker/docker-client/src/main/java/org/eclipse/che/infrastructure/docker/client/json/ProgressStatus.java @@ -8,7 +8,7 @@ * Contributors: * Red Hat, Inc. - initial API and implementation */ -package org.eclipse.che.plugin.docker.client.json; +package org.eclipse.che.infrastructure.docker.client.json; /** @author andrew00x */ public class ProgressStatus { diff --git a/plugins/plugin-docker/che-plugin-docker-client/src/main/java/org/eclipse/che/plugin/docker/client/json/RestartPolicy.java b/infrastructures/docker/docker-client/src/main/java/org/eclipse/che/infrastructure/docker/client/json/RestartPolicy.java similarity index 95% rename from plugins/plugin-docker/che-plugin-docker-client/src/main/java/org/eclipse/che/plugin/docker/client/json/RestartPolicy.java rename to infrastructures/docker/docker-client/src/main/java/org/eclipse/che/infrastructure/docker/client/json/RestartPolicy.java index 4da30092e4..959480e265 100644 --- a/plugins/plugin-docker/che-plugin-docker-client/src/main/java/org/eclipse/che/plugin/docker/client/json/RestartPolicy.java +++ b/infrastructures/docker/docker-client/src/main/java/org/eclipse/che/infrastructure/docker/client/json/RestartPolicy.java @@ -8,7 +8,7 @@ * Contributors: * Red Hat, Inc. - initial API and implementation */ -package org.eclipse.che.plugin.docker.client.json; +package org.eclipse.che.infrastructure.docker.client.json; /** @author Alexander Garagatyi */ public class RestartPolicy { diff --git a/plugins/plugin-docker/che-plugin-docker-client/src/main/java/org/eclipse/che/plugin/docker/client/json/SystemInfo.java b/infrastructures/docker/docker-client/src/main/java/org/eclipse/che/infrastructure/docker/client/json/SystemInfo.java similarity index 99% rename from plugins/plugin-docker/che-plugin-docker-client/src/main/java/org/eclipse/che/plugin/docker/client/json/SystemInfo.java rename to infrastructures/docker/docker-client/src/main/java/org/eclipse/che/infrastructure/docker/client/json/SystemInfo.java index 40eca9eda1..3ef5797ab0 100644 --- a/plugins/plugin-docker/che-plugin-docker-client/src/main/java/org/eclipse/che/plugin/docker/client/json/SystemInfo.java +++ b/infrastructures/docker/docker-client/src/main/java/org/eclipse/che/infrastructure/docker/client/json/SystemInfo.java @@ -8,7 +8,7 @@ * Contributors: * Red Hat, Inc. - initial API and implementation */ -package org.eclipse.che.plugin.docker.client.json; +package org.eclipse.che.infrastructure.docker.client.json; import java.util.Arrays; import java.util.Objects; diff --git a/plugins/plugin-docker/che-plugin-docker-client/src/main/java/org/eclipse/che/plugin/docker/client/json/Ulimit.java b/infrastructures/docker/docker-client/src/main/java/org/eclipse/che/infrastructure/docker/client/json/Ulimit.java similarity index 94% rename from plugins/plugin-docker/che-plugin-docker-client/src/main/java/org/eclipse/che/plugin/docker/client/json/Ulimit.java rename to infrastructures/docker/docker-client/src/main/java/org/eclipse/che/infrastructure/docker/client/json/Ulimit.java index 41cc488ec2..ab7c639690 100644 --- a/plugins/plugin-docker/che-plugin-docker-client/src/main/java/org/eclipse/che/plugin/docker/client/json/Ulimit.java +++ b/infrastructures/docker/docker-client/src/main/java/org/eclipse/che/infrastructure/docker/client/json/Ulimit.java @@ -8,7 +8,7 @@ * Contributors: * Red Hat, Inc. - initial API and implementation */ -package org.eclipse.che.plugin.docker.client.json; +package org.eclipse.che.infrastructure.docker.client.json; /** @author Alexander Garagatyi */ public class Ulimit { diff --git a/plugins/plugin-docker/che-plugin-docker-client/src/main/java/org/eclipse/che/plugin/docker/client/json/Version.java b/infrastructures/docker/docker-client/src/main/java/org/eclipse/che/infrastructure/docker/client/json/Version.java similarity index 97% rename from plugins/plugin-docker/che-plugin-docker-client/src/main/java/org/eclipse/che/plugin/docker/client/json/Version.java rename to infrastructures/docker/docker-client/src/main/java/org/eclipse/che/infrastructure/docker/client/json/Version.java index c716258281..c005870a6e 100644 --- a/plugins/plugin-docker/che-plugin-docker-client/src/main/java/org/eclipse/che/plugin/docker/client/json/Version.java +++ b/infrastructures/docker/docker-client/src/main/java/org/eclipse/che/infrastructure/docker/client/json/Version.java @@ -8,7 +8,7 @@ * Contributors: * Red Hat, Inc. - initial API and implementation */ -package org.eclipse.che.plugin.docker.client.json; +package org.eclipse.che.infrastructure.docker.client.json; import java.util.Objects; diff --git a/plugins/plugin-docker/che-plugin-docker-client/src/main/java/org/eclipse/che/plugin/docker/client/json/Volume.java b/infrastructures/docker/docker-client/src/main/java/org/eclipse/che/infrastructure/docker/client/json/Volume.java similarity index 93% rename from plugins/plugin-docker/che-plugin-docker-client/src/main/java/org/eclipse/che/plugin/docker/client/json/Volume.java rename to infrastructures/docker/docker-client/src/main/java/org/eclipse/che/infrastructure/docker/client/json/Volume.java index 949fb3bca2..04892c4987 100644 --- a/plugins/plugin-docker/che-plugin-docker-client/src/main/java/org/eclipse/che/plugin/docker/client/json/Volume.java +++ b/infrastructures/docker/docker-client/src/main/java/org/eclipse/che/infrastructure/docker/client/json/Volume.java @@ -8,7 +8,7 @@ * Contributors: * Red Hat, Inc. - initial API and implementation */ -package org.eclipse.che.plugin.docker.client.json; +package org.eclipse.che.infrastructure.docker.client.json; /** @author andrew00x */ /* diff --git a/plugins/plugin-docker/che-plugin-docker-client/src/main/java/org/eclipse/che/plugin/docker/client/json/container/NetworkingConfig.java b/infrastructures/docker/docker-client/src/main/java/org/eclipse/che/infrastructure/docker/client/json/container/NetworkingConfig.java similarity index 87% rename from plugins/plugin-docker/che-plugin-docker-client/src/main/java/org/eclipse/che/plugin/docker/client/json/container/NetworkingConfig.java rename to infrastructures/docker/docker-client/src/main/java/org/eclipse/che/infrastructure/docker/client/json/container/NetworkingConfig.java index a7e574e27b..e353f251d2 100644 --- a/plugins/plugin-docker/che-plugin-docker-client/src/main/java/org/eclipse/che/plugin/docker/client/json/container/NetworkingConfig.java +++ b/infrastructures/docker/docker-client/src/main/java/org/eclipse/che/infrastructure/docker/client/json/container/NetworkingConfig.java @@ -8,14 +8,14 @@ * Contributors: * Red Hat, Inc. - initial API and implementation */ -package org.eclipse.che.plugin.docker.client.json.container; +package org.eclipse.che.infrastructure.docker.client.json.container; import java.util.Map; -import org.eclipse.che.plugin.docker.client.json.network.EndpointConfig; +import org.eclipse.che.infrastructure.docker.client.json.network.EndpointConfig; /** * Represents description of network inside {@link - * org.eclipse.che.plugin.docker.client.json.ContainerConfig} + * org.eclipse.che.infrastructure.docker.client.json.ContainerConfig} * * @author Alexander Garagatyi */ diff --git a/plugins/plugin-docker/che-plugin-docker-client/src/main/java/org/eclipse/che/plugin/docker/client/json/network/ConnectContainer.java b/infrastructures/docker/docker-client/src/main/java/org/eclipse/che/infrastructure/docker/client/json/network/ConnectContainer.java similarity index 96% rename from plugins/plugin-docker/che-plugin-docker-client/src/main/java/org/eclipse/che/plugin/docker/client/json/network/ConnectContainer.java rename to infrastructures/docker/docker-client/src/main/java/org/eclipse/che/infrastructure/docker/client/json/network/ConnectContainer.java index 5444479cf9..8a9b4b4314 100644 --- a/plugins/plugin-docker/che-plugin-docker-client/src/main/java/org/eclipse/che/plugin/docker/client/json/network/ConnectContainer.java +++ b/infrastructures/docker/docker-client/src/main/java/org/eclipse/che/infrastructure/docker/client/json/network/ConnectContainer.java @@ -8,7 +8,7 @@ * Contributors: * Red Hat, Inc. - initial API and implementation */ -package org.eclipse.che.plugin.docker.client.json.network; +package org.eclipse.che.infrastructure.docker.client.json.network; import java.util.Objects; diff --git a/plugins/plugin-docker/che-plugin-docker-client/src/main/java/org/eclipse/che/plugin/docker/client/json/network/ContainerInNetwork.java b/infrastructures/docker/docker-client/src/main/java/org/eclipse/che/infrastructure/docker/client/json/network/ContainerInNetwork.java similarity index 97% rename from plugins/plugin-docker/che-plugin-docker-client/src/main/java/org/eclipse/che/plugin/docker/client/json/network/ContainerInNetwork.java rename to infrastructures/docker/docker-client/src/main/java/org/eclipse/che/infrastructure/docker/client/json/network/ContainerInNetwork.java index 54035287cb..b20b15f54e 100644 --- a/plugins/plugin-docker/che-plugin-docker-client/src/main/java/org/eclipse/che/plugin/docker/client/json/network/ContainerInNetwork.java +++ b/infrastructures/docker/docker-client/src/main/java/org/eclipse/che/infrastructure/docker/client/json/network/ContainerInNetwork.java @@ -8,7 +8,7 @@ * Contributors: * Red Hat, Inc. - initial API and implementation */ -package org.eclipse.che.plugin.docker.client.json.network; +package org.eclipse.che.infrastructure.docker.client.json.network; import java.util.Objects; diff --git a/plugins/plugin-docker/che-plugin-docker-client/src/main/java/org/eclipse/che/plugin/docker/client/json/network/DisconnectContainer.java b/infrastructures/docker/docker-client/src/main/java/org/eclipse/che/infrastructure/docker/client/json/network/DisconnectContainer.java similarity index 96% rename from plugins/plugin-docker/che-plugin-docker-client/src/main/java/org/eclipse/che/plugin/docker/client/json/network/DisconnectContainer.java rename to infrastructures/docker/docker-client/src/main/java/org/eclipse/che/infrastructure/docker/client/json/network/DisconnectContainer.java index cb16f5751c..c9473222b7 100644 --- a/plugins/plugin-docker/che-plugin-docker-client/src/main/java/org/eclipse/che/plugin/docker/client/json/network/DisconnectContainer.java +++ b/infrastructures/docker/docker-client/src/main/java/org/eclipse/che/infrastructure/docker/client/json/network/DisconnectContainer.java @@ -8,7 +8,7 @@ * Contributors: * Red Hat, Inc. - initial API and implementation */ -package org.eclipse.che.plugin.docker.client.json.network; +package org.eclipse.che.infrastructure.docker.client.json.network; import java.util.Objects; diff --git a/plugins/plugin-docker/che-plugin-docker-client/src/main/java/org/eclipse/che/plugin/docker/client/json/network/EndpointConfig.java b/infrastructures/docker/docker-client/src/main/java/org/eclipse/che/infrastructure/docker/client/json/network/EndpointConfig.java similarity index 97% rename from plugins/plugin-docker/che-plugin-docker-client/src/main/java/org/eclipse/che/plugin/docker/client/json/network/EndpointConfig.java rename to infrastructures/docker/docker-client/src/main/java/org/eclipse/che/infrastructure/docker/client/json/network/EndpointConfig.java index 79b7cd6984..d1389a880d 100644 --- a/plugins/plugin-docker/che-plugin-docker-client/src/main/java/org/eclipse/che/plugin/docker/client/json/network/EndpointConfig.java +++ b/infrastructures/docker/docker-client/src/main/java/org/eclipse/che/infrastructure/docker/client/json/network/EndpointConfig.java @@ -8,7 +8,7 @@ * Contributors: * Red Hat, Inc. - initial API and implementation */ -package org.eclipse.che.plugin.docker.client.json.network; +package org.eclipse.che.infrastructure.docker.client.json.network; import java.util.Arrays; import java.util.Objects; diff --git a/plugins/plugin-docker/che-plugin-docker-client/src/main/java/org/eclipse/che/plugin/docker/client/json/network/Ipam.java b/infrastructures/docker/docker-client/src/main/java/org/eclipse/che/infrastructure/docker/client/json/network/Ipam.java similarity index 96% rename from plugins/plugin-docker/che-plugin-docker-client/src/main/java/org/eclipse/che/plugin/docker/client/json/network/Ipam.java rename to infrastructures/docker/docker-client/src/main/java/org/eclipse/che/infrastructure/docker/client/json/network/Ipam.java index 05905cac3a..36af8f64ca 100644 --- a/plugins/plugin-docker/che-plugin-docker-client/src/main/java/org/eclipse/che/plugin/docker/client/json/network/Ipam.java +++ b/infrastructures/docker/docker-client/src/main/java/org/eclipse/che/infrastructure/docker/client/json/network/Ipam.java @@ -8,7 +8,7 @@ * Contributors: * Red Hat, Inc. - initial API and implementation */ -package org.eclipse.che.plugin.docker.client.json.network; +package org.eclipse.che.infrastructure.docker.client.json.network; import java.util.List; import java.util.Map; diff --git a/plugins/plugin-docker/che-plugin-docker-client/src/main/java/org/eclipse/che/plugin/docker/client/json/network/IpamConfig.java b/infrastructures/docker/docker-client/src/main/java/org/eclipse/che/infrastructure/docker/client/json/network/IpamConfig.java similarity index 96% rename from plugins/plugin-docker/che-plugin-docker-client/src/main/java/org/eclipse/che/plugin/docker/client/json/network/IpamConfig.java rename to infrastructures/docker/docker-client/src/main/java/org/eclipse/che/infrastructure/docker/client/json/network/IpamConfig.java index cc57960b87..0e6d5e414c 100644 --- a/plugins/plugin-docker/che-plugin-docker-client/src/main/java/org/eclipse/che/plugin/docker/client/json/network/IpamConfig.java +++ b/infrastructures/docker/docker-client/src/main/java/org/eclipse/che/infrastructure/docker/client/json/network/IpamConfig.java @@ -8,7 +8,7 @@ * Contributors: * Red Hat, Inc. - initial API and implementation */ -package org.eclipse.che.plugin.docker.client.json.network; +package org.eclipse.che.infrastructure.docker.client.json.network; import java.util.Objects; diff --git a/plugins/plugin-docker/che-plugin-docker-client/src/main/java/org/eclipse/che/plugin/docker/client/json/network/Network.java b/infrastructures/docker/docker-client/src/main/java/org/eclipse/che/infrastructure/docker/client/json/network/Network.java similarity index 98% rename from plugins/plugin-docker/che-plugin-docker-client/src/main/java/org/eclipse/che/plugin/docker/client/json/network/Network.java rename to infrastructures/docker/docker-client/src/main/java/org/eclipse/che/infrastructure/docker/client/json/network/Network.java index 0c94847f68..bb7f8491fd 100644 --- a/plugins/plugin-docker/che-plugin-docker-client/src/main/java/org/eclipse/che/plugin/docker/client/json/network/Network.java +++ b/infrastructures/docker/docker-client/src/main/java/org/eclipse/che/infrastructure/docker/client/json/network/Network.java @@ -8,7 +8,7 @@ * Contributors: * Red Hat, Inc. - initial API and implementation */ -package org.eclipse.che.plugin.docker.client.json.network; +package org.eclipse.che.infrastructure.docker.client.json.network; import java.util.Map; import java.util.Objects; diff --git a/plugins/plugin-docker/che-plugin-docker-client/src/main/java/org/eclipse/che/plugin/docker/client/json/network/NewIpamConfig.java b/infrastructures/docker/docker-client/src/main/java/org/eclipse/che/infrastructure/docker/client/json/network/NewIpamConfig.java similarity index 96% rename from plugins/plugin-docker/che-plugin-docker-client/src/main/java/org/eclipse/che/plugin/docker/client/json/network/NewIpamConfig.java rename to infrastructures/docker/docker-client/src/main/java/org/eclipse/che/infrastructure/docker/client/json/network/NewIpamConfig.java index 78a90bf039..4395d31343 100644 --- a/plugins/plugin-docker/che-plugin-docker-client/src/main/java/org/eclipse/che/plugin/docker/client/json/network/NewIpamConfig.java +++ b/infrastructures/docker/docker-client/src/main/java/org/eclipse/che/infrastructure/docker/client/json/network/NewIpamConfig.java @@ -8,7 +8,7 @@ * Contributors: * Red Hat, Inc. - initial API and implementation */ -package org.eclipse.che.plugin.docker.client.json.network; +package org.eclipse.che.infrastructure.docker.client.json.network; import java.util.Objects; diff --git a/plugins/plugin-docker/che-plugin-docker-client/src/main/java/org/eclipse/che/plugin/docker/client/json/network/NewNetwork.java b/infrastructures/docker/docker-client/src/main/java/org/eclipse/che/infrastructure/docker/client/json/network/NewNetwork.java similarity index 98% rename from plugins/plugin-docker/che-plugin-docker-client/src/main/java/org/eclipse/che/plugin/docker/client/json/network/NewNetwork.java rename to infrastructures/docker/docker-client/src/main/java/org/eclipse/che/infrastructure/docker/client/json/network/NewNetwork.java index 5cd6fc2cfa..bf18dd2674 100644 --- a/plugins/plugin-docker/che-plugin-docker-client/src/main/java/org/eclipse/che/plugin/docker/client/json/network/NewNetwork.java +++ b/infrastructures/docker/docker-client/src/main/java/org/eclipse/che/infrastructure/docker/client/json/network/NewNetwork.java @@ -8,7 +8,7 @@ * Contributors: * Red Hat, Inc. - initial API and implementation */ -package org.eclipse.che.plugin.docker.client.json.network; +package org.eclipse.che.infrastructure.docker.client.json.network; import java.util.Map; import java.util.Objects; diff --git a/plugins/plugin-docker/che-plugin-docker-client/src/main/java/org/eclipse/che/plugin/docker/client/params/AttachContainerParams.java b/infrastructures/docker/docker-client/src/main/java/org/eclipse/che/infrastructure/docker/client/params/AttachContainerParams.java similarity index 89% rename from plugins/plugin-docker/che-plugin-docker-client/src/main/java/org/eclipse/che/plugin/docker/client/params/AttachContainerParams.java rename to infrastructures/docker/docker-client/src/main/java/org/eclipse/che/infrastructure/docker/client/params/AttachContainerParams.java index 0ee75d0fe6..61114173c5 100644 --- a/plugins/plugin-docker/che-plugin-docker-client/src/main/java/org/eclipse/che/plugin/docker/client/params/AttachContainerParams.java +++ b/infrastructures/docker/docker-client/src/main/java/org/eclipse/che/infrastructure/docker/client/params/AttachContainerParams.java @@ -8,17 +8,17 @@ * Contributors: * Red Hat, Inc. - initial API and implementation */ -package org.eclipse.che.plugin.docker.client.params; +package org.eclipse.che.infrastructure.docker.client.params; import static java.util.Objects.requireNonNull; import java.util.Objects; import javax.validation.constraints.NotNull; -import org.eclipse.che.plugin.docker.client.MessageProcessor; +import org.eclipse.che.infrastructure.docker.client.DockerConnector; +import org.eclipse.che.infrastructure.docker.client.MessageProcessor; /** - * Arguments holder for {@link - * org.eclipse.che.plugin.docker.client.DockerConnector#attachContainer(AttachContainerParams, + * Arguments holder for {@link DockerConnector#attachContainer(AttachContainerParams, * MessageProcessor)} . * * @author Mykola Morhun diff --git a/plugins/plugin-docker/che-plugin-docker-client/src/main/java/org/eclipse/che/plugin/docker/client/params/BuildImageParams.java b/infrastructures/docker/docker-client/src/main/java/org/eclipse/che/infrastructure/docker/client/params/BuildImageParams.java similarity index 95% rename from plugins/plugin-docker/che-plugin-docker-client/src/main/java/org/eclipse/che/plugin/docker/client/params/BuildImageParams.java rename to infrastructures/docker/docker-client/src/main/java/org/eclipse/che/infrastructure/docker/client/params/BuildImageParams.java index d267241c3d..373ebbfe31 100644 --- a/plugins/plugin-docker/che-plugin-docker-client/src/main/java/org/eclipse/che/plugin/docker/client/params/BuildImageParams.java +++ b/infrastructures/docker/docker-client/src/main/java/org/eclipse/che/infrastructure/docker/client/params/BuildImageParams.java @@ -8,11 +8,11 @@ * Contributors: * Red Hat, Inc. - initial API and implementation */ -package org.eclipse.che.plugin.docker.client.params; +package org.eclipse.che.infrastructure.docker.client.params; import static java.util.Objects.requireNonNull; -import static org.eclipse.che.plugin.docker.client.params.ParamsUtils.requireNonEmptyArray; -import static org.eclipse.che.plugin.docker.client.params.ParamsUtils.requireNonNullNorEmpty; +import static org.eclipse.che.infrastructure.docker.client.params.ParamsUtils.requireNonEmptyArray; +import static org.eclipse.che.infrastructure.docker.client.params.ParamsUtils.requireNonNullNorEmpty; import java.io.File; import java.util.ArrayList; @@ -21,13 +21,12 @@ import java.util.List; import java.util.Map; import java.util.Objects; import javax.validation.constraints.NotNull; -import org.eclipse.che.plugin.docker.client.ProgressMonitor; -import org.eclipse.che.plugin.docker.client.dto.AuthConfigs; +import org.eclipse.che.infrastructure.docker.client.DockerConnector; +import org.eclipse.che.infrastructure.docker.client.ProgressMonitor; +import org.eclipse.che.infrastructure.docker.client.dto.AuthConfigs; /** - * Arguments holder for {@link - * org.eclipse.che.plugin.docker.client.DockerConnector#buildImage(BuildImageParams, - * ProgressMonitor)}. + * Arguments holder for {@link DockerConnector#buildImage(BuildImageParams, ProgressMonitor)}. * * @author Mykola Morhun * @author Alexander Garagatyi diff --git a/plugins/plugin-docker/che-plugin-docker-client/src/main/java/org/eclipse/che/plugin/docker/client/params/CommitParams.java b/infrastructures/docker/docker-client/src/main/java/org/eclipse/che/infrastructure/docker/client/params/CommitParams.java similarity index 94% rename from plugins/plugin-docker/che-plugin-docker-client/src/main/java/org/eclipse/che/plugin/docker/client/params/CommitParams.java rename to infrastructures/docker/docker-client/src/main/java/org/eclipse/che/infrastructure/docker/client/params/CommitParams.java index 8878236688..97ca8bf33f 100644 --- a/plugins/plugin-docker/che-plugin-docker-client/src/main/java/org/eclipse/che/plugin/docker/client/params/CommitParams.java +++ b/infrastructures/docker/docker-client/src/main/java/org/eclipse/che/infrastructure/docker/client/params/CommitParams.java @@ -8,16 +8,16 @@ * Contributors: * Red Hat, Inc. - initial API and implementation */ -package org.eclipse.che.plugin.docker.client.params; +package org.eclipse.che.infrastructure.docker.client.params; import static java.util.Objects.requireNonNull; import java.util.Objects; import javax.validation.constraints.NotNull; +import org.eclipse.che.infrastructure.docker.client.DockerConnector; /** - * Arguments holder for {@link - * org.eclipse.che.plugin.docker.client.DockerConnector#commit(CommitParams)}. + * Arguments holder for {@link DockerConnector#commit(CommitParams)}. * * @author Mykola Morhun */ diff --git a/plugins/plugin-docker/che-plugin-docker-client/src/main/java/org/eclipse/che/plugin/docker/client/params/CreateContainerParams.java b/infrastructures/docker/docker-client/src/main/java/org/eclipse/che/infrastructure/docker/client/params/CreateContainerParams.java similarity index 89% rename from plugins/plugin-docker/che-plugin-docker-client/src/main/java/org/eclipse/che/plugin/docker/client/params/CreateContainerParams.java rename to infrastructures/docker/docker-client/src/main/java/org/eclipse/che/infrastructure/docker/client/params/CreateContainerParams.java index 52c5a17f2f..c4280a5bf1 100644 --- a/plugins/plugin-docker/che-plugin-docker-client/src/main/java/org/eclipse/che/plugin/docker/client/params/CreateContainerParams.java +++ b/infrastructures/docker/docker-client/src/main/java/org/eclipse/che/infrastructure/docker/client/params/CreateContainerParams.java @@ -8,17 +8,17 @@ * Contributors: * Red Hat, Inc. - initial API and implementation */ -package org.eclipse.che.plugin.docker.client.params; +package org.eclipse.che.infrastructure.docker.client.params; import static java.util.Objects.requireNonNull; import java.util.Objects; import javax.validation.constraints.NotNull; -import org.eclipse.che.plugin.docker.client.json.ContainerConfig; +import org.eclipse.che.infrastructure.docker.client.DockerConnector; +import org.eclipse.che.infrastructure.docker.client.json.ContainerConfig; /** - * Arguments holder for {@link - * org.eclipse.che.plugin.docker.client.DockerConnector#createContainer(CreateContainerParams)}. + * Arguments holder for {@link DockerConnector#createContainer(CreateContainerParams)}. * * @author Mykola Morhun */ diff --git a/plugins/plugin-docker/che-plugin-docker-client/src/main/java/org/eclipse/che/plugin/docker/client/params/CreateExecParams.java b/infrastructures/docker/docker-client/src/main/java/org/eclipse/che/infrastructure/docker/client/params/CreateExecParams.java similarity index 92% rename from plugins/plugin-docker/che-plugin-docker-client/src/main/java/org/eclipse/che/plugin/docker/client/params/CreateExecParams.java rename to infrastructures/docker/docker-client/src/main/java/org/eclipse/che/infrastructure/docker/client/params/CreateExecParams.java index 439f674da7..c339603a91 100644 --- a/plugins/plugin-docker/che-plugin-docker-client/src/main/java/org/eclipse/che/plugin/docker/client/params/CreateExecParams.java +++ b/infrastructures/docker/docker-client/src/main/java/org/eclipse/che/infrastructure/docker/client/params/CreateExecParams.java @@ -8,18 +8,18 @@ * Contributors: * Red Hat, Inc. - initial API and implementation */ -package org.eclipse.che.plugin.docker.client.params; +package org.eclipse.che.infrastructure.docker.client.params; import static java.util.Objects.requireNonNull; -import static org.eclipse.che.plugin.docker.client.params.ParamsUtils.requireNonEmptyArray; +import static org.eclipse.che.infrastructure.docker.client.params.ParamsUtils.requireNonEmptyArray; import java.util.Arrays; import java.util.Objects; import javax.validation.constraints.NotNull; +import org.eclipse.che.infrastructure.docker.client.DockerConnector; /** - * Arguments holder for {@link - * org.eclipse.che.plugin.docker.client.DockerConnector#createExec(CreateExecParams)}. + * Arguments holder for {@link DockerConnector#createExec(CreateExecParams)}. * * @author Mykola Morhun */ diff --git a/plugins/plugin-docker/che-plugin-docker-client/src/main/java/org/eclipse/che/plugin/docker/client/params/GetContainerLogsParams.java b/infrastructures/docker/docker-client/src/main/java/org/eclipse/che/infrastructure/docker/client/params/GetContainerLogsParams.java similarity index 93% rename from plugins/plugin-docker/che-plugin-docker-client/src/main/java/org/eclipse/che/plugin/docker/client/params/GetContainerLogsParams.java rename to infrastructures/docker/docker-client/src/main/java/org/eclipse/che/infrastructure/docker/client/params/GetContainerLogsParams.java index 7e062b5a87..ad8a83f148 100644 --- a/plugins/plugin-docker/che-plugin-docker-client/src/main/java/org/eclipse/che/plugin/docker/client/params/GetContainerLogsParams.java +++ b/infrastructures/docker/docker-client/src/main/java/org/eclipse/che/infrastructure/docker/client/params/GetContainerLogsParams.java @@ -8,17 +8,17 @@ * Contributors: * Red Hat, Inc. - initial API and implementation */ -package org.eclipse.che.plugin.docker.client.params; +package org.eclipse.che.infrastructure.docker.client.params; import static java.util.Objects.requireNonNull; import java.util.Objects; import javax.validation.constraints.NotNull; -import org.eclipse.che.plugin.docker.client.MessageProcessor; +import org.eclipse.che.infrastructure.docker.client.DockerConnector; +import org.eclipse.che.infrastructure.docker.client.MessageProcessor; /** - * Arguments holder for {@link - * org.eclipse.che.plugin.docker.client.DockerConnector#getContainerLogs(GetContainerLogsParams, + * Arguments holder for {@link DockerConnector#getContainerLogs(GetContainerLogsParams, * MessageProcessor)}. * * @author Mykola Morhun diff --git a/plugins/plugin-docker/che-plugin-docker-client/src/main/java/org/eclipse/che/plugin/docker/client/params/GetEventsParams.java b/infrastructures/docker/docker-client/src/main/java/org/eclipse/che/infrastructure/docker/client/params/GetEventsParams.java similarity index 86% rename from plugins/plugin-docker/che-plugin-docker-client/src/main/java/org/eclipse/che/plugin/docker/client/params/GetEventsParams.java rename to infrastructures/docker/docker-client/src/main/java/org/eclipse/che/infrastructure/docker/client/params/GetEventsParams.java index e8b18184a5..fd021ea880 100644 --- a/plugins/plugin-docker/che-plugin-docker-client/src/main/java/org/eclipse/che/plugin/docker/client/params/GetEventsParams.java +++ b/infrastructures/docker/docker-client/src/main/java/org/eclipse/che/infrastructure/docker/client/params/GetEventsParams.java @@ -8,16 +8,15 @@ * Contributors: * Red Hat, Inc. - initial API and implementation */ -package org.eclipse.che.plugin.docker.client.params; +package org.eclipse.che.infrastructure.docker.client.params; import java.util.Objects; -import org.eclipse.che.plugin.docker.client.MessageProcessor; -import org.eclipse.che.plugin.docker.client.json.Filters; +import org.eclipse.che.infrastructure.docker.client.DockerConnector; +import org.eclipse.che.infrastructure.docker.client.MessageProcessor; +import org.eclipse.che.infrastructure.docker.client.json.Filters; /** - * Arguments holder for {@link - * org.eclipse.che.plugin.docker.client.DockerConnector#getEvents(GetEventsParams, - * MessageProcessor)}. + * Arguments holder for {@link DockerConnector#getEvents(GetEventsParams, MessageProcessor)}. * * @author Mykola Morhun */ diff --git a/plugins/plugin-docker/che-plugin-docker-client/src/main/java/org/eclipse/che/plugin/docker/client/params/GetExecInfoParams.java b/infrastructures/docker/docker-client/src/main/java/org/eclipse/che/infrastructure/docker/client/params/GetExecInfoParams.java similarity index 87% rename from plugins/plugin-docker/che-plugin-docker-client/src/main/java/org/eclipse/che/plugin/docker/client/params/GetExecInfoParams.java rename to infrastructures/docker/docker-client/src/main/java/org/eclipse/che/infrastructure/docker/client/params/GetExecInfoParams.java index 629cd0050e..9de288d6fc 100644 --- a/plugins/plugin-docker/che-plugin-docker-client/src/main/java/org/eclipse/che/plugin/docker/client/params/GetExecInfoParams.java +++ b/infrastructures/docker/docker-client/src/main/java/org/eclipse/che/infrastructure/docker/client/params/GetExecInfoParams.java @@ -8,16 +8,16 @@ * Contributors: * Red Hat, Inc. - initial API and implementation */ -package org.eclipse.che.plugin.docker.client.params; +package org.eclipse.che.infrastructure.docker.client.params; import static java.util.Objects.requireNonNull; import java.util.Objects; import javax.validation.constraints.NotNull; +import org.eclipse.che.infrastructure.docker.client.DockerConnector; /** - * Arguments holder for {@link - * org.eclipse.che.plugin.docker.client.DockerConnector#getExecInfo(GetExecInfoParams)}. + * Arguments holder for {@link DockerConnector#getExecInfo(GetExecInfoParams)}. * * @author Mykola Morhun */ diff --git a/plugins/plugin-docker/che-plugin-docker-client/src/main/java/org/eclipse/che/plugin/docker/client/params/GetResourceParams.java b/infrastructures/docker/docker-client/src/main/java/org/eclipse/che/infrastructure/docker/client/params/GetResourceParams.java similarity index 92% rename from plugins/plugin-docker/che-plugin-docker-client/src/main/java/org/eclipse/che/plugin/docker/client/params/GetResourceParams.java rename to infrastructures/docker/docker-client/src/main/java/org/eclipse/che/infrastructure/docker/client/params/GetResourceParams.java index 76738f4c93..dcfbbc2e07 100644 --- a/plugins/plugin-docker/che-plugin-docker-client/src/main/java/org/eclipse/che/plugin/docker/client/params/GetResourceParams.java +++ b/infrastructures/docker/docker-client/src/main/java/org/eclipse/che/infrastructure/docker/client/params/GetResourceParams.java @@ -8,16 +8,16 @@ * Contributors: * Red Hat, Inc. - initial API and implementation */ -package org.eclipse.che.plugin.docker.client.params; +package org.eclipse.che.infrastructure.docker.client.params; import static java.util.Objects.requireNonNull; import java.util.Objects; import javax.validation.constraints.NotNull; +import org.eclipse.che.infrastructure.docker.client.DockerConnector; /** - * Arguments holder for {@link - * org.eclipse.che.plugin.docker.client.DockerConnector#getResource(GetResourceParams)}. + * Arguments holder for {@link DockerConnector#getResource(GetResourceParams)}. * * @author Mykola Morhun */ diff --git a/plugins/plugin-docker/che-plugin-docker-client/src/main/java/org/eclipse/che/plugin/docker/client/params/InspectContainerParams.java b/infrastructures/docker/docker-client/src/main/java/org/eclipse/che/infrastructure/docker/client/params/InspectContainerParams.java similarity index 91% rename from plugins/plugin-docker/che-plugin-docker-client/src/main/java/org/eclipse/che/plugin/docker/client/params/InspectContainerParams.java rename to infrastructures/docker/docker-client/src/main/java/org/eclipse/che/infrastructure/docker/client/params/InspectContainerParams.java index 835df15526..bf8fa809a8 100644 --- a/plugins/plugin-docker/che-plugin-docker-client/src/main/java/org/eclipse/che/plugin/docker/client/params/InspectContainerParams.java +++ b/infrastructures/docker/docker-client/src/main/java/org/eclipse/che/infrastructure/docker/client/params/InspectContainerParams.java @@ -8,16 +8,16 @@ * Contributors: * Red Hat, Inc. - initial API and implementation */ -package org.eclipse.che.plugin.docker.client.params; +package org.eclipse.che.infrastructure.docker.client.params; import static java.util.Objects.requireNonNull; import java.util.Objects; import javax.validation.constraints.NotNull; +import org.eclipse.che.infrastructure.docker.client.DockerConnector; /** - * Arguments holder for{@link - * org.eclipse.che.plugin.docker.client.DockerConnector#inspectContainer(InspectContainerParams)}. + * Arguments holder for{@link DockerConnector#inspectContainer(InspectContainerParams)}. * * @author Mykola Morhun */ diff --git a/plugins/plugin-docker/che-plugin-docker-client/src/main/java/org/eclipse/che/plugin/docker/client/params/InspectImageParams.java b/infrastructures/docker/docker-client/src/main/java/org/eclipse/che/infrastructure/docker/client/params/InspectImageParams.java similarity index 88% rename from plugins/plugin-docker/che-plugin-docker-client/src/main/java/org/eclipse/che/plugin/docker/client/params/InspectImageParams.java rename to infrastructures/docker/docker-client/src/main/java/org/eclipse/che/infrastructure/docker/client/params/InspectImageParams.java index 07a7e53565..142fd46e36 100644 --- a/plugins/plugin-docker/che-plugin-docker-client/src/main/java/org/eclipse/che/plugin/docker/client/params/InspectImageParams.java +++ b/infrastructures/docker/docker-client/src/main/java/org/eclipse/che/infrastructure/docker/client/params/InspectImageParams.java @@ -8,16 +8,16 @@ * Contributors: * Red Hat, Inc. - initial API and implementation */ -package org.eclipse.che.plugin.docker.client.params; +package org.eclipse.che.infrastructure.docker.client.params; import static java.util.Objects.requireNonNull; import java.util.Objects; import javax.validation.constraints.NotNull; +import org.eclipse.che.infrastructure.docker.client.DockerConnector; /** - * Arguments holder for {@link - * org.eclipse.che.plugin.docker.client.DockerConnector#inspectImage(InspectImageParams)}. + * Arguments holder for {@link DockerConnector#inspectImage(InspectImageParams)}. * * @author Mykola Morhun */ diff --git a/plugins/plugin-docker/che-plugin-docker-client/src/main/java/org/eclipse/che/plugin/docker/client/params/KillContainerParams.java b/infrastructures/docker/docker-client/src/main/java/org/eclipse/che/infrastructure/docker/client/params/KillContainerParams.java similarity index 90% rename from plugins/plugin-docker/che-plugin-docker-client/src/main/java/org/eclipse/che/plugin/docker/client/params/KillContainerParams.java rename to infrastructures/docker/docker-client/src/main/java/org/eclipse/che/infrastructure/docker/client/params/KillContainerParams.java index 36bd24f772..6893a9c496 100644 --- a/plugins/plugin-docker/che-plugin-docker-client/src/main/java/org/eclipse/che/plugin/docker/client/params/KillContainerParams.java +++ b/infrastructures/docker/docker-client/src/main/java/org/eclipse/che/infrastructure/docker/client/params/KillContainerParams.java @@ -8,16 +8,16 @@ * Contributors: * Red Hat, Inc. - initial API and implementation */ -package org.eclipse.che.plugin.docker.client.params; +package org.eclipse.che.infrastructure.docker.client.params; import static java.util.Objects.requireNonNull; import java.util.Objects; import javax.validation.constraints.NotNull; +import org.eclipse.che.infrastructure.docker.client.DockerConnector; /** - * Arguments holder for {@link - * org.eclipse.che.plugin.docker.client.DockerConnector#killContainer(KillContainerParams)}. + * Arguments holder for {@link DockerConnector#killContainer(KillContainerParams)}. * * @author Mykola Morhun */ diff --git a/plugins/plugin-docker/che-plugin-docker-client/src/main/java/org/eclipse/che/plugin/docker/client/params/ListContainersParams.java b/infrastructures/docker/docker-client/src/main/java/org/eclipse/che/infrastructure/docker/client/params/ListContainersParams.java similarity index 94% rename from plugins/plugin-docker/che-plugin-docker-client/src/main/java/org/eclipse/che/plugin/docker/client/params/ListContainersParams.java rename to infrastructures/docker/docker-client/src/main/java/org/eclipse/che/infrastructure/docker/client/params/ListContainersParams.java index e2f9da79a4..9bd7c766be 100644 --- a/plugins/plugin-docker/che-plugin-docker-client/src/main/java/org/eclipse/che/plugin/docker/client/params/ListContainersParams.java +++ b/infrastructures/docker/docker-client/src/main/java/org/eclipse/che/infrastructure/docker/client/params/ListContainersParams.java @@ -8,16 +8,16 @@ * Contributors: * Red Hat, Inc. - initial API and implementation */ -package org.eclipse.che.plugin.docker.client.params; +package org.eclipse.che.infrastructure.docker.client.params; import static java.util.Objects.requireNonNull; import java.util.Objects; -import org.eclipse.che.plugin.docker.client.json.Filters; +import org.eclipse.che.infrastructure.docker.client.DockerConnector; +import org.eclipse.che.infrastructure.docker.client.json.Filters; /** - * Arguments holder for {@link - * org.eclipse.che.plugin.docker.client.DockerConnector#listContainers(ListContainersParams)}. + * Arguments holder for {@link DockerConnector#listContainers(ListContainersParams)}. * * @author Alexander Andrienko */ diff --git a/plugins/plugin-docker/che-plugin-docker-client/src/main/java/org/eclipse/che/plugin/docker/client/params/ListImagesParams.java b/infrastructures/docker/docker-client/src/main/java/org/eclipse/che/infrastructure/docker/client/params/ListImagesParams.java similarity index 90% rename from plugins/plugin-docker/che-plugin-docker-client/src/main/java/org/eclipse/che/plugin/docker/client/params/ListImagesParams.java rename to infrastructures/docker/docker-client/src/main/java/org/eclipse/che/infrastructure/docker/client/params/ListImagesParams.java index 979234e70b..ed09ccf9f9 100644 --- a/plugins/plugin-docker/che-plugin-docker-client/src/main/java/org/eclipse/che/plugin/docker/client/params/ListImagesParams.java +++ b/infrastructures/docker/docker-client/src/main/java/org/eclipse/che/infrastructure/docker/client/params/ListImagesParams.java @@ -8,14 +8,14 @@ * Contributors: * Red Hat, Inc. - initial API and implementation */ -package org.eclipse.che.plugin.docker.client.params; +package org.eclipse.che.infrastructure.docker.client.params; import java.util.Objects; -import org.eclipse.che.plugin.docker.client.json.Filters; +import org.eclipse.che.infrastructure.docker.client.DockerConnector; +import org.eclipse.che.infrastructure.docker.client.json.Filters; /** - * Arguments holder for {@link - * org.eclipse.che.plugin.docker.client.DockerConnector#listImages(ListImagesParams)}. + * Arguments holder for {@link DockerConnector#listImages(ListImagesParams)}. * * @author Mykola Morhun */ diff --git a/plugins/plugin-docker/che-plugin-docker-client/src/main/java/org/eclipse/che/plugin/docker/client/params/ParamsUtils.java b/infrastructures/docker/docker-client/src/main/java/org/eclipse/che/infrastructure/docker/client/params/ParamsUtils.java similarity index 95% rename from plugins/plugin-docker/che-plugin-docker-client/src/main/java/org/eclipse/che/plugin/docker/client/params/ParamsUtils.java rename to infrastructures/docker/docker-client/src/main/java/org/eclipse/che/infrastructure/docker/client/params/ParamsUtils.java index 2d38e66df9..7f4cbdef5d 100644 --- a/plugins/plugin-docker/che-plugin-docker-client/src/main/java/org/eclipse/che/plugin/docker/client/params/ParamsUtils.java +++ b/infrastructures/docker/docker-client/src/main/java/org/eclipse/che/infrastructure/docker/client/params/ParamsUtils.java @@ -8,7 +8,7 @@ * Contributors: * Red Hat, Inc. - initial API and implementation */ -package org.eclipse.che.plugin.docker.client.params; +package org.eclipse.che.infrastructure.docker.client.params; /** * Contains util methods for {@code *Params} classes. diff --git a/plugins/plugin-docker/che-plugin-docker-client/src/main/java/org/eclipse/che/plugin/docker/client/params/PullParams.java b/infrastructures/docker/docker-client/src/main/java/org/eclipse/che/infrastructure/docker/client/params/PullParams.java similarity index 88% rename from plugins/plugin-docker/che-plugin-docker-client/src/main/java/org/eclipse/che/plugin/docker/client/params/PullParams.java rename to infrastructures/docker/docker-client/src/main/java/org/eclipse/che/infrastructure/docker/client/params/PullParams.java index e55201e2b4..9788842e27 100644 --- a/plugins/plugin-docker/che-plugin-docker-client/src/main/java/org/eclipse/che/plugin/docker/client/params/PullParams.java +++ b/infrastructures/docker/docker-client/src/main/java/org/eclipse/che/infrastructure/docker/client/params/PullParams.java @@ -8,19 +8,19 @@ * Contributors: * Red Hat, Inc. - initial API and implementation */ -package org.eclipse.che.plugin.docker.client.params; +package org.eclipse.che.infrastructure.docker.client.params; import static java.util.Objects.requireNonNull; -import static org.eclipse.che.plugin.docker.client.DockerRegistryAuthResolver.DEFAULT_REGISTRY_SYNONYMS; +import static org.eclipse.che.infrastructure.docker.client.DockerRegistryAuthResolver.DEFAULT_REGISTRY_SYNONYMS; import java.util.Objects; import javax.validation.constraints.NotNull; -import org.eclipse.che.plugin.docker.client.ProgressMonitor; -import org.eclipse.che.plugin.docker.client.dto.AuthConfigs; +import org.eclipse.che.infrastructure.docker.client.DockerConnector; +import org.eclipse.che.infrastructure.docker.client.ProgressMonitor; +import org.eclipse.che.infrastructure.docker.client.dto.AuthConfigs; /** - * Arguments holder for {@link org.eclipse.che.plugin.docker.client.DockerConnector#pull(PullParams, - * ProgressMonitor)}. + * Arguments holder for {@link DockerConnector#pull(PullParams, ProgressMonitor)}. * * @author Mykola Morhun */ diff --git a/plugins/plugin-docker/che-plugin-docker-client/src/main/java/org/eclipse/che/plugin/docker/client/params/PushParams.java b/infrastructures/docker/docker-client/src/main/java/org/eclipse/che/infrastructure/docker/client/params/PushParams.java similarity index 87% rename from plugins/plugin-docker/che-plugin-docker-client/src/main/java/org/eclipse/che/plugin/docker/client/params/PushParams.java rename to infrastructures/docker/docker-client/src/main/java/org/eclipse/che/infrastructure/docker/client/params/PushParams.java index 34ed089237..1b48d55082 100644 --- a/plugins/plugin-docker/che-plugin-docker-client/src/main/java/org/eclipse/che/plugin/docker/client/params/PushParams.java +++ b/infrastructures/docker/docker-client/src/main/java/org/eclipse/che/infrastructure/docker/client/params/PushParams.java @@ -8,19 +8,19 @@ * Contributors: * Red Hat, Inc. - initial API and implementation */ -package org.eclipse.che.plugin.docker.client.params; +package org.eclipse.che.infrastructure.docker.client.params; import static java.util.Objects.requireNonNull; -import static org.eclipse.che.plugin.docker.client.DockerRegistryAuthResolver.DEFAULT_REGISTRY_SYNONYMS; +import static org.eclipse.che.infrastructure.docker.client.DockerRegistryAuthResolver.DEFAULT_REGISTRY_SYNONYMS; import java.util.Objects; import javax.validation.constraints.NotNull; -import org.eclipse.che.plugin.docker.client.ProgressMonitor; -import org.eclipse.che.plugin.docker.client.dto.AuthConfigs; +import org.eclipse.che.infrastructure.docker.client.DockerConnector; +import org.eclipse.che.infrastructure.docker.client.ProgressMonitor; +import org.eclipse.che.infrastructure.docker.client.dto.AuthConfigs; /** - * Arguments holder for {@link org.eclipse.che.plugin.docker.client.DockerConnector#push(PushParams, - * ProgressMonitor)}. + * Arguments holder for {@link DockerConnector#push(PushParams, ProgressMonitor)}. * * @author Mykola Morhun */ diff --git a/plugins/plugin-docker/che-plugin-docker-client/src/main/java/org/eclipse/che/plugin/docker/client/params/PutResourceParams.java b/infrastructures/docker/docker-client/src/main/java/org/eclipse/che/infrastructure/docker/client/params/PutResourceParams.java similarity index 94% rename from plugins/plugin-docker/che-plugin-docker-client/src/main/java/org/eclipse/che/plugin/docker/client/params/PutResourceParams.java rename to infrastructures/docker/docker-client/src/main/java/org/eclipse/che/infrastructure/docker/client/params/PutResourceParams.java index 0f0373b154..fa3f9f231f 100644 --- a/plugins/plugin-docker/che-plugin-docker-client/src/main/java/org/eclipse/che/plugin/docker/client/params/PutResourceParams.java +++ b/infrastructures/docker/docker-client/src/main/java/org/eclipse/che/infrastructure/docker/client/params/PutResourceParams.java @@ -8,17 +8,17 @@ * Contributors: * Red Hat, Inc. - initial API and implementation */ -package org.eclipse.che.plugin.docker.client.params; +package org.eclipse.che.infrastructure.docker.client.params; import static java.util.Objects.requireNonNull; import java.io.InputStream; import java.util.Objects; import javax.validation.constraints.NotNull; +import org.eclipse.che.infrastructure.docker.client.DockerConnector; /** - * Arguments holder for {@link - * org.eclipse.che.plugin.docker.client.DockerConnector#putResource(PutResourceParams)}. + * Arguments holder for {@link DockerConnector#putResource(PutResourceParams)}. * * @author Mykola Morhun */ @@ -84,8 +84,7 @@ public class PutResourceParams { * Adds stream of files to this parameters. * * @param sourceStream stream of files from source container, must be obtained from another - * container using {@link - * org.eclipse.che.plugin.docker.client.DockerConnector#getResource(GetResourceParams)} + * container using {@link DockerConnector#getResource(GetResourceParams)} * @return this params instance * @throws NullPointerException if {@code sourceStream} is null */ diff --git a/plugins/plugin-docker/che-plugin-docker-client/src/main/java/org/eclipse/che/plugin/docker/client/params/RemoveContainerParams.java b/infrastructures/docker/docker-client/src/main/java/org/eclipse/che/infrastructure/docker/client/params/RemoveContainerParams.java similarity index 92% rename from plugins/plugin-docker/che-plugin-docker-client/src/main/java/org/eclipse/che/plugin/docker/client/params/RemoveContainerParams.java rename to infrastructures/docker/docker-client/src/main/java/org/eclipse/che/infrastructure/docker/client/params/RemoveContainerParams.java index ede53bfaba..3ba7419c7e 100644 --- a/plugins/plugin-docker/che-plugin-docker-client/src/main/java/org/eclipse/che/plugin/docker/client/params/RemoveContainerParams.java +++ b/infrastructures/docker/docker-client/src/main/java/org/eclipse/che/infrastructure/docker/client/params/RemoveContainerParams.java @@ -8,16 +8,16 @@ * Contributors: * Red Hat, Inc. - initial API and implementation */ -package org.eclipse.che.plugin.docker.client.params; +package org.eclipse.che.infrastructure.docker.client.params; import static java.util.Objects.requireNonNull; import java.util.Objects; import javax.validation.constraints.NotNull; +import org.eclipse.che.infrastructure.docker.client.DockerConnector; /** - * Arguments holder for {@link - * org.eclipse.che.plugin.docker.client.DockerConnector#removeContainer(RemoveContainerParams)}. + * Arguments holder for {@link DockerConnector#removeContainer(RemoveContainerParams)}. * * @author Mykola Morhun */ diff --git a/plugins/plugin-docker/che-plugin-docker-client/src/main/java/org/eclipse/che/plugin/docker/client/params/RemoveImageParams.java b/infrastructures/docker/docker-client/src/main/java/org/eclipse/che/infrastructure/docker/client/params/RemoveImageParams.java similarity index 91% rename from plugins/plugin-docker/che-plugin-docker-client/src/main/java/org/eclipse/che/plugin/docker/client/params/RemoveImageParams.java rename to infrastructures/docker/docker-client/src/main/java/org/eclipse/che/infrastructure/docker/client/params/RemoveImageParams.java index 7b1cc321d2..f9aaf76c46 100644 --- a/plugins/plugin-docker/che-plugin-docker-client/src/main/java/org/eclipse/che/plugin/docker/client/params/RemoveImageParams.java +++ b/infrastructures/docker/docker-client/src/main/java/org/eclipse/che/infrastructure/docker/client/params/RemoveImageParams.java @@ -8,16 +8,16 @@ * Contributors: * Red Hat, Inc. - initial API and implementation */ -package org.eclipse.che.plugin.docker.client.params; +package org.eclipse.che.infrastructure.docker.client.params; import static java.util.Objects.requireNonNull; import java.util.Objects; import javax.validation.constraints.NotNull; +import org.eclipse.che.infrastructure.docker.client.DockerConnector; /** - * Arguments holder for {@link - * org.eclipse.che.plugin.docker.client.DockerConnector#removeImage(RemoveImageParams)}. + * Arguments holder for {@link DockerConnector#removeImage(RemoveImageParams)}. * * @author Mykola Morhun */ diff --git a/plugins/plugin-docker/che-plugin-docker-client/src/main/java/org/eclipse/che/plugin/docker/client/params/StartContainerParams.java b/infrastructures/docker/docker-client/src/main/java/org/eclipse/che/infrastructure/docker/client/params/StartContainerParams.java similarity index 89% rename from plugins/plugin-docker/che-plugin-docker-client/src/main/java/org/eclipse/che/plugin/docker/client/params/StartContainerParams.java rename to infrastructures/docker/docker-client/src/main/java/org/eclipse/che/infrastructure/docker/client/params/StartContainerParams.java index a1e308d27e..a71bc74e16 100644 --- a/plugins/plugin-docker/che-plugin-docker-client/src/main/java/org/eclipse/che/plugin/docker/client/params/StartContainerParams.java +++ b/infrastructures/docker/docker-client/src/main/java/org/eclipse/che/infrastructure/docker/client/params/StartContainerParams.java @@ -8,16 +8,16 @@ * Contributors: * Red Hat, Inc. - initial API and implementation */ -package org.eclipse.che.plugin.docker.client.params; +package org.eclipse.che.infrastructure.docker.client.params; import static java.util.Objects.requireNonNull; import java.util.Objects; import javax.validation.constraints.NotNull; +import org.eclipse.che.infrastructure.docker.client.DockerConnector; /** - * Arguments holder for {@link - * org.eclipse.che.plugin.docker.client.DockerConnector#startContainer(StartContainerParams)}. + * Arguments holder for {@link DockerConnector#startContainer(StartContainerParams)}. * * @author Mykola Morhun */ diff --git a/plugins/plugin-docker/che-plugin-docker-client/src/main/java/org/eclipse/che/plugin/docker/client/params/StartExecParams.java b/infrastructures/docker/docker-client/src/main/java/org/eclipse/che/infrastructure/docker/client/params/StartExecParams.java similarity index 90% rename from plugins/plugin-docker/che-plugin-docker-client/src/main/java/org/eclipse/che/plugin/docker/client/params/StartExecParams.java rename to infrastructures/docker/docker-client/src/main/java/org/eclipse/che/infrastructure/docker/client/params/StartExecParams.java index 0c396b7762..a353f7a307 100644 --- a/plugins/plugin-docker/che-plugin-docker-client/src/main/java/org/eclipse/che/plugin/docker/client/params/StartExecParams.java +++ b/infrastructures/docker/docker-client/src/main/java/org/eclipse/che/infrastructure/docker/client/params/StartExecParams.java @@ -8,18 +8,17 @@ * Contributors: * Red Hat, Inc. - initial API and implementation */ -package org.eclipse.che.plugin.docker.client.params; +package org.eclipse.che.infrastructure.docker.client.params; import static java.util.Objects.requireNonNull; import java.util.Objects; import javax.validation.constraints.NotNull; -import org.eclipse.che.plugin.docker.client.MessageProcessor; +import org.eclipse.che.infrastructure.docker.client.DockerConnector; +import org.eclipse.che.infrastructure.docker.client.MessageProcessor; /** - * Arguments holder for {@link - * org.eclipse.che.plugin.docker.client.DockerConnector#startExec(StartExecParams, - * MessageProcessor)}. + * Arguments holder for {@link DockerConnector#startExec(StartExecParams, MessageProcessor)}. * * @author Mykola Morhun */ diff --git a/plugins/plugin-docker/che-plugin-docker-client/src/main/java/org/eclipse/che/plugin/docker/client/params/StopContainerParams.java b/infrastructures/docker/docker-client/src/main/java/org/eclipse/che/infrastructure/docker/client/params/StopContainerParams.java similarity index 93% rename from plugins/plugin-docker/che-plugin-docker-client/src/main/java/org/eclipse/che/plugin/docker/client/params/StopContainerParams.java rename to infrastructures/docker/docker-client/src/main/java/org/eclipse/che/infrastructure/docker/client/params/StopContainerParams.java index a418f9ec54..0b17729890 100644 --- a/plugins/plugin-docker/che-plugin-docker-client/src/main/java/org/eclipse/che/plugin/docker/client/params/StopContainerParams.java +++ b/infrastructures/docker/docker-client/src/main/java/org/eclipse/che/infrastructure/docker/client/params/StopContainerParams.java @@ -8,17 +8,17 @@ * Contributors: * Red Hat, Inc. - initial API and implementation */ -package org.eclipse.che.plugin.docker.client.params; +package org.eclipse.che.infrastructure.docker.client.params; import static java.util.Objects.requireNonNull; import java.util.Objects; import java.util.concurrent.TimeUnit; import javax.validation.constraints.NotNull; +import org.eclipse.che.infrastructure.docker.client.DockerConnector; /** - * Arguments holder for {@link - * org.eclipse.che.plugin.docker.client.DockerConnector#stopContainer(StopContainerParams)}. + * Arguments holder for {@link DockerConnector#stopContainer(StopContainerParams)}. * * @author Mykola Morhun */ diff --git a/plugins/plugin-docker/che-plugin-docker-client/src/main/java/org/eclipse/che/plugin/docker/client/params/TagParams.java b/infrastructures/docker/docker-client/src/main/java/org/eclipse/che/infrastructure/docker/client/params/TagParams.java similarity index 94% rename from plugins/plugin-docker/che-plugin-docker-client/src/main/java/org/eclipse/che/plugin/docker/client/params/TagParams.java rename to infrastructures/docker/docker-client/src/main/java/org/eclipse/che/infrastructure/docker/client/params/TagParams.java index b9eed7e9b5..eba94fe12d 100644 --- a/plugins/plugin-docker/che-plugin-docker-client/src/main/java/org/eclipse/che/plugin/docker/client/params/TagParams.java +++ b/infrastructures/docker/docker-client/src/main/java/org/eclipse/che/infrastructure/docker/client/params/TagParams.java @@ -8,15 +8,16 @@ * Contributors: * Red Hat, Inc. - initial API and implementation */ -package org.eclipse.che.plugin.docker.client.params; +package org.eclipse.che.infrastructure.docker.client.params; import static java.util.Objects.requireNonNull; import java.util.Objects; import javax.validation.constraints.NotNull; +import org.eclipse.che.infrastructure.docker.client.DockerConnector; /** - * Arguments holder for {@link org.eclipse.che.plugin.docker.client.DockerConnector#tag(TagParams)}. + * Arguments holder for {@link DockerConnector#tag(TagParams)}. * * @author Mykola Morhun */ diff --git a/plugins/plugin-docker/che-plugin-docker-client/src/main/java/org/eclipse/che/plugin/docker/client/params/TopParams.java b/infrastructures/docker/docker-client/src/main/java/org/eclipse/che/infrastructure/docker/client/params/TopParams.java similarity index 91% rename from plugins/plugin-docker/che-plugin-docker-client/src/main/java/org/eclipse/che/plugin/docker/client/params/TopParams.java rename to infrastructures/docker/docker-client/src/main/java/org/eclipse/che/infrastructure/docker/client/params/TopParams.java index 96a8a5041a..4d7491a766 100644 --- a/plugins/plugin-docker/che-plugin-docker-client/src/main/java/org/eclipse/che/plugin/docker/client/params/TopParams.java +++ b/infrastructures/docker/docker-client/src/main/java/org/eclipse/che/infrastructure/docker/client/params/TopParams.java @@ -8,16 +8,17 @@ * Contributors: * Red Hat, Inc. - initial API and implementation */ -package org.eclipse.che.plugin.docker.client.params; +package org.eclipse.che.infrastructure.docker.client.params; import static java.util.Objects.requireNonNull; import java.util.Arrays; import java.util.Objects; import javax.validation.constraints.NotNull; +import org.eclipse.che.infrastructure.docker.client.DockerConnector; /** - * Arguments holder for {@link org.eclipse.che.plugin.docker.client.DockerConnector#top(TopParams)}. + * Arguments holder for {@link DockerConnector#top(TopParams)}. * * @author Mykola Morhun */ diff --git a/plugins/plugin-docker/che-plugin-docker-client/src/main/java/org/eclipse/che/plugin/docker/client/params/WaitContainerParams.java b/infrastructures/docker/docker-client/src/main/java/org/eclipse/che/infrastructure/docker/client/params/WaitContainerParams.java similarity index 89% rename from plugins/plugin-docker/che-plugin-docker-client/src/main/java/org/eclipse/che/plugin/docker/client/params/WaitContainerParams.java rename to infrastructures/docker/docker-client/src/main/java/org/eclipse/che/infrastructure/docker/client/params/WaitContainerParams.java index 8e30a989db..ea1dc3e434 100644 --- a/plugins/plugin-docker/che-plugin-docker-client/src/main/java/org/eclipse/che/plugin/docker/client/params/WaitContainerParams.java +++ b/infrastructures/docker/docker-client/src/main/java/org/eclipse/che/infrastructure/docker/client/params/WaitContainerParams.java @@ -8,16 +8,16 @@ * Contributors: * Red Hat, Inc. - initial API and implementation */ -package org.eclipse.che.plugin.docker.client.params; +package org.eclipse.che.infrastructure.docker.client.params; import static java.util.Objects.requireNonNull; import java.util.Objects; import javax.validation.constraints.NotNull; +import org.eclipse.che.infrastructure.docker.client.DockerConnector; /** - * Arguments holder for {@link - * org.eclipse.che.plugin.docker.client.DockerConnector#waitContainer(WaitContainerParams)}. + * Arguments holder for {@link DockerConnector#waitContainer(WaitContainerParams)}. * * @author Mykola Morhun */ diff --git a/plugins/plugin-docker/che-plugin-docker-client/src/main/java/org/eclipse/che/plugin/docker/client/params/network/ConnectContainerToNetworkParams.java b/infrastructures/docker/docker-client/src/main/java/org/eclipse/che/infrastructure/docker/client/params/network/ConnectContainerToNetworkParams.java similarity index 90% rename from plugins/plugin-docker/che-plugin-docker-client/src/main/java/org/eclipse/che/plugin/docker/client/params/network/ConnectContainerToNetworkParams.java rename to infrastructures/docker/docker-client/src/main/java/org/eclipse/che/infrastructure/docker/client/params/network/ConnectContainerToNetworkParams.java index a9da35b89b..2fed665ef8 100644 --- a/plugins/plugin-docker/che-plugin-docker-client/src/main/java/org/eclipse/che/plugin/docker/client/params/network/ConnectContainerToNetworkParams.java +++ b/infrastructures/docker/docker-client/src/main/java/org/eclipse/che/infrastructure/docker/client/params/network/ConnectContainerToNetworkParams.java @@ -8,17 +8,18 @@ * Contributors: * Red Hat, Inc. - initial API and implementation */ -package org.eclipse.che.plugin.docker.client.params.network; +package org.eclipse.che.infrastructure.docker.client.params.network; import static java.util.Objects.requireNonNull; import java.util.Objects; import javax.validation.constraints.NotNull; -import org.eclipse.che.plugin.docker.client.json.network.ConnectContainer; +import org.eclipse.che.infrastructure.docker.client.DockerConnector; +import org.eclipse.che.infrastructure.docker.client.json.network.ConnectContainer; /** * Arguments holder for {@link - * org.eclipse.che.plugin.docker.client.DockerConnector#connectContainerToNetwork(ConnectContainerToNetworkParams)}. + * DockerConnector#connectContainerToNetwork(ConnectContainerToNetworkParams)}. * * @author Alexander Garagatyi */ diff --git a/plugins/plugin-docker/che-plugin-docker-client/src/main/java/org/eclipse/che/plugin/docker/client/params/network/CreateNetworkParams.java b/infrastructures/docker/docker-client/src/main/java/org/eclipse/che/infrastructure/docker/client/params/network/CreateNetworkParams.java similarity index 87% rename from plugins/plugin-docker/che-plugin-docker-client/src/main/java/org/eclipse/che/plugin/docker/client/params/network/CreateNetworkParams.java rename to infrastructures/docker/docker-client/src/main/java/org/eclipse/che/infrastructure/docker/client/params/network/CreateNetworkParams.java index 6e80d0b15c..ac7bf61a66 100644 --- a/plugins/plugin-docker/che-plugin-docker-client/src/main/java/org/eclipse/che/plugin/docker/client/params/network/CreateNetworkParams.java +++ b/infrastructures/docker/docker-client/src/main/java/org/eclipse/che/infrastructure/docker/client/params/network/CreateNetworkParams.java @@ -8,17 +8,17 @@ * Contributors: * Red Hat, Inc. - initial API and implementation */ -package org.eclipse.che.plugin.docker.client.params.network; +package org.eclipse.che.infrastructure.docker.client.params.network; import static java.util.Objects.requireNonNull; import java.util.Objects; import javax.validation.constraints.NotNull; -import org.eclipse.che.plugin.docker.client.json.network.NewNetwork; +import org.eclipse.che.infrastructure.docker.client.DockerConnector; +import org.eclipse.che.infrastructure.docker.client.json.network.NewNetwork; /** - * Arguments holder for {@link - * org.eclipse.che.plugin.docker.client.DockerConnector#createNetwork(CreateNetworkParams)}. + * Arguments holder for {@link DockerConnector#createNetwork(CreateNetworkParams)}. * * @author Alexander Garagatyi */ diff --git a/plugins/plugin-docker/che-plugin-docker-client/src/main/java/org/eclipse/che/plugin/docker/client/params/network/DisconnectContainerFromNetworkParams.java b/infrastructures/docker/docker-client/src/main/java/org/eclipse/che/infrastructure/docker/client/params/network/DisconnectContainerFromNetworkParams.java similarity index 90% rename from plugins/plugin-docker/che-plugin-docker-client/src/main/java/org/eclipse/che/plugin/docker/client/params/network/DisconnectContainerFromNetworkParams.java rename to infrastructures/docker/docker-client/src/main/java/org/eclipse/che/infrastructure/docker/client/params/network/DisconnectContainerFromNetworkParams.java index fac6a82e73..e9c32dcaf3 100644 --- a/plugins/plugin-docker/che-plugin-docker-client/src/main/java/org/eclipse/che/plugin/docker/client/params/network/DisconnectContainerFromNetworkParams.java +++ b/infrastructures/docker/docker-client/src/main/java/org/eclipse/che/infrastructure/docker/client/params/network/DisconnectContainerFromNetworkParams.java @@ -8,17 +8,18 @@ * Contributors: * Red Hat, Inc. - initial API and implementation */ -package org.eclipse.che.plugin.docker.client.params.network; +package org.eclipse.che.infrastructure.docker.client.params.network; import static java.util.Objects.requireNonNull; import java.util.Objects; import javax.validation.constraints.NotNull; -import org.eclipse.che.plugin.docker.client.json.network.DisconnectContainer; +import org.eclipse.che.infrastructure.docker.client.DockerConnector; +import org.eclipse.che.infrastructure.docker.client.json.network.DisconnectContainer; /** * Arguments holder for {@link - * org.eclipse.che.plugin.docker.client.DockerConnector#disconnectContainerFromNetwork(DisconnectContainerFromNetworkParams)}. + * DockerConnector#disconnectContainerFromNetwork(DisconnectContainerFromNetworkParams)}. * * @author Alexander Garagatyi */ diff --git a/plugins/plugin-docker/che-plugin-docker-client/src/main/java/org/eclipse/che/plugin/docker/client/params/network/GetNetworksParams.java b/infrastructures/docker/docker-client/src/main/java/org/eclipse/che/infrastructure/docker/client/params/network/GetNetworksParams.java similarity index 84% rename from plugins/plugin-docker/che-plugin-docker-client/src/main/java/org/eclipse/che/plugin/docker/client/params/network/GetNetworksParams.java rename to infrastructures/docker/docker-client/src/main/java/org/eclipse/che/infrastructure/docker/client/params/network/GetNetworksParams.java index a715b33cc5..8503e7ea7c 100644 --- a/plugins/plugin-docker/che-plugin-docker-client/src/main/java/org/eclipse/che/plugin/docker/client/params/network/GetNetworksParams.java +++ b/infrastructures/docker/docker-client/src/main/java/org/eclipse/che/infrastructure/docker/client/params/network/GetNetworksParams.java @@ -8,14 +8,14 @@ * Contributors: * Red Hat, Inc. - initial API and implementation */ -package org.eclipse.che.plugin.docker.client.params.network; +package org.eclipse.che.infrastructure.docker.client.params.network; import java.util.Objects; -import org.eclipse.che.plugin.docker.client.json.Filters; +import org.eclipse.che.infrastructure.docker.client.DockerConnector; +import org.eclipse.che.infrastructure.docker.client.json.Filters; /** - * Arguments holder for {@link - * org.eclipse.che.plugin.docker.client.DockerConnector#getNetworks(GetNetworksParams)}. + * Arguments holder for {@link DockerConnector#getNetworks(GetNetworksParams)}. * * @author Alexander Garagatyi */ diff --git a/plugins/plugin-docker/che-plugin-docker-client/src/main/java/org/eclipse/che/plugin/docker/client/params/network/InspectNetworkParams.java b/infrastructures/docker/docker-client/src/main/java/org/eclipse/che/infrastructure/docker/client/params/network/InspectNetworkParams.java similarity index 89% rename from plugins/plugin-docker/che-plugin-docker-client/src/main/java/org/eclipse/che/plugin/docker/client/params/network/InspectNetworkParams.java rename to infrastructures/docker/docker-client/src/main/java/org/eclipse/che/infrastructure/docker/client/params/network/InspectNetworkParams.java index c5703030ff..7953bcaffb 100644 --- a/plugins/plugin-docker/che-plugin-docker-client/src/main/java/org/eclipse/che/plugin/docker/client/params/network/InspectNetworkParams.java +++ b/infrastructures/docker/docker-client/src/main/java/org/eclipse/che/infrastructure/docker/client/params/network/InspectNetworkParams.java @@ -8,16 +8,16 @@ * Contributors: * Red Hat, Inc. - initial API and implementation */ -package org.eclipse.che.plugin.docker.client.params.network; +package org.eclipse.che.infrastructure.docker.client.params.network; import static java.util.Objects.requireNonNull; import java.util.Objects; import javax.validation.constraints.NotNull; +import org.eclipse.che.infrastructure.docker.client.DockerConnector; /** - * Arguments holder for {@link - * org.eclipse.che.plugin.docker.client.DockerConnector#inspectNetwork(InspectNetworkParams)}. + * Arguments holder for {@link DockerConnector#inspectNetwork(InspectNetworkParams)}. * * @author Alexander Garagatyi */ diff --git a/plugins/plugin-docker/che-plugin-docker-client/src/main/java/org/eclipse/che/plugin/docker/client/params/network/RemoveNetworkParams.java b/infrastructures/docker/docker-client/src/main/java/org/eclipse/che/infrastructure/docker/client/params/network/RemoveNetworkParams.java similarity index 88% rename from plugins/plugin-docker/che-plugin-docker-client/src/main/java/org/eclipse/che/plugin/docker/client/params/network/RemoveNetworkParams.java rename to infrastructures/docker/docker-client/src/main/java/org/eclipse/che/infrastructure/docker/client/params/network/RemoveNetworkParams.java index 51faeef057..61ec2be50b 100644 --- a/plugins/plugin-docker/che-plugin-docker-client/src/main/java/org/eclipse/che/plugin/docker/client/params/network/RemoveNetworkParams.java +++ b/infrastructures/docker/docker-client/src/main/java/org/eclipse/che/infrastructure/docker/client/params/network/RemoveNetworkParams.java @@ -8,16 +8,16 @@ * Contributors: * Red Hat, Inc. - initial API and implementation */ -package org.eclipse.che.plugin.docker.client.params.network; +package org.eclipse.che.infrastructure.docker.client.params.network; import static java.util.Objects.requireNonNull; import java.util.Objects; import javax.validation.constraints.NotNull; +import org.eclipse.che.infrastructure.docker.client.DockerConnector; /** - * Arguments holder for {@link - * org.eclipse.che.plugin.docker.client.DockerConnector#removeNetwork(RemoveNetworkParams)}. + * Arguments holder for {@link DockerConnector#removeNetwork(RemoveNetworkParams)}. * * @author Alexander Garagatyi */ diff --git a/plugins/plugin-docker/che-plugin-docker-client/src/main/java/org/eclipse/che/plugin/docker/client/parser/DockerImageIdentifier.java b/infrastructures/docker/docker-client/src/main/java/org/eclipse/che/infrastructure/docker/client/parser/DockerImageIdentifier.java similarity index 98% rename from plugins/plugin-docker/che-plugin-docker-client/src/main/java/org/eclipse/che/plugin/docker/client/parser/DockerImageIdentifier.java rename to infrastructures/docker/docker-client/src/main/java/org/eclipse/che/infrastructure/docker/client/parser/DockerImageIdentifier.java index 2864cae982..c5565cce9f 100644 --- a/plugins/plugin-docker/che-plugin-docker-client/src/main/java/org/eclipse/che/plugin/docker/client/parser/DockerImageIdentifier.java +++ b/infrastructures/docker/docker-client/src/main/java/org/eclipse/che/infrastructure/docker/client/parser/DockerImageIdentifier.java @@ -8,7 +8,7 @@ * Contributors: * Red Hat, Inc. - initial API and implementation */ -package org.eclipse.che.plugin.docker.client.parser; +package org.eclipse.che.infrastructure.docker.client.parser; import static java.util.Objects.requireNonNull; diff --git a/plugins/plugin-docker/che-plugin-docker-client/src/main/java/org/eclipse/che/plugin/docker/client/parser/DockerImageIdentifierParser.java b/infrastructures/docker/docker-client/src/main/java/org/eclipse/che/infrastructure/docker/client/parser/DockerImageIdentifierParser.java similarity index 96% rename from plugins/plugin-docker/che-plugin-docker-client/src/main/java/org/eclipse/che/plugin/docker/client/parser/DockerImageIdentifierParser.java rename to infrastructures/docker/docker-client/src/main/java/org/eclipse/che/infrastructure/docker/client/parser/DockerImageIdentifierParser.java index 5f186a0441..88776c4f0d 100644 --- a/plugins/plugin-docker/che-plugin-docker-client/src/main/java/org/eclipse/che/plugin/docker/client/parser/DockerImageIdentifierParser.java +++ b/infrastructures/docker/docker-client/src/main/java/org/eclipse/che/infrastructure/docker/client/parser/DockerImageIdentifierParser.java @@ -8,11 +8,11 @@ * Contributors: * Red Hat, Inc. - initial API and implementation */ -package org.eclipse.che.plugin.docker.client.parser; +package org.eclipse.che.infrastructure.docker.client.parser; import java.util.regex.Matcher; import java.util.regex.Pattern; -import org.eclipse.che.plugin.docker.client.DockerFileException; +import org.eclipse.che.infrastructure.docker.client.DockerFileException; /** * Parse docker image reference. diff --git a/plugins/plugin-docker/che-plugin-docker-client/src/main/resources/org/eclipse/che/plugin/docker/client/dto/Dto.gwt.xml b/infrastructures/docker/docker-client/src/main/resources/org/eclipse/che/infrastructure/docker/client/dto/Dto.gwt.xml similarity index 100% rename from plugins/plugin-docker/che-plugin-docker-client/src/main/resources/org/eclipse/che/plugin/docker/client/dto/Dto.gwt.xml rename to infrastructures/docker/docker-client/src/main/resources/org/eclipse/che/infrastructure/docker/client/dto/Dto.gwt.xml diff --git a/plugins/plugin-docker/che-plugin-docker-client/src/test/java/org/eclipse/che/plugin/docker/client/DockerApiVersionPathPrefixProviderTest.java b/infrastructures/docker/docker-client/src/test/java/org/eclipse/che/infrastructure/docker/client/DockerApiVersionPathPrefixProviderTest.java similarity index 93% rename from plugins/plugin-docker/che-plugin-docker-client/src/test/java/org/eclipse/che/plugin/docker/client/DockerApiVersionPathPrefixProviderTest.java rename to infrastructures/docker/docker-client/src/test/java/org/eclipse/che/infrastructure/docker/client/DockerApiVersionPathPrefixProviderTest.java index c024739aba..324d7e07b8 100644 --- a/plugins/plugin-docker/che-plugin-docker-client/src/test/java/org/eclipse/che/plugin/docker/client/DockerApiVersionPathPrefixProviderTest.java +++ b/infrastructures/docker/docker-client/src/test/java/org/eclipse/che/infrastructure/docker/client/DockerApiVersionPathPrefixProviderTest.java @@ -8,7 +8,7 @@ * Contributors: * Red Hat, Inc. - initial API and implementation */ -package org.eclipse.che.plugin.docker.client; +package org.eclipse.che.infrastructure.docker.client; import static org.testng.Assert.assertEquals; @@ -18,7 +18,7 @@ import org.testng.annotations.Listeners; import org.testng.annotations.Test; /** - * Test for {@link DockerApiVersionPathPrefixProvider} + * Test for {@link org.eclipse.che.infrastructure.docker.client.DockerApiVersionPathPrefixProvider} * * @author Alexander Andrienko */ diff --git a/plugins/plugin-docker/che-plugin-docker-client/src/test/java/org/eclipse/che/plugin/docker/client/DockerConnectorConfigurationTest.java b/infrastructures/docker/docker-client/src/test/java/org/eclipse/che/infrastructure/docker/client/DockerConnectorConfigurationTest.java similarity index 95% rename from plugins/plugin-docker/che-plugin-docker-client/src/test/java/org/eclipse/che/plugin/docker/client/DockerConnectorConfigurationTest.java rename to infrastructures/docker/docker-client/src/test/java/org/eclipse/che/infrastructure/docker/client/DockerConnectorConfigurationTest.java index d87143a642..4fe6390624 100644 --- a/plugins/plugin-docker/che-plugin-docker-client/src/test/java/org/eclipse/che/plugin/docker/client/DockerConnectorConfigurationTest.java +++ b/infrastructures/docker/docker-client/src/test/java/org/eclipse/che/infrastructure/docker/client/DockerConnectorConfigurationTest.java @@ -8,13 +8,13 @@ * Contributors: * Red Hat, Inc. - initial API and implementation */ -package org.eclipse.che.plugin.docker.client; +package org.eclipse.che.infrastructure.docker.client; import static java.util.Collections.emptyMap; -import static org.eclipse.che.plugin.docker.client.DockerConnectorConfiguration.BRIDGE_LINUX_INTERFACE_NAME; -import static org.eclipse.che.plugin.docker.client.DockerConnectorConfiguration.DEFAULT_DOCKER_MACHINE_DOCKER_HOST_IP; -import static org.eclipse.che.plugin.docker.client.DockerConnectorConfiguration.DEFAULT_LINUX_DOCKER_HOST_IP; -import static org.eclipse.che.plugin.docker.client.DockerConnectorConfiguration.DEFAULT_LINUX_INTERFACE_NAME; +import static org.eclipse.che.infrastructure.docker.client.DockerConnectorConfiguration.BRIDGE_LINUX_INTERFACE_NAME; +import static org.eclipse.che.infrastructure.docker.client.DockerConnectorConfiguration.DEFAULT_DOCKER_MACHINE_DOCKER_HOST_IP; +import static org.eclipse.che.infrastructure.docker.client.DockerConnectorConfiguration.DEFAULT_LINUX_DOCKER_HOST_IP; +import static org.eclipse.che.infrastructure.docker.client.DockerConnectorConfiguration.DEFAULT_LINUX_INTERFACE_NAME; import static org.mockito.Matchers.anyString; import static org.mockito.Mockito.doReturn; import static org.mockito.Mockito.never; @@ -30,7 +30,7 @@ import java.util.Collections; import java.util.HashMap; import java.util.Map; import java.util.Optional; -import org.eclipse.che.plugin.docker.client.helper.NetworkFinder; +import org.eclipse.che.infrastructure.docker.client.helper.NetworkFinder; import org.mockito.Mockito; import org.testng.annotations.Test; diff --git a/plugins/plugin-docker/che-plugin-docker-client/src/test/java/org/eclipse/che/plugin/docker/client/DockerConnectorTest.java b/infrastructures/docker/docker-client/src/test/java/org/eclipse/che/infrastructure/docker/client/DockerConnectorTest.java similarity index 94% rename from plugins/plugin-docker/che-plugin-docker-client/src/test/java/org/eclipse/che/plugin/docker/client/DockerConnectorTest.java rename to infrastructures/docker/docker-client/src/test/java/org/eclipse/che/infrastructure/docker/client/DockerConnectorTest.java index bb5450d3da..2e0d05cfcf 100644 --- a/plugins/plugin-docker/che-plugin-docker-client/src/test/java/org/eclipse/che/plugin/docker/client/DockerConnectorTest.java +++ b/infrastructures/docker/docker-client/src/test/java/org/eclipse/che/infrastructure/docker/client/DockerConnectorTest.java @@ -8,7 +8,7 @@ * Contributors: * Red Hat, Inc. - initial API and implementation */ -package org.eclipse.che.plugin.docker.client; +package org.eclipse.che.infrastructure.docker.client; import static java.util.Collections.emptyMap; import static java.util.Collections.singletonList; @@ -52,73 +52,73 @@ import org.eclipse.che.commons.json.JsonParseException; import org.eclipse.che.commons.lang.ws.rs.ExtMediaType; import org.eclipse.che.commons.test.mockito.answer.SelfReturningAnswer; import org.eclipse.che.dto.server.DtoFactory; -import org.eclipse.che.plugin.docker.client.connection.CloseConnectionInputStream; -import org.eclipse.che.plugin.docker.client.connection.DockerConnection; -import org.eclipse.che.plugin.docker.client.connection.DockerConnectionFactory; -import org.eclipse.che.plugin.docker.client.connection.DockerResponse; -import org.eclipse.che.plugin.docker.client.dto.AuthConfig; -import org.eclipse.che.plugin.docker.client.dto.AuthConfigs; -import org.eclipse.che.plugin.docker.client.exception.ContainerNotFoundException; -import org.eclipse.che.plugin.docker.client.exception.DockerException; -import org.eclipse.che.plugin.docker.client.exception.ExecNotFoundException; -import org.eclipse.che.plugin.docker.client.exception.ImageNotFoundException; -import org.eclipse.che.plugin.docker.client.exception.NetworkNotFoundException; -import org.eclipse.che.plugin.docker.client.json.ContainerCommitted; -import org.eclipse.che.plugin.docker.client.json.ContainerConfig; -import org.eclipse.che.plugin.docker.client.json.ContainerCreated; -import org.eclipse.che.plugin.docker.client.json.ContainerExitStatus; -import org.eclipse.che.plugin.docker.client.json.ContainerInfo; -import org.eclipse.che.plugin.docker.client.json.ContainerListEntry; -import org.eclipse.che.plugin.docker.client.json.ContainerProcesses; -import org.eclipse.che.plugin.docker.client.json.Event; -import org.eclipse.che.plugin.docker.client.json.ExecCreated; -import org.eclipse.che.plugin.docker.client.json.ExecInfo; -import org.eclipse.che.plugin.docker.client.json.Filters; -import org.eclipse.che.plugin.docker.client.json.Image; -import org.eclipse.che.plugin.docker.client.json.ImageInfo; -import org.eclipse.che.plugin.docker.client.json.NetworkCreated; -import org.eclipse.che.plugin.docker.client.json.SystemInfo; -import org.eclipse.che.plugin.docker.client.json.Version; -import org.eclipse.che.plugin.docker.client.json.network.ConnectContainer; -import org.eclipse.che.plugin.docker.client.json.network.ContainerInNetwork; -import org.eclipse.che.plugin.docker.client.json.network.DisconnectContainer; -import org.eclipse.che.plugin.docker.client.json.network.EndpointConfig; -import org.eclipse.che.plugin.docker.client.json.network.Ipam; -import org.eclipse.che.plugin.docker.client.json.network.IpamConfig; -import org.eclipse.che.plugin.docker.client.json.network.Network; -import org.eclipse.che.plugin.docker.client.json.network.NewIpamConfig; -import org.eclipse.che.plugin.docker.client.json.network.NewNetwork; -import org.eclipse.che.plugin.docker.client.params.AttachContainerParams; -import org.eclipse.che.plugin.docker.client.params.BuildImageParams; -import org.eclipse.che.plugin.docker.client.params.CommitParams; -import org.eclipse.che.plugin.docker.client.params.CreateContainerParams; -import org.eclipse.che.plugin.docker.client.params.CreateExecParams; -import org.eclipse.che.plugin.docker.client.params.GetContainerLogsParams; -import org.eclipse.che.plugin.docker.client.params.GetEventsParams; -import org.eclipse.che.plugin.docker.client.params.GetExecInfoParams; -import org.eclipse.che.plugin.docker.client.params.GetResourceParams; -import org.eclipse.che.plugin.docker.client.params.InspectContainerParams; -import org.eclipse.che.plugin.docker.client.params.InspectImageParams; -import org.eclipse.che.plugin.docker.client.params.KillContainerParams; -import org.eclipse.che.plugin.docker.client.params.ListContainersParams; -import org.eclipse.che.plugin.docker.client.params.ListImagesParams; -import org.eclipse.che.plugin.docker.client.params.PullParams; -import org.eclipse.che.plugin.docker.client.params.PushParams; -import org.eclipse.che.plugin.docker.client.params.PutResourceParams; -import org.eclipse.che.plugin.docker.client.params.RemoveContainerParams; -import org.eclipse.che.plugin.docker.client.params.RemoveImageParams; -import org.eclipse.che.plugin.docker.client.params.StartContainerParams; -import org.eclipse.che.plugin.docker.client.params.StartExecParams; -import org.eclipse.che.plugin.docker.client.params.StopContainerParams; -import org.eclipse.che.plugin.docker.client.params.TagParams; -import org.eclipse.che.plugin.docker.client.params.TopParams; -import org.eclipse.che.plugin.docker.client.params.WaitContainerParams; -import org.eclipse.che.plugin.docker.client.params.network.ConnectContainerToNetworkParams; -import org.eclipse.che.plugin.docker.client.params.network.CreateNetworkParams; -import org.eclipse.che.plugin.docker.client.params.network.DisconnectContainerFromNetworkParams; -import org.eclipse.che.plugin.docker.client.params.network.GetNetworksParams; -import org.eclipse.che.plugin.docker.client.params.network.InspectNetworkParams; -import org.eclipse.che.plugin.docker.client.params.network.RemoveNetworkParams; +import org.eclipse.che.infrastructure.docker.client.connection.CloseConnectionInputStream; +import org.eclipse.che.infrastructure.docker.client.connection.DockerConnection; +import org.eclipse.che.infrastructure.docker.client.connection.DockerConnectionFactory; +import org.eclipse.che.infrastructure.docker.client.connection.DockerResponse; +import org.eclipse.che.infrastructure.docker.client.dto.AuthConfig; +import org.eclipse.che.infrastructure.docker.client.dto.AuthConfigs; +import org.eclipse.che.infrastructure.docker.client.exception.ContainerNotFoundException; +import org.eclipse.che.infrastructure.docker.client.exception.DockerException; +import org.eclipse.che.infrastructure.docker.client.exception.ExecNotFoundException; +import org.eclipse.che.infrastructure.docker.client.exception.ImageNotFoundException; +import org.eclipse.che.infrastructure.docker.client.exception.NetworkNotFoundException; +import org.eclipse.che.infrastructure.docker.client.json.ContainerCommitted; +import org.eclipse.che.infrastructure.docker.client.json.ContainerConfig; +import org.eclipse.che.infrastructure.docker.client.json.ContainerCreated; +import org.eclipse.che.infrastructure.docker.client.json.ContainerExitStatus; +import org.eclipse.che.infrastructure.docker.client.json.ContainerInfo; +import org.eclipse.che.infrastructure.docker.client.json.ContainerListEntry; +import org.eclipse.che.infrastructure.docker.client.json.ContainerProcesses; +import org.eclipse.che.infrastructure.docker.client.json.Event; +import org.eclipse.che.infrastructure.docker.client.json.ExecCreated; +import org.eclipse.che.infrastructure.docker.client.json.ExecInfo; +import org.eclipse.che.infrastructure.docker.client.json.Filters; +import org.eclipse.che.infrastructure.docker.client.json.Image; +import org.eclipse.che.infrastructure.docker.client.json.ImageInfo; +import org.eclipse.che.infrastructure.docker.client.json.NetworkCreated; +import org.eclipse.che.infrastructure.docker.client.json.SystemInfo; +import org.eclipse.che.infrastructure.docker.client.json.Version; +import org.eclipse.che.infrastructure.docker.client.json.network.ConnectContainer; +import org.eclipse.che.infrastructure.docker.client.json.network.ContainerInNetwork; +import org.eclipse.che.infrastructure.docker.client.json.network.DisconnectContainer; +import org.eclipse.che.infrastructure.docker.client.json.network.EndpointConfig; +import org.eclipse.che.infrastructure.docker.client.json.network.Ipam; +import org.eclipse.che.infrastructure.docker.client.json.network.IpamConfig; +import org.eclipse.che.infrastructure.docker.client.json.network.Network; +import org.eclipse.che.infrastructure.docker.client.json.network.NewIpamConfig; +import org.eclipse.che.infrastructure.docker.client.json.network.NewNetwork; +import org.eclipse.che.infrastructure.docker.client.params.AttachContainerParams; +import org.eclipse.che.infrastructure.docker.client.params.BuildImageParams; +import org.eclipse.che.infrastructure.docker.client.params.CommitParams; +import org.eclipse.che.infrastructure.docker.client.params.CreateContainerParams; +import org.eclipse.che.infrastructure.docker.client.params.CreateExecParams; +import org.eclipse.che.infrastructure.docker.client.params.GetContainerLogsParams; +import org.eclipse.che.infrastructure.docker.client.params.GetEventsParams; +import org.eclipse.che.infrastructure.docker.client.params.GetExecInfoParams; +import org.eclipse.che.infrastructure.docker.client.params.GetResourceParams; +import org.eclipse.che.infrastructure.docker.client.params.InspectContainerParams; +import org.eclipse.che.infrastructure.docker.client.params.InspectImageParams; +import org.eclipse.che.infrastructure.docker.client.params.KillContainerParams; +import org.eclipse.che.infrastructure.docker.client.params.ListContainersParams; +import org.eclipse.che.infrastructure.docker.client.params.ListImagesParams; +import org.eclipse.che.infrastructure.docker.client.params.PullParams; +import org.eclipse.che.infrastructure.docker.client.params.PushParams; +import org.eclipse.che.infrastructure.docker.client.params.PutResourceParams; +import org.eclipse.che.infrastructure.docker.client.params.RemoveContainerParams; +import org.eclipse.che.infrastructure.docker.client.params.RemoveImageParams; +import org.eclipse.che.infrastructure.docker.client.params.StartContainerParams; +import org.eclipse.che.infrastructure.docker.client.params.StartExecParams; +import org.eclipse.che.infrastructure.docker.client.params.StopContainerParams; +import org.eclipse.che.infrastructure.docker.client.params.TagParams; +import org.eclipse.che.infrastructure.docker.client.params.TopParams; +import org.eclipse.che.infrastructure.docker.client.params.WaitContainerParams; +import org.eclipse.che.infrastructure.docker.client.params.network.ConnectContainerToNetworkParams; +import org.eclipse.che.infrastructure.docker.client.params.network.CreateNetworkParams; +import org.eclipse.che.infrastructure.docker.client.params.network.DisconnectContainerFromNetworkParams; +import org.eclipse.che.infrastructure.docker.client.params.network.GetNetworksParams; +import org.eclipse.che.infrastructure.docker.client.params.network.InspectNetworkParams; +import org.eclipse.che.infrastructure.docker.client.params.network.RemoveNetworkParams; import org.mockito.ArgumentCaptor; import org.mockito.Captor; import org.mockito.Matchers; diff --git a/plugins/plugin-docker/che-plugin-docker-client/src/test/java/org/eclipse/che/plugin/docker/client/DockerRegistryAuthResolverTest.java b/infrastructures/docker/docker-client/src/test/java/org/eclipse/che/infrastructure/docker/client/DockerRegistryAuthResolverTest.java similarity index 99% rename from plugins/plugin-docker/che-plugin-docker-client/src/test/java/org/eclipse/che/plugin/docker/client/DockerRegistryAuthResolverTest.java rename to infrastructures/docker/docker-client/src/test/java/org/eclipse/che/infrastructure/docker/client/DockerRegistryAuthResolverTest.java index 8a411a8396..2b2242db91 100644 --- a/plugins/plugin-docker/che-plugin-docker-client/src/test/java/org/eclipse/che/plugin/docker/client/DockerRegistryAuthResolverTest.java +++ b/infrastructures/docker/docker-client/src/test/java/org/eclipse/che/infrastructure/docker/client/DockerRegistryAuthResolverTest.java @@ -8,7 +8,7 @@ * Contributors: * Red Hat, Inc. - initial API and implementation */ -package org.eclipse.che.plugin.docker.client; +package org.eclipse.che.infrastructure.docker.client; import static org.mockito.Mockito.when; import static org.testng.Assert.assertEquals; @@ -18,8 +18,8 @@ import java.util.Base64; import java.util.HashMap; import java.util.Map; import org.eclipse.che.dto.server.DtoFactory; -import org.eclipse.che.plugin.docker.client.dto.AuthConfig; -import org.eclipse.che.plugin.docker.client.dto.AuthConfigs; +import org.eclipse.che.infrastructure.docker.client.dto.AuthConfig; +import org.eclipse.che.infrastructure.docker.client.dto.AuthConfigs; import org.mockito.InjectMocks; import org.mockito.Mock; import org.mockito.testng.MockitoTestNGListener; diff --git a/plugins/plugin-docker/che-plugin-docker-client/src/test/java/org/eclipse/che/plugin/docker/client/DockerfileParserTest.java b/infrastructures/docker/docker-client/src/test/java/org/eclipse/che/infrastructure/docker/client/DockerfileParserTest.java similarity index 99% rename from plugins/plugin-docker/che-plugin-docker-client/src/test/java/org/eclipse/che/plugin/docker/client/DockerfileParserTest.java rename to infrastructures/docker/docker-client/src/test/java/org/eclipse/che/infrastructure/docker/client/DockerfileParserTest.java index bbb1d5ab91..28a3453559 100644 --- a/plugins/plugin-docker/che-plugin-docker-client/src/test/java/org/eclipse/che/plugin/docker/client/DockerfileParserTest.java +++ b/infrastructures/docker/docker-client/src/test/java/org/eclipse/che/infrastructure/docker/client/DockerfileParserTest.java @@ -8,7 +8,7 @@ * Contributors: * Red Hat, Inc. - initial API and implementation */ -package org.eclipse.che.plugin.docker.client; +package org.eclipse.che.infrastructure.docker.client; import static org.testng.Assert.assertEquals; import static org.testng.Assert.assertNull; diff --git a/plugins/plugin-docker/che-plugin-docker-client/src/test/java/org/eclipse/che/plugin/docker/client/InitialAuthConfigTest.java b/infrastructures/docker/docker-client/src/test/java/org/eclipse/che/infrastructure/docker/client/InitialAuthConfigTest.java similarity index 95% rename from plugins/plugin-docker/che-plugin-docker-client/src/test/java/org/eclipse/che/plugin/docker/client/InitialAuthConfigTest.java rename to infrastructures/docker/docker-client/src/test/java/org/eclipse/che/infrastructure/docker/client/InitialAuthConfigTest.java index 81b6612200..27c53b79f9 100644 --- a/plugins/plugin-docker/che-plugin-docker-client/src/test/java/org/eclipse/che/plugin/docker/client/InitialAuthConfigTest.java +++ b/infrastructures/docker/docker-client/src/test/java/org/eclipse/che/infrastructure/docker/client/InitialAuthConfigTest.java @@ -8,20 +8,20 @@ * Contributors: * Red Hat, Inc. - initial API and implementation */ -package org.eclipse.che.plugin.docker.client; +package org.eclipse.che.infrastructure.docker.client; import static org.eclipse.che.dto.server.DtoFactory.newDto; -import static org.eclipse.che.plugin.docker.client.InitialAuthConfig.CONFIGURATION_PREFIX_PATTERN; -import static org.eclipse.che.plugin.docker.client.InitialAuthConfig.CONFIG_PREFIX; -import static org.eclipse.che.plugin.docker.client.InitialAuthConfig.VALID_DOCKER_PROPERTY_NAME_EXAMPLE; +import static org.eclipse.che.infrastructure.docker.client.InitialAuthConfig.CONFIGURATION_PREFIX_PATTERN; +import static org.eclipse.che.infrastructure.docker.client.InitialAuthConfig.CONFIG_PREFIX; +import static org.eclipse.che.infrastructure.docker.client.InitialAuthConfig.VALID_DOCKER_PROPERTY_NAME_EXAMPLE; import static org.mockito.Mockito.when; import static org.testng.Assert.assertEquals; import static org.testng.Assert.assertTrue; import java.util.HashMap; import java.util.Map; +import org.eclipse.che.infrastructure.docker.client.dto.AuthConfig; import org.eclipse.che.inject.ConfigurationProperties; -import org.eclipse.che.plugin.docker.client.dto.AuthConfig; import org.mockito.Mock; import org.mockito.testng.MockitoTestNGListener; import org.testng.annotations.BeforeMethod; diff --git a/plugins/plugin-docker/che-plugin-docker-client/src/test/java/org/eclipse/che/plugin/docker/client/JsonMessageReaderTest.java b/infrastructures/docker/docker-client/src/test/java/org/eclipse/che/infrastructure/docker/client/JsonMessageReaderTest.java similarity index 93% rename from plugins/plugin-docker/che-plugin-docker-client/src/test/java/org/eclipse/che/plugin/docker/client/JsonMessageReaderTest.java rename to infrastructures/docker/docker-client/src/test/java/org/eclipse/che/infrastructure/docker/client/JsonMessageReaderTest.java index 62985fbfce..9466f171f5 100644 --- a/plugins/plugin-docker/che-plugin-docker-client/src/test/java/org/eclipse/che/plugin/docker/client/JsonMessageReaderTest.java +++ b/infrastructures/docker/docker-client/src/test/java/org/eclipse/che/infrastructure/docker/client/JsonMessageReaderTest.java @@ -8,14 +8,14 @@ * Contributors: * Red Hat, Inc. - initial API and implementation */ -package org.eclipse.che.plugin.docker.client; +package org.eclipse.che.infrastructure.docker.client; import static org.testng.Assert.assertEquals; import static org.testng.Assert.assertNull; import java.io.ByteArrayInputStream; import java.io.IOException; -import org.eclipse.che.plugin.docker.client.json.ProgressStatus; +import org.eclipse.che.infrastructure.docker.client.json.ProgressStatus; import org.testng.annotations.Test; /** @author Eugene Voevodin */ diff --git a/plugins/plugin-docker/che-plugin-docker-client/src/test/java/org/eclipse/che/plugin/docker/client/LogMessagePumperTest.java b/infrastructures/docker/docker-client/src/test/java/org/eclipse/che/infrastructure/docker/client/LogMessagePumperTest.java similarity index 98% rename from plugins/plugin-docker/che-plugin-docker-client/src/test/java/org/eclipse/che/plugin/docker/client/LogMessagePumperTest.java rename to infrastructures/docker/docker-client/src/test/java/org/eclipse/che/infrastructure/docker/client/LogMessagePumperTest.java index 30d228a96e..a502ef3811 100644 --- a/plugins/plugin-docker/che-plugin-docker-client/src/test/java/org/eclipse/che/plugin/docker/client/LogMessagePumperTest.java +++ b/infrastructures/docker/docker-client/src/test/java/org/eclipse/che/infrastructure/docker/client/LogMessagePumperTest.java @@ -8,7 +8,7 @@ * Contributors: * Red Hat, Inc. - initial API and implementation */ -package org.eclipse.che.plugin.docker.client; +package org.eclipse.che.infrastructure.docker.client; import static org.testng.Assert.assertEquals; import static org.testng.Assert.assertFalse; diff --git a/plugins/plugin-docker/che-plugin-docker-client/src/test/java/org/eclipse/che/plugin/docker/client/SystemInfoDriverStatusTest.java b/infrastructures/docker/docker-client/src/test/java/org/eclipse/che/infrastructure/docker/client/SystemInfoDriverStatusTest.java similarity index 92% rename from plugins/plugin-docker/che-plugin-docker-client/src/test/java/org/eclipse/che/plugin/docker/client/SystemInfoDriverStatusTest.java rename to infrastructures/docker/docker-client/src/test/java/org/eclipse/che/infrastructure/docker/client/SystemInfoDriverStatusTest.java index dd38e356b7..999320ad2b 100644 --- a/plugins/plugin-docker/che-plugin-docker-client/src/test/java/org/eclipse/che/plugin/docker/client/SystemInfoDriverStatusTest.java +++ b/infrastructures/docker/docker-client/src/test/java/org/eclipse/che/infrastructure/docker/client/SystemInfoDriverStatusTest.java @@ -8,11 +8,11 @@ * Contributors: * Red Hat, Inc. - initial API and implementation */ -package org.eclipse.che.plugin.docker.client; +package org.eclipse.che.infrastructure.docker.client; import static org.testng.Assert.assertEquals; -import org.eclipse.che.plugin.docker.client.json.SystemInfo; +import org.eclipse.che.infrastructure.docker.client.json.SystemInfo; import org.testng.annotations.BeforeTest; import org.testng.annotations.Test; diff --git a/plugins/plugin-docker/che-plugin-docker-client/src/test/java/org/eclipse/che/plugin/docker/client/UserSpecificDockerRegistryCredentialsProviderTest.java b/infrastructures/docker/docker-client/src/test/java/org/eclipse/che/infrastructure/docker/client/UserSpecificDockerRegistryCredentialsProviderTest.java similarity index 95% rename from plugins/plugin-docker/che-plugin-docker-client/src/test/java/org/eclipse/che/plugin/docker/client/UserSpecificDockerRegistryCredentialsProviderTest.java rename to infrastructures/docker/docker-client/src/test/java/org/eclipse/che/infrastructure/docker/client/UserSpecificDockerRegistryCredentialsProviderTest.java index 46286e320b..2227f8eee1 100644 --- a/plugins/plugin-docker/che-plugin-docker-client/src/test/java/org/eclipse/che/plugin/docker/client/UserSpecificDockerRegistryCredentialsProviderTest.java +++ b/infrastructures/docker/docker-client/src/test/java/org/eclipse/che/infrastructure/docker/client/UserSpecificDockerRegistryCredentialsProviderTest.java @@ -8,7 +8,7 @@ * Contributors: * Red Hat, Inc. - initial API and implementation */ -package org.eclipse.che.plugin.docker.client; +package org.eclipse.che.infrastructure.docker.client; import static org.mockito.Matchers.anyObject; import static org.mockito.Mockito.when; @@ -23,8 +23,8 @@ import org.eclipse.che.api.user.server.PreferenceManager; import org.eclipse.che.commons.env.EnvironmentContext; import org.eclipse.che.commons.subject.SubjectImpl; import org.eclipse.che.dto.server.DtoFactory; -import org.eclipse.che.plugin.docker.client.dto.AuthConfig; -import org.eclipse.che.plugin.docker.client.dto.AuthConfigs; +import org.eclipse.che.infrastructure.docker.client.dto.AuthConfig; +import org.eclipse.che.infrastructure.docker.client.dto.AuthConfigs; import org.mockito.Mock; import org.mockito.testng.MockitoTestNGListener; import org.testng.annotations.BeforeClass; diff --git a/plugins/plugin-docker/che-plugin-docker-client/src/test/java/org/eclipse/che/plugin/docker/client/helper/DefaultNetworkFinderHelperTest.java b/infrastructures/docker/docker-client/src/test/java/org/eclipse/che/infrastructure/docker/client/helper/DefaultNetworkFinderHelperTest.java similarity index 97% rename from plugins/plugin-docker/che-plugin-docker-client/src/test/java/org/eclipse/che/plugin/docker/client/helper/DefaultNetworkFinderHelperTest.java rename to infrastructures/docker/docker-client/src/test/java/org/eclipse/che/infrastructure/docker/client/helper/DefaultNetworkFinderHelperTest.java index 9cd52c86e7..3d0f4faaae 100644 --- a/plugins/plugin-docker/che-plugin-docker-client/src/test/java/org/eclipse/che/plugin/docker/client/helper/DefaultNetworkFinderHelperTest.java +++ b/infrastructures/docker/docker-client/src/test/java/org/eclipse/che/infrastructure/docker/client/helper/DefaultNetworkFinderHelperTest.java @@ -8,7 +8,7 @@ * Contributors: * Red Hat, Inc. - initial API and implementation */ -package org.eclipse.che.plugin.docker.client.helper; +package org.eclipse.che.infrastructure.docker.client.helper; import static org.testng.Assert.assertEquals; import static org.testng.Assert.assertTrue; diff --git a/plugins/plugin-docker/che-plugin-docker-client/src/test/java/org/eclipse/che/plugin/docker/client/params/AttachContainerParamsTest.java b/infrastructures/docker/docker-client/src/test/java/org/eclipse/che/infrastructure/docker/client/params/AttachContainerParamsTest.java similarity index 97% rename from plugins/plugin-docker/che-plugin-docker-client/src/test/java/org/eclipse/che/plugin/docker/client/params/AttachContainerParamsTest.java rename to infrastructures/docker/docker-client/src/test/java/org/eclipse/che/infrastructure/docker/client/params/AttachContainerParamsTest.java index feda466240..eeb9e6e462 100644 --- a/plugins/plugin-docker/che-plugin-docker-client/src/test/java/org/eclipse/che/plugin/docker/client/params/AttachContainerParamsTest.java +++ b/infrastructures/docker/docker-client/src/test/java/org/eclipse/che/infrastructure/docker/client/params/AttachContainerParamsTest.java @@ -8,7 +8,7 @@ * Contributors: * Red Hat, Inc. - initial API and implementation */ -package org.eclipse.che.plugin.docker.client.params; +package org.eclipse.che.infrastructure.docker.client.params; import static org.testng.Assert.assertEquals; import static org.testng.Assert.assertNull; diff --git a/plugins/plugin-docker/che-plugin-docker-client/src/test/java/org/eclipse/che/plugin/docker/client/params/BuildImageParamsTest.java b/infrastructures/docker/docker-client/src/test/java/org/eclipse/che/infrastructure/docker/client/params/BuildImageParamsTest.java similarity index 98% rename from plugins/plugin-docker/che-plugin-docker-client/src/test/java/org/eclipse/che/plugin/docker/client/params/BuildImageParamsTest.java rename to infrastructures/docker/docker-client/src/test/java/org/eclipse/che/infrastructure/docker/client/params/BuildImageParamsTest.java index 18b94ae907..5d18ed590f 100644 --- a/plugins/plugin-docker/che-plugin-docker-client/src/test/java/org/eclipse/che/plugin/docker/client/params/BuildImageParamsTest.java +++ b/infrastructures/docker/docker-client/src/test/java/org/eclipse/che/infrastructure/docker/client/params/BuildImageParamsTest.java @@ -8,7 +8,7 @@ * Contributors: * Red Hat, Inc. - initial API and implementation */ -package org.eclipse.che.plugin.docker.client.params; +package org.eclipse.che.infrastructure.docker.client.params; import static org.mockito.Mockito.mock; import static org.testng.Assert.assertEquals; @@ -20,7 +20,7 @@ import java.util.ArrayList; import java.util.HashMap; import java.util.List; import java.util.Map; -import org.eclipse.che.plugin.docker.client.dto.AuthConfigs; +import org.eclipse.che.infrastructure.docker.client.dto.AuthConfigs; import org.testng.annotations.BeforeMethod; import org.testng.annotations.Test; diff --git a/plugins/plugin-docker/che-plugin-docker-client/src/test/java/org/eclipse/che/plugin/docker/client/params/CommitParamsTest.java b/infrastructures/docker/docker-client/src/test/java/org/eclipse/che/infrastructure/docker/client/params/CommitParamsTest.java similarity index 98% rename from plugins/plugin-docker/che-plugin-docker-client/src/test/java/org/eclipse/che/plugin/docker/client/params/CommitParamsTest.java rename to infrastructures/docker/docker-client/src/test/java/org/eclipse/che/infrastructure/docker/client/params/CommitParamsTest.java index 424f9478a6..465347dee9 100644 --- a/plugins/plugin-docker/che-plugin-docker-client/src/test/java/org/eclipse/che/plugin/docker/client/params/CommitParamsTest.java +++ b/infrastructures/docker/docker-client/src/test/java/org/eclipse/che/infrastructure/docker/client/params/CommitParamsTest.java @@ -8,7 +8,7 @@ * Contributors: * Red Hat, Inc. - initial API and implementation */ -package org.eclipse.che.plugin.docker.client.params; +package org.eclipse.che.infrastructure.docker.client.params; import static org.testng.Assert.assertEquals; import static org.testng.Assert.assertNull; diff --git a/plugins/plugin-docker/che-plugin-docker-client/src/test/java/org/eclipse/che/plugin/docker/client/params/CreateContainerParamsTest.java b/infrastructures/docker/docker-client/src/test/java/org/eclipse/che/infrastructure/docker/client/params/CreateContainerParamsTest.java similarity index 94% rename from plugins/plugin-docker/che-plugin-docker-client/src/test/java/org/eclipse/che/plugin/docker/client/params/CreateContainerParamsTest.java rename to infrastructures/docker/docker-client/src/test/java/org/eclipse/che/infrastructure/docker/client/params/CreateContainerParamsTest.java index 8502da4496..965fc4b4b7 100644 --- a/plugins/plugin-docker/che-plugin-docker-client/src/test/java/org/eclipse/che/plugin/docker/client/params/CreateContainerParamsTest.java +++ b/infrastructures/docker/docker-client/src/test/java/org/eclipse/che/infrastructure/docker/client/params/CreateContainerParamsTest.java @@ -8,13 +8,13 @@ * Contributors: * Red Hat, Inc. - initial API and implementation */ -package org.eclipse.che.plugin.docker.client.params; +package org.eclipse.che.infrastructure.docker.client.params; import static org.mockito.Mockito.mock; import static org.testng.Assert.assertEquals; import static org.testng.Assert.assertNull; -import org.eclipse.che.plugin.docker.client.json.ContainerConfig; +import org.eclipse.che.infrastructure.docker.client.json.ContainerConfig; import org.testng.annotations.Test; /** @author Mykola Morhun */ diff --git a/plugins/plugin-docker/che-plugin-docker-client/src/test/java/org/eclipse/che/plugin/docker/client/params/CreateExecParamsTest.java b/infrastructures/docker/docker-client/src/test/java/org/eclipse/che/infrastructure/docker/client/params/CreateExecParamsTest.java similarity index 97% rename from plugins/plugin-docker/che-plugin-docker-client/src/test/java/org/eclipse/che/plugin/docker/client/params/CreateExecParamsTest.java rename to infrastructures/docker/docker-client/src/test/java/org/eclipse/che/infrastructure/docker/client/params/CreateExecParamsTest.java index aa2a1d9031..9d28b3971c 100644 --- a/plugins/plugin-docker/che-plugin-docker-client/src/test/java/org/eclipse/che/plugin/docker/client/params/CreateExecParamsTest.java +++ b/infrastructures/docker/docker-client/src/test/java/org/eclipse/che/infrastructure/docker/client/params/CreateExecParamsTest.java @@ -8,7 +8,7 @@ * Contributors: * Red Hat, Inc. - initial API and implementation */ -package org.eclipse.che.plugin.docker.client.params; +package org.eclipse.che.infrastructure.docker.client.params; import static org.testng.Assert.assertEquals; import static org.testng.Assert.assertNull; diff --git a/plugins/plugin-docker/che-plugin-docker-client/src/test/java/org/eclipse/che/plugin/docker/client/params/GetContainerLogsParamsTest.java b/infrastructures/docker/docker-client/src/test/java/org/eclipse/che/infrastructure/docker/client/params/GetContainerLogsParamsTest.java similarity index 98% rename from plugins/plugin-docker/che-plugin-docker-client/src/test/java/org/eclipse/che/plugin/docker/client/params/GetContainerLogsParamsTest.java rename to infrastructures/docker/docker-client/src/test/java/org/eclipse/che/infrastructure/docker/client/params/GetContainerLogsParamsTest.java index ce8ccf05e4..10f35fae30 100644 --- a/plugins/plugin-docker/che-plugin-docker-client/src/test/java/org/eclipse/che/plugin/docker/client/params/GetContainerLogsParamsTest.java +++ b/infrastructures/docker/docker-client/src/test/java/org/eclipse/che/infrastructure/docker/client/params/GetContainerLogsParamsTest.java @@ -8,7 +8,7 @@ * Contributors: * Red Hat, Inc. - initial API and implementation */ -package org.eclipse.che.plugin.docker.client.params; +package org.eclipse.che.infrastructure.docker.client.params; import static org.testng.Assert.assertEquals; import static org.testng.Assert.assertNull; diff --git a/plugins/plugin-docker/che-plugin-docker-client/src/test/java/org/eclipse/che/plugin/docker/client/params/GetEventsParamsTest.java b/infrastructures/docker/docker-client/src/test/java/org/eclipse/che/infrastructure/docker/client/params/GetEventsParamsTest.java similarity index 94% rename from plugins/plugin-docker/che-plugin-docker-client/src/test/java/org/eclipse/che/plugin/docker/client/params/GetEventsParamsTest.java rename to infrastructures/docker/docker-client/src/test/java/org/eclipse/che/infrastructure/docker/client/params/GetEventsParamsTest.java index f9614c1ee4..aa46c8ce8f 100644 --- a/plugins/plugin-docker/che-plugin-docker-client/src/test/java/org/eclipse/che/plugin/docker/client/params/GetEventsParamsTest.java +++ b/infrastructures/docker/docker-client/src/test/java/org/eclipse/che/infrastructure/docker/client/params/GetEventsParamsTest.java @@ -8,14 +8,14 @@ * Contributors: * Red Hat, Inc. - initial API and implementation */ -package org.eclipse.che.plugin.docker.client.params; +package org.eclipse.che.infrastructure.docker.client.params; import static org.mockito.Mockito.mock; import static org.testng.Assert.assertEquals; import static org.testng.Assert.assertNull; import static org.testng.Assert.assertTrue; -import org.eclipse.che.plugin.docker.client.json.Filters; +import org.eclipse.che.infrastructure.docker.client.json.Filters; import org.testng.annotations.BeforeMethod; import org.testng.annotations.Test; diff --git a/plugins/plugin-docker/che-plugin-docker-client/src/test/java/org/eclipse/che/plugin/docker/client/params/GetExecInfoParamsTest.java b/infrastructures/docker/docker-client/src/test/java/org/eclipse/che/infrastructure/docker/client/params/GetExecInfoParamsTest.java similarity index 95% rename from plugins/plugin-docker/che-plugin-docker-client/src/test/java/org/eclipse/che/plugin/docker/client/params/GetExecInfoParamsTest.java rename to infrastructures/docker/docker-client/src/test/java/org/eclipse/che/infrastructure/docker/client/params/GetExecInfoParamsTest.java index 05317d7978..9ece771e6a 100644 --- a/plugins/plugin-docker/che-plugin-docker-client/src/test/java/org/eclipse/che/plugin/docker/client/params/GetExecInfoParamsTest.java +++ b/infrastructures/docker/docker-client/src/test/java/org/eclipse/che/infrastructure/docker/client/params/GetExecInfoParamsTest.java @@ -8,7 +8,7 @@ * Contributors: * Red Hat, Inc. - initial API and implementation */ -package org.eclipse.che.plugin.docker.client.params; +package org.eclipse.che.infrastructure.docker.client.params; import static org.testng.Assert.assertEquals; diff --git a/plugins/plugin-docker/che-plugin-docker-client/src/test/java/org/eclipse/che/plugin/docker/client/params/GetResourceParamsTest.java b/infrastructures/docker/docker-client/src/test/java/org/eclipse/che/infrastructure/docker/client/params/GetResourceParamsTest.java similarity index 96% rename from plugins/plugin-docker/che-plugin-docker-client/src/test/java/org/eclipse/che/plugin/docker/client/params/GetResourceParamsTest.java rename to infrastructures/docker/docker-client/src/test/java/org/eclipse/che/infrastructure/docker/client/params/GetResourceParamsTest.java index 01b069a4e0..a00c414b6c 100644 --- a/plugins/plugin-docker/che-plugin-docker-client/src/test/java/org/eclipse/che/plugin/docker/client/params/GetResourceParamsTest.java +++ b/infrastructures/docker/docker-client/src/test/java/org/eclipse/che/infrastructure/docker/client/params/GetResourceParamsTest.java @@ -8,7 +8,7 @@ * Contributors: * Red Hat, Inc. - initial API and implementation */ -package org.eclipse.che.plugin.docker.client.params; +package org.eclipse.che.infrastructure.docker.client.params; import static org.testng.Assert.assertEquals; diff --git a/plugins/plugin-docker/che-plugin-docker-client/src/test/java/org/eclipse/che/plugin/docker/client/params/InspectContainerParamsTest.java b/infrastructures/docker/docker-client/src/test/java/org/eclipse/che/infrastructure/docker/client/params/InspectContainerParamsTest.java similarity index 96% rename from plugins/plugin-docker/che-plugin-docker-client/src/test/java/org/eclipse/che/plugin/docker/client/params/InspectContainerParamsTest.java rename to infrastructures/docker/docker-client/src/test/java/org/eclipse/che/infrastructure/docker/client/params/InspectContainerParamsTest.java index c1268d4a55..b092837131 100644 --- a/plugins/plugin-docker/che-plugin-docker-client/src/test/java/org/eclipse/che/plugin/docker/client/params/InspectContainerParamsTest.java +++ b/infrastructures/docker/docker-client/src/test/java/org/eclipse/che/infrastructure/docker/client/params/InspectContainerParamsTest.java @@ -8,7 +8,7 @@ * Contributors: * Red Hat, Inc. - initial API and implementation */ -package org.eclipse.che.plugin.docker.client.params; +package org.eclipse.che.infrastructure.docker.client.params; import static org.testng.Assert.assertEquals; import static org.testng.Assert.assertNull; diff --git a/plugins/plugin-docker/che-plugin-docker-client/src/test/java/org/eclipse/che/plugin/docker/client/params/InspectImageParamsTest.java b/infrastructures/docker/docker-client/src/test/java/org/eclipse/che/infrastructure/docker/client/params/InspectImageParamsTest.java similarity index 95% rename from plugins/plugin-docker/che-plugin-docker-client/src/test/java/org/eclipse/che/plugin/docker/client/params/InspectImageParamsTest.java rename to infrastructures/docker/docker-client/src/test/java/org/eclipse/che/infrastructure/docker/client/params/InspectImageParamsTest.java index b8950921f7..d4e7c5f7e3 100644 --- a/plugins/plugin-docker/che-plugin-docker-client/src/test/java/org/eclipse/che/plugin/docker/client/params/InspectImageParamsTest.java +++ b/infrastructures/docker/docker-client/src/test/java/org/eclipse/che/infrastructure/docker/client/params/InspectImageParamsTest.java @@ -8,7 +8,7 @@ * Contributors: * Red Hat, Inc. - initial API and implementation */ -package org.eclipse.che.plugin.docker.client.params; +package org.eclipse.che.infrastructure.docker.client.params; import static org.testng.Assert.assertEquals; diff --git a/plugins/plugin-docker/che-plugin-docker-client/src/test/java/org/eclipse/che/plugin/docker/client/params/KillContainerParamsTest.java b/infrastructures/docker/docker-client/src/test/java/org/eclipse/che/infrastructure/docker/client/params/KillContainerParamsTest.java similarity index 96% rename from plugins/plugin-docker/che-plugin-docker-client/src/test/java/org/eclipse/che/plugin/docker/client/params/KillContainerParamsTest.java rename to infrastructures/docker/docker-client/src/test/java/org/eclipse/che/infrastructure/docker/client/params/KillContainerParamsTest.java index d2ed718a70..d9a9b856f1 100644 --- a/plugins/plugin-docker/che-plugin-docker-client/src/test/java/org/eclipse/che/plugin/docker/client/params/KillContainerParamsTest.java +++ b/infrastructures/docker/docker-client/src/test/java/org/eclipse/che/infrastructure/docker/client/params/KillContainerParamsTest.java @@ -8,7 +8,7 @@ * Contributors: * Red Hat, Inc. - initial API and implementation */ -package org.eclipse.che.plugin.docker.client.params; +package org.eclipse.che.infrastructure.docker.client.params; import static org.testng.Assert.assertEquals; import static org.testng.Assert.assertNull; diff --git a/plugins/plugin-docker/che-plugin-docker-client/src/test/java/org/eclipse/che/plugin/docker/client/params/ListContainersParamsTest.java b/infrastructures/docker/docker-client/src/test/java/org/eclipse/che/infrastructure/docker/client/params/ListContainersParamsTest.java similarity index 97% rename from plugins/plugin-docker/che-plugin-docker-client/src/test/java/org/eclipse/che/plugin/docker/client/params/ListContainersParamsTest.java rename to infrastructures/docker/docker-client/src/test/java/org/eclipse/che/infrastructure/docker/client/params/ListContainersParamsTest.java index 5e274d8f71..4e3b63a5cf 100644 --- a/plugins/plugin-docker/che-plugin-docker-client/src/test/java/org/eclipse/che/plugin/docker/client/params/ListContainersParamsTest.java +++ b/infrastructures/docker/docker-client/src/test/java/org/eclipse/che/infrastructure/docker/client/params/ListContainersParamsTest.java @@ -8,7 +8,7 @@ * Contributors: * Red Hat, Inc. - initial API and implementation */ -package org.eclipse.che.plugin.docker.client.params; +package org.eclipse.che.infrastructure.docker.client.params; import static java.lang.Boolean.TRUE; import static java.util.Collections.singletonList; @@ -16,7 +16,7 @@ import static java.util.Collections.singletonMap; import static org.testng.Assert.assertEquals; import static org.testng.Assert.assertNull; -import org.eclipse.che.plugin.docker.client.json.Filters; +import org.eclipse.che.infrastructure.docker.client.json.Filters; import org.testng.annotations.Test; /** diff --git a/plugins/plugin-docker/che-plugin-docker-client/src/test/java/org/eclipse/che/plugin/docker/client/params/ListImagesParamsTest.java b/infrastructures/docker/docker-client/src/test/java/org/eclipse/che/infrastructure/docker/client/params/ListImagesParamsTest.java similarity index 90% rename from plugins/plugin-docker/che-plugin-docker-client/src/test/java/org/eclipse/che/plugin/docker/client/params/ListImagesParamsTest.java rename to infrastructures/docker/docker-client/src/test/java/org/eclipse/che/infrastructure/docker/client/params/ListImagesParamsTest.java index b680851b7c..aa9fda6e77 100644 --- a/plugins/plugin-docker/che-plugin-docker-client/src/test/java/org/eclipse/che/plugin/docker/client/params/ListImagesParamsTest.java +++ b/infrastructures/docker/docker-client/src/test/java/org/eclipse/che/infrastructure/docker/client/params/ListImagesParamsTest.java @@ -8,12 +8,12 @@ * Contributors: * Red Hat, Inc. - initial API and implementation */ -package org.eclipse.che.plugin.docker.client.params; +package org.eclipse.che.infrastructure.docker.client.params; import static org.testng.Assert.assertEquals; import static org.testng.Assert.assertTrue; -import org.eclipse.che.plugin.docker.client.json.Filters; +import org.eclipse.che.infrastructure.docker.client.json.Filters; import org.testng.annotations.Test; /** @author Mykola Morhun */ diff --git a/plugins/plugin-docker/che-plugin-docker-client/src/test/java/org/eclipse/che/plugin/docker/client/params/PullParamsTest.java b/infrastructures/docker/docker-client/src/test/java/org/eclipse/che/infrastructure/docker/client/params/PullParamsTest.java similarity index 96% rename from plugins/plugin-docker/che-plugin-docker-client/src/test/java/org/eclipse/che/plugin/docker/client/params/PullParamsTest.java rename to infrastructures/docker/docker-client/src/test/java/org/eclipse/che/infrastructure/docker/client/params/PullParamsTest.java index c118a4fe83..8a6da93eb6 100644 --- a/plugins/plugin-docker/che-plugin-docker-client/src/test/java/org/eclipse/che/plugin/docker/client/params/PullParamsTest.java +++ b/infrastructures/docker/docker-client/src/test/java/org/eclipse/che/infrastructure/docker/client/params/PullParamsTest.java @@ -8,12 +8,12 @@ * Contributors: * Red Hat, Inc. - initial API and implementation */ -package org.eclipse.che.plugin.docker.client.params; +package org.eclipse.che.infrastructure.docker.client.params; import static org.testng.Assert.assertEquals; import static org.testng.Assert.assertNull; -import org.eclipse.che.plugin.docker.client.dto.AuthConfigs; +import org.eclipse.che.infrastructure.docker.client.dto.AuthConfigs; import org.mockito.Mock; import org.testng.annotations.Test; diff --git a/plugins/plugin-docker/che-plugin-docker-client/src/test/java/org/eclipse/che/plugin/docker/client/params/PushParamsTest.java b/infrastructures/docker/docker-client/src/test/java/org/eclipse/che/infrastructure/docker/client/params/PushParamsTest.java similarity index 96% rename from plugins/plugin-docker/che-plugin-docker-client/src/test/java/org/eclipse/che/plugin/docker/client/params/PushParamsTest.java rename to infrastructures/docker/docker-client/src/test/java/org/eclipse/che/infrastructure/docker/client/params/PushParamsTest.java index aef69358f5..f3fce87c15 100644 --- a/plugins/plugin-docker/che-plugin-docker-client/src/test/java/org/eclipse/che/plugin/docker/client/params/PushParamsTest.java +++ b/infrastructures/docker/docker-client/src/test/java/org/eclipse/che/infrastructure/docker/client/params/PushParamsTest.java @@ -8,12 +8,12 @@ * Contributors: * Red Hat, Inc. - initial API and implementation */ -package org.eclipse.che.plugin.docker.client.params; +package org.eclipse.che.infrastructure.docker.client.params; import static org.testng.Assert.assertEquals; import static org.testng.Assert.assertNull; -import org.eclipse.che.plugin.docker.client.dto.AuthConfigs; +import org.eclipse.che.infrastructure.docker.client.dto.AuthConfigs; import org.mockito.Mock; import org.testng.annotations.Test; diff --git a/plugins/plugin-docker/che-plugin-docker-client/src/test/java/org/eclipse/che/plugin/docker/client/params/PutResourceParamsTest.java b/infrastructures/docker/docker-client/src/test/java/org/eclipse/che/infrastructure/docker/client/params/PutResourceParamsTest.java similarity index 98% rename from plugins/plugin-docker/che-plugin-docker-client/src/test/java/org/eclipse/che/plugin/docker/client/params/PutResourceParamsTest.java rename to infrastructures/docker/docker-client/src/test/java/org/eclipse/che/infrastructure/docker/client/params/PutResourceParamsTest.java index ea6362b12d..c01afc4faf 100644 --- a/plugins/plugin-docker/che-plugin-docker-client/src/test/java/org/eclipse/che/plugin/docker/client/params/PutResourceParamsTest.java +++ b/infrastructures/docker/docker-client/src/test/java/org/eclipse/che/infrastructure/docker/client/params/PutResourceParamsTest.java @@ -8,7 +8,7 @@ * Contributors: * Red Hat, Inc. - initial API and implementation */ -package org.eclipse.che.plugin.docker.client.params; +package org.eclipse.che.infrastructure.docker.client.params; import static org.mockito.Mockito.mock; import static org.testng.Assert.assertEquals; diff --git a/plugins/plugin-docker/che-plugin-docker-client/src/test/java/org/eclipse/che/plugin/docker/client/params/RemoveContainerParamsTest.java b/infrastructures/docker/docker-client/src/test/java/org/eclipse/che/infrastructure/docker/client/params/RemoveContainerParamsTest.java similarity index 97% rename from plugins/plugin-docker/che-plugin-docker-client/src/test/java/org/eclipse/che/plugin/docker/client/params/RemoveContainerParamsTest.java rename to infrastructures/docker/docker-client/src/test/java/org/eclipse/che/infrastructure/docker/client/params/RemoveContainerParamsTest.java index 87384a928a..fac7fad774 100644 --- a/plugins/plugin-docker/che-plugin-docker-client/src/test/java/org/eclipse/che/plugin/docker/client/params/RemoveContainerParamsTest.java +++ b/infrastructures/docker/docker-client/src/test/java/org/eclipse/che/infrastructure/docker/client/params/RemoveContainerParamsTest.java @@ -8,7 +8,7 @@ * Contributors: * Red Hat, Inc. - initial API and implementation */ -package org.eclipse.che.plugin.docker.client.params; +package org.eclipse.che.infrastructure.docker.client.params; import static org.testng.Assert.assertEquals; import static org.testng.Assert.assertNull; diff --git a/plugins/plugin-docker/che-plugin-docker-client/src/test/java/org/eclipse/che/plugin/docker/client/params/RemoveImageParamsTest.java b/infrastructures/docker/docker-client/src/test/java/org/eclipse/che/infrastructure/docker/client/params/RemoveImageParamsTest.java similarity index 96% rename from plugins/plugin-docker/che-plugin-docker-client/src/test/java/org/eclipse/che/plugin/docker/client/params/RemoveImageParamsTest.java rename to infrastructures/docker/docker-client/src/test/java/org/eclipse/che/infrastructure/docker/client/params/RemoveImageParamsTest.java index 9020453cc6..15983cdb2d 100644 --- a/plugins/plugin-docker/che-plugin-docker-client/src/test/java/org/eclipse/che/plugin/docker/client/params/RemoveImageParamsTest.java +++ b/infrastructures/docker/docker-client/src/test/java/org/eclipse/che/infrastructure/docker/client/params/RemoveImageParamsTest.java @@ -8,7 +8,7 @@ * Contributors: * Red Hat, Inc. - initial API and implementation */ -package org.eclipse.che.plugin.docker.client.params; +package org.eclipse.che.infrastructure.docker.client.params; import static org.testng.Assert.assertEquals; import static org.testng.Assert.assertNull; diff --git a/plugins/plugin-docker/che-plugin-docker-client/src/test/java/org/eclipse/che/plugin/docker/client/params/StartContainerParamsTest.java b/infrastructures/docker/docker-client/src/test/java/org/eclipse/che/infrastructure/docker/client/params/StartContainerParamsTest.java similarity index 95% rename from plugins/plugin-docker/che-plugin-docker-client/src/test/java/org/eclipse/che/plugin/docker/client/params/StartContainerParamsTest.java rename to infrastructures/docker/docker-client/src/test/java/org/eclipse/che/infrastructure/docker/client/params/StartContainerParamsTest.java index b18ecd345b..19e9141288 100644 --- a/plugins/plugin-docker/che-plugin-docker-client/src/test/java/org/eclipse/che/plugin/docker/client/params/StartContainerParamsTest.java +++ b/infrastructures/docker/docker-client/src/test/java/org/eclipse/che/infrastructure/docker/client/params/StartContainerParamsTest.java @@ -8,7 +8,7 @@ * Contributors: * Red Hat, Inc. - initial API and implementation */ -package org.eclipse.che.plugin.docker.client.params; +package org.eclipse.che.infrastructure.docker.client.params; import static org.testng.Assert.assertEquals; diff --git a/plugins/plugin-docker/che-plugin-docker-client/src/test/java/org/eclipse/che/plugin/docker/client/params/StartExecParamsTest.java b/infrastructures/docker/docker-client/src/test/java/org/eclipse/che/infrastructure/docker/client/params/StartExecParamsTest.java similarity index 97% rename from plugins/plugin-docker/che-plugin-docker-client/src/test/java/org/eclipse/che/plugin/docker/client/params/StartExecParamsTest.java rename to infrastructures/docker/docker-client/src/test/java/org/eclipse/che/infrastructure/docker/client/params/StartExecParamsTest.java index 31bc3982c2..796e9612cc 100644 --- a/plugins/plugin-docker/che-plugin-docker-client/src/test/java/org/eclipse/che/plugin/docker/client/params/StartExecParamsTest.java +++ b/infrastructures/docker/docker-client/src/test/java/org/eclipse/che/infrastructure/docker/client/params/StartExecParamsTest.java @@ -8,7 +8,7 @@ * Contributors: * Red Hat, Inc. - initial API and implementation */ -package org.eclipse.che.plugin.docker.client.params; +package org.eclipse.che.infrastructure.docker.client.params; import static org.testng.Assert.assertEquals; import static org.testng.Assert.assertNull; diff --git a/plugins/plugin-docker/che-plugin-docker-client/src/test/java/org/eclipse/che/plugin/docker/client/params/StopContainerParamsTest.java b/infrastructures/docker/docker-client/src/test/java/org/eclipse/che/infrastructure/docker/client/params/StopContainerParamsTest.java similarity index 97% rename from plugins/plugin-docker/che-plugin-docker-client/src/test/java/org/eclipse/che/plugin/docker/client/params/StopContainerParamsTest.java rename to infrastructures/docker/docker-client/src/test/java/org/eclipse/che/infrastructure/docker/client/params/StopContainerParamsTest.java index 5ec0ad03fd..3d94c06add 100644 --- a/plugins/plugin-docker/che-plugin-docker-client/src/test/java/org/eclipse/che/plugin/docker/client/params/StopContainerParamsTest.java +++ b/infrastructures/docker/docker-client/src/test/java/org/eclipse/che/infrastructure/docker/client/params/StopContainerParamsTest.java @@ -8,7 +8,7 @@ * Contributors: * Red Hat, Inc. - initial API and implementation */ -package org.eclipse.che.plugin.docker.client.params; +package org.eclipse.che.infrastructure.docker.client.params; import static org.testng.Assert.assertEquals; import static org.testng.Assert.assertNull; diff --git a/plugins/plugin-docker/che-plugin-docker-client/src/test/java/org/eclipse/che/plugin/docker/client/params/TagParamsTest.java b/infrastructures/docker/docker-client/src/test/java/org/eclipse/che/infrastructure/docker/client/params/TagParamsTest.java similarity index 97% rename from plugins/plugin-docker/che-plugin-docker-client/src/test/java/org/eclipse/che/plugin/docker/client/params/TagParamsTest.java rename to infrastructures/docker/docker-client/src/test/java/org/eclipse/che/infrastructure/docker/client/params/TagParamsTest.java index ccf71ade42..a7481dfdf0 100644 --- a/plugins/plugin-docker/che-plugin-docker-client/src/test/java/org/eclipse/che/plugin/docker/client/params/TagParamsTest.java +++ b/infrastructures/docker/docker-client/src/test/java/org/eclipse/che/infrastructure/docker/client/params/TagParamsTest.java @@ -8,7 +8,7 @@ * Contributors: * Red Hat, Inc. - initial API and implementation */ -package org.eclipse.che.plugin.docker.client.params; +package org.eclipse.che.infrastructure.docker.client.params; import static org.testng.Assert.assertEquals; import static org.testng.Assert.assertNull; diff --git a/plugins/plugin-docker/che-plugin-docker-client/src/test/java/org/eclipse/che/plugin/docker/client/params/TopParamsTest.java b/infrastructures/docker/docker-client/src/test/java/org/eclipse/che/infrastructure/docker/client/params/TopParamsTest.java similarity index 96% rename from plugins/plugin-docker/che-plugin-docker-client/src/test/java/org/eclipse/che/plugin/docker/client/params/TopParamsTest.java rename to infrastructures/docker/docker-client/src/test/java/org/eclipse/che/infrastructure/docker/client/params/TopParamsTest.java index a16368ef1a..998efc3e42 100644 --- a/plugins/plugin-docker/che-plugin-docker-client/src/test/java/org/eclipse/che/plugin/docker/client/params/TopParamsTest.java +++ b/infrastructures/docker/docker-client/src/test/java/org/eclipse/che/infrastructure/docker/client/params/TopParamsTest.java @@ -8,7 +8,7 @@ * Contributors: * Red Hat, Inc. - initial API and implementation */ -package org.eclipse.che.plugin.docker.client.params; +package org.eclipse.che.infrastructure.docker.client.params; import static org.testng.Assert.assertEquals; import static org.testng.Assert.assertNull; diff --git a/plugins/plugin-docker/che-plugin-docker-client/src/test/java/org/eclipse/che/plugin/docker/client/params/WaitContainerParamsTest.java b/infrastructures/docker/docker-client/src/test/java/org/eclipse/che/infrastructure/docker/client/params/WaitContainerParamsTest.java similarity index 95% rename from plugins/plugin-docker/che-plugin-docker-client/src/test/java/org/eclipse/che/plugin/docker/client/params/WaitContainerParamsTest.java rename to infrastructures/docker/docker-client/src/test/java/org/eclipse/che/infrastructure/docker/client/params/WaitContainerParamsTest.java index f626b07868..4ca723ae90 100644 --- a/plugins/plugin-docker/che-plugin-docker-client/src/test/java/org/eclipse/che/plugin/docker/client/params/WaitContainerParamsTest.java +++ b/infrastructures/docker/docker-client/src/test/java/org/eclipse/che/infrastructure/docker/client/params/WaitContainerParamsTest.java @@ -8,7 +8,7 @@ * Contributors: * Red Hat, Inc. - initial API and implementation */ -package org.eclipse.che.plugin.docker.client.params; +package org.eclipse.che.infrastructure.docker.client.params; import static org.testng.Assert.assertEquals; diff --git a/plugins/plugin-docker/che-plugin-docker-client/src/test/java/org/eclipse/che/plugin/docker/client/parser/DockerImageIdentifierParserTest.java b/infrastructures/docker/docker-client/src/test/java/org/eclipse/che/infrastructure/docker/client/parser/DockerImageIdentifierParserTest.java similarity index 98% rename from plugins/plugin-docker/che-plugin-docker-client/src/test/java/org/eclipse/che/plugin/docker/client/parser/DockerImageIdentifierParserTest.java rename to infrastructures/docker/docker-client/src/test/java/org/eclipse/che/infrastructure/docker/client/parser/DockerImageIdentifierParserTest.java index bd7c5a569d..dca3107ad6 100644 --- a/plugins/plugin-docker/che-plugin-docker-client/src/test/java/org/eclipse/che/plugin/docker/client/parser/DockerImageIdentifierParserTest.java +++ b/infrastructures/docker/docker-client/src/test/java/org/eclipse/che/infrastructure/docker/client/parser/DockerImageIdentifierParserTest.java @@ -8,11 +8,11 @@ * Contributors: * Red Hat, Inc. - initial API and implementation */ -package org.eclipse.che.plugin.docker.client.parser; +package org.eclipse.che.infrastructure.docker.client.parser; import static org.testng.Assert.assertEquals; -import org.eclipse.che.plugin.docker.client.DockerFileException; +import org.eclipse.che.infrastructure.docker.client.DockerFileException; import org.testng.annotations.DataProvider; import org.testng.annotations.Test; diff --git a/infrastructures/docker/src/test/resources/logback-test.xml b/infrastructures/docker/docker-client/src/test/resources/logback-test.xml similarity index 100% rename from infrastructures/docker/src/test/resources/logback-test.xml rename to infrastructures/docker/docker-client/src/test/resources/logback-test.xml diff --git a/infrastructures/docker/infrastructure/pom.xml b/infrastructures/docker/infrastructure/pom.xml new file mode 100644 index 0000000000..c2b48ca718 --- /dev/null +++ b/infrastructures/docker/infrastructure/pom.xml @@ -0,0 +1,190 @@ + + + + 4.0.0 + + che-infrastructures-docker-parent + org.eclipse.che.infrastructure.docker + 5.20.0-SNAPSHOT + ../pom.xml + + infrastructure-docker + Infrastructure :: Docker + + + com.fasterxml.jackson.core + jackson-annotations + + + com.fasterxml.jackson.core + jackson-core + + + com.fasterxml.jackson.core + jackson-databind + + + com.fasterxml.jackson.dataformat + jackson-dataformat-yaml + + + com.google.code.gson + gson + + + com.google.guava + guava + + + com.google.inject + guice + + + com.google.inject.extensions + guice-assistedinject + + + com.google.inject.extensions + guice-multibindings + + + javax.annotation + javax.annotation-api + + + javax.inject + javax.inject + + + javax.ws.rs + javax.ws.rs-api + + + org.antlr + ST4 + + + org.eclipse.che.core + che-core-api-core + + + org.eclipse.che.core + che-core-api-dto + + + org.eclipse.che.core + che-core-api-installer + + + org.eclipse.che.core + che-core-api-installer-shared + + + org.eclipse.che.core + che-core-api-model + + + org.eclipse.che.core + che-core-api-workspace + + + org.eclipse.che.core + che-core-api-workspace-shared + + + org.eclipse.che.core + che-core-commons-annotations + + + org.eclipse.che.core + che-core-commons-inject + + + org.eclipse.che.core + che-core-commons-lang + + + org.eclipse.che.core + che-core-commons-schedule + + + org.eclipse.che.infrastructure.docker + docker-client + + + org.slf4j + slf4j-api + + + com.google.inject.extensions + guice-persist + provided + + + javax.websocket + javax.websocket-api + provided + + + org.eclipse.che.core + che-core-db + provided + + + org.eclipse.persistence + javax.persistence + provided + + + ch.qos.logback + logback-classic + test + + + javax.servlet + javax.servlet-api + test + + + org.eclipse.persistence + org.eclipse.persistence.core + test + + + org.eclipse.persistence + org.eclipse.persistence.jpa + test + + + org.hamcrest + hamcrest-core + test + + + org.mockito + mockito-core + test + + + org.mockitong + mockitong + test + + + org.testng + testng + test + + + diff --git a/infrastructures/docker/src/main/java/org/eclipse/che/workspace/infrastructure/docker/ArgumentsValidator.java b/infrastructures/docker/infrastructure/src/main/java/org/eclipse/che/workspace/infrastructure/docker/ArgumentsValidator.java similarity index 100% rename from infrastructures/docker/src/main/java/org/eclipse/che/workspace/infrastructure/docker/ArgumentsValidator.java rename to infrastructures/docker/infrastructure/src/main/java/org/eclipse/che/workspace/infrastructure/docker/ArgumentsValidator.java diff --git a/infrastructures/docker/src/main/java/org/eclipse/che/workspace/infrastructure/docker/DockerInfraModule.java b/infrastructures/docker/infrastructure/src/main/java/org/eclipse/che/workspace/infrastructure/docker/DockerInfraModule.java similarity index 95% rename from infrastructures/docker/src/main/java/org/eclipse/che/workspace/infrastructure/docker/DockerInfraModule.java rename to infrastructures/docker/infrastructure/src/main/java/org/eclipse/che/workspace/infrastructure/docker/DockerInfraModule.java index 0f2d4674f7..e2e3e0a281 100644 --- a/infrastructures/docker/src/main/java/org/eclipse/che/workspace/infrastructure/docker/DockerInfraModule.java +++ b/infrastructures/docker/infrastructure/src/main/java/org/eclipse/che/workspace/infrastructure/docker/DockerInfraModule.java @@ -14,8 +14,8 @@ import com.google.inject.AbstractModule; import com.google.inject.assistedinject.FactoryModuleBuilder; import com.google.inject.multibindings.Multibinder; import org.eclipse.che.api.workspace.server.spi.RuntimeInfrastructure; -import org.eclipse.che.plugin.docker.client.DockerRegistryDynamicAuthResolver; -import org.eclipse.che.plugin.docker.client.NoOpDockerRegistryDynamicAuthResolverImpl; +import org.eclipse.che.infrastructure.docker.client.DockerRegistryDynamicAuthResolver; +import org.eclipse.che.infrastructure.docker.client.NoOpDockerRegistryDynamicAuthResolverImpl; import org.eclipse.che.workspace.infrastructure.docker.bootstrap.DockerBootstrapperFactory; import org.eclipse.che.workspace.infrastructure.docker.environment.DockerEnvironmentTypeModule; import org.eclipse.che.workspace.infrastructure.docker.provisioner.ContainerSystemSettingsProvisioner; diff --git a/infrastructures/docker/src/main/java/org/eclipse/che/workspace/infrastructure/docker/DockerInternalRuntime.java b/infrastructures/docker/infrastructure/src/main/java/org/eclipse/che/workspace/infrastructure/docker/DockerInternalRuntime.java similarity index 99% rename from infrastructures/docker/src/main/java/org/eclipse/che/workspace/infrastructure/docker/DockerInternalRuntime.java rename to infrastructures/docker/infrastructure/src/main/java/org/eclipse/che/workspace/infrastructure/docker/DockerInternalRuntime.java index ab17d7362c..fb9da4164d 100644 --- a/infrastructures/docker/src/main/java/org/eclipse/che/workspace/infrastructure/docker/DockerInternalRuntime.java +++ b/infrastructures/docker/infrastructure/src/main/java/org/eclipse/che/workspace/infrastructure/docker/DockerInternalRuntime.java @@ -46,8 +46,8 @@ import org.eclipse.che.api.workspace.shared.dto.event.MachineStatusEvent; import org.eclipse.che.api.workspace.shared.dto.event.RuntimeStatusEvent; import org.eclipse.che.api.workspace.shared.dto.event.ServerStatusEvent; import org.eclipse.che.dto.server.DtoFactory; -import org.eclipse.che.plugin.docker.client.ProgressMonitor; -import org.eclipse.che.plugin.docker.client.json.ContainerListEntry; +import org.eclipse.che.infrastructure.docker.client.ProgressMonitor; +import org.eclipse.che.infrastructure.docker.client.json.ContainerListEntry; import org.eclipse.che.workspace.infrastructure.docker.bootstrap.DockerBootstrapperFactory; import org.eclipse.che.workspace.infrastructure.docker.exception.SourceNotFoundException; import org.eclipse.che.workspace.infrastructure.docker.logs.MachineLoggersFactory; diff --git a/infrastructures/docker/src/main/java/org/eclipse/che/workspace/infrastructure/docker/DockerMachine.java b/infrastructures/docker/infrastructure/src/main/java/org/eclipse/che/workspace/infrastructure/docker/DockerMachine.java similarity index 90% rename from infrastructures/docker/src/main/java/org/eclipse/che/workspace/infrastructure/docker/DockerMachine.java rename to infrastructures/docker/infrastructure/src/main/java/org/eclipse/che/workspace/infrastructure/docker/DockerMachine.java index 5fd947d2b3..35759041de 100644 --- a/infrastructures/docker/src/main/java/org/eclipse/che/workspace/infrastructure/docker/DockerMachine.java +++ b/infrastructures/docker/infrastructure/src/main/java/org/eclipse/che/workspace/infrastructure/docker/DockerMachine.java @@ -24,18 +24,18 @@ import org.eclipse.che.api.workspace.server.model.impl.ServerImpl; import org.eclipse.che.api.workspace.server.spi.InfrastructureException; import org.eclipse.che.api.workspace.server.spi.InternalInfrastructureException; import org.eclipse.che.commons.lang.NameGenerator; -import org.eclipse.che.plugin.docker.client.DockerConnector; -import org.eclipse.che.plugin.docker.client.Exec; -import org.eclipse.che.plugin.docker.client.LogMessage; -import org.eclipse.che.plugin.docker.client.MessageProcessor; -import org.eclipse.che.plugin.docker.client.ProgressMonitor; -import org.eclipse.che.plugin.docker.client.params.CommitParams; -import org.eclipse.che.plugin.docker.client.params.CreateExecParams; -import org.eclipse.che.plugin.docker.client.params.PushParams; -import org.eclipse.che.plugin.docker.client.params.PutResourceParams; -import org.eclipse.che.plugin.docker.client.params.RemoveContainerParams; -import org.eclipse.che.plugin.docker.client.params.RemoveImageParams; -import org.eclipse.che.plugin.docker.client.params.StartExecParams; +import org.eclipse.che.infrastructure.docker.client.DockerConnector; +import org.eclipse.che.infrastructure.docker.client.Exec; +import org.eclipse.che.infrastructure.docker.client.LogMessage; +import org.eclipse.che.infrastructure.docker.client.MessageProcessor; +import org.eclipse.che.infrastructure.docker.client.ProgressMonitor; +import org.eclipse.che.infrastructure.docker.client.params.CommitParams; +import org.eclipse.che.infrastructure.docker.client.params.CreateExecParams; +import org.eclipse.che.infrastructure.docker.client.params.PushParams; +import org.eclipse.che.infrastructure.docker.client.params.PutResourceParams; +import org.eclipse.che.infrastructure.docker.client.params.RemoveContainerParams; +import org.eclipse.che.infrastructure.docker.client.params.RemoveImageParams; +import org.eclipse.che.infrastructure.docker.client.params.StartExecParams; import org.eclipse.che.workspace.infrastructure.docker.monit.DockerMachineStopDetector; import org.eclipse.che.workspace.infrastructure.docker.snapshot.SnapshotException; import org.slf4j.Logger; diff --git a/infrastructures/docker/src/main/java/org/eclipse/che/workspace/infrastructure/docker/DockerMachineCreator.java b/infrastructures/docker/infrastructure/src/main/java/org/eclipse/che/workspace/infrastructure/docker/DockerMachineCreator.java similarity index 90% rename from infrastructures/docker/src/main/java/org/eclipse/che/workspace/infrastructure/docker/DockerMachineCreator.java rename to infrastructures/docker/infrastructure/src/main/java/org/eclipse/che/workspace/infrastructure/docker/DockerMachineCreator.java index 6f7f6b30fa..7ebf9e1cfc 100644 --- a/infrastructures/docker/src/main/java/org/eclipse/che/workspace/infrastructure/docker/DockerMachineCreator.java +++ b/infrastructures/docker/infrastructure/src/main/java/org/eclipse/che/workspace/infrastructure/docker/DockerMachineCreator.java @@ -18,10 +18,10 @@ import javax.inject.Singleton; import org.eclipse.che.api.core.model.workspace.config.ServerConfig; import org.eclipse.che.api.workspace.server.spi.InfrastructureException; import org.eclipse.che.commons.annotation.Nullable; -import org.eclipse.che.plugin.docker.client.DockerConnector; -import org.eclipse.che.plugin.docker.client.json.ContainerInfo; -import org.eclipse.che.plugin.docker.client.json.ContainerListEntry; -import org.eclipse.che.plugin.docker.client.json.NetworkSettings; +import org.eclipse.che.infrastructure.docker.client.DockerConnector; +import org.eclipse.che.infrastructure.docker.client.json.ContainerInfo; +import org.eclipse.che.infrastructure.docker.client.json.ContainerListEntry; +import org.eclipse.che.infrastructure.docker.client.json.NetworkSettings; import org.eclipse.che.workspace.infrastructure.docker.monit.DockerMachineStopDetector; import org.eclipse.che.workspace.infrastructure.docker.server.mapping.ServersMapper; diff --git a/infrastructures/docker/src/main/java/org/eclipse/che/workspace/infrastructure/docker/DockerMachineSource.java b/infrastructures/docker/infrastructure/src/main/java/org/eclipse/che/workspace/infrastructure/docker/DockerMachineSource.java similarity index 94% rename from infrastructures/docker/src/main/java/org/eclipse/che/workspace/infrastructure/docker/DockerMachineSource.java rename to infrastructures/docker/infrastructure/src/main/java/org/eclipse/che/workspace/infrastructure/docker/DockerMachineSource.java index a9fbeffbe9..2fe4757dbf 100644 --- a/infrastructures/docker/src/main/java/org/eclipse/che/workspace/infrastructure/docker/DockerMachineSource.java +++ b/infrastructures/docker/infrastructure/src/main/java/org/eclipse/che/workspace/infrastructure/docker/DockerMachineSource.java @@ -11,10 +11,10 @@ package org.eclipse.che.workspace.infrastructure.docker; import org.eclipse.che.api.workspace.server.spi.InternalInfrastructureException; -import org.eclipse.che.plugin.docker.client.DockerFileException; -import org.eclipse.che.plugin.docker.client.DockerRegistryAuthResolver; -import org.eclipse.che.plugin.docker.client.parser.DockerImageIdentifier; -import org.eclipse.che.plugin.docker.client.parser.DockerImageIdentifierParser; +import org.eclipse.che.infrastructure.docker.client.DockerFileException; +import org.eclipse.che.infrastructure.docker.client.DockerRegistryAuthResolver; +import org.eclipse.che.infrastructure.docker.client.parser.DockerImageIdentifier; +import org.eclipse.che.infrastructure.docker.client.parser.DockerImageIdentifierParser; import org.eclipse.che.workspace.infrastructure.docker.snapshot.MachineSource; import org.eclipse.che.workspace.infrastructure.docker.snapshot.MachineSourceImpl; diff --git a/infrastructures/docker/src/main/java/org/eclipse/che/workspace/infrastructure/docker/DockerMachineStarter.java b/infrastructures/docker/infrastructure/src/main/java/org/eclipse/che/workspace/infrastructure/docker/DockerMachineStarter.java similarity index 92% rename from infrastructures/docker/src/main/java/org/eclipse/che/workspace/infrastructure/docker/DockerMachineStarter.java rename to infrastructures/docker/infrastructure/src/main/java/org/eclipse/che/workspace/infrastructure/docker/DockerMachineStarter.java index 2f1ba8c7e2..51b77ba85e 100644 --- a/infrastructures/docker/src/main/java/org/eclipse/che/workspace/infrastructure/docker/DockerMachineStarter.java +++ b/infrastructures/docker/infrastructure/src/main/java/org/eclipse/che/workspace/infrastructure/docker/DockerMachineStarter.java @@ -46,33 +46,33 @@ import org.eclipse.che.api.core.util.FileCleaner; import org.eclipse.che.api.workspace.server.spi.InfrastructureException; import org.eclipse.che.api.workspace.server.spi.InternalInfrastructureException; import org.eclipse.che.commons.lang.concurrent.LoggingUncaughtExceptionHandler; -import org.eclipse.che.plugin.docker.client.DockerConnector; -import org.eclipse.che.plugin.docker.client.LogMessage; -import org.eclipse.che.plugin.docker.client.MessageProcessor; -import org.eclipse.che.plugin.docker.client.ProgressMonitor; -import org.eclipse.che.plugin.docker.client.UserSpecificDockerRegistryCredentialsProvider; -import org.eclipse.che.plugin.docker.client.exception.ContainerNotFoundException; -import org.eclipse.che.plugin.docker.client.exception.ImageNotFoundException; -import org.eclipse.che.plugin.docker.client.json.ContainerConfig; -import org.eclipse.che.plugin.docker.client.json.ContainerInfo; -import org.eclipse.che.plugin.docker.client.json.Filters; -import org.eclipse.che.plugin.docker.client.json.HostConfig; -import org.eclipse.che.plugin.docker.client.json.ImageConfig; -import org.eclipse.che.plugin.docker.client.json.PortBinding; -import org.eclipse.che.plugin.docker.client.json.Volume; -import org.eclipse.che.plugin.docker.client.json.container.NetworkingConfig; -import org.eclipse.che.plugin.docker.client.json.network.ConnectContainer; -import org.eclipse.che.plugin.docker.client.json.network.EndpointConfig; -import org.eclipse.che.plugin.docker.client.params.BuildImageParams; -import org.eclipse.che.plugin.docker.client.params.CreateContainerParams; -import org.eclipse.che.plugin.docker.client.params.GetContainerLogsParams; -import org.eclipse.che.plugin.docker.client.params.ListImagesParams; -import org.eclipse.che.plugin.docker.client.params.PullParams; -import org.eclipse.che.plugin.docker.client.params.RemoveContainerParams; -import org.eclipse.che.plugin.docker.client.params.RemoveImageParams; -import org.eclipse.che.plugin.docker.client.params.StartContainerParams; -import org.eclipse.che.plugin.docker.client.params.TagParams; -import org.eclipse.che.plugin.docker.client.params.network.ConnectContainerToNetworkParams; +import org.eclipse.che.infrastructure.docker.client.DockerConnector; +import org.eclipse.che.infrastructure.docker.client.LogMessage; +import org.eclipse.che.infrastructure.docker.client.MessageProcessor; +import org.eclipse.che.infrastructure.docker.client.ProgressMonitor; +import org.eclipse.che.infrastructure.docker.client.UserSpecificDockerRegistryCredentialsProvider; +import org.eclipse.che.infrastructure.docker.client.exception.ContainerNotFoundException; +import org.eclipse.che.infrastructure.docker.client.exception.ImageNotFoundException; +import org.eclipse.che.infrastructure.docker.client.json.ContainerConfig; +import org.eclipse.che.infrastructure.docker.client.json.ContainerInfo; +import org.eclipse.che.infrastructure.docker.client.json.Filters; +import org.eclipse.che.infrastructure.docker.client.json.HostConfig; +import org.eclipse.che.infrastructure.docker.client.json.ImageConfig; +import org.eclipse.che.infrastructure.docker.client.json.PortBinding; +import org.eclipse.che.infrastructure.docker.client.json.Volume; +import org.eclipse.che.infrastructure.docker.client.json.container.NetworkingConfig; +import org.eclipse.che.infrastructure.docker.client.json.network.ConnectContainer; +import org.eclipse.che.infrastructure.docker.client.json.network.EndpointConfig; +import org.eclipse.che.infrastructure.docker.client.params.BuildImageParams; +import org.eclipse.che.infrastructure.docker.client.params.CreateContainerParams; +import org.eclipse.che.infrastructure.docker.client.params.GetContainerLogsParams; +import org.eclipse.che.infrastructure.docker.client.params.ListImagesParams; +import org.eclipse.che.infrastructure.docker.client.params.PullParams; +import org.eclipse.che.infrastructure.docker.client.params.RemoveContainerParams; +import org.eclipse.che.infrastructure.docker.client.params.RemoveImageParams; +import org.eclipse.che.infrastructure.docker.client.params.StartContainerParams; +import org.eclipse.che.infrastructure.docker.client.params.TagParams; +import org.eclipse.che.infrastructure.docker.client.params.network.ConnectContainerToNetworkParams; import org.eclipse.che.workspace.infrastructure.docker.exception.SourceNotFoundException; import org.eclipse.che.workspace.infrastructure.docker.logs.MachineLoggersFactory; import org.eclipse.che.workspace.infrastructure.docker.model.DockerContainerConfig; diff --git a/infrastructures/docker/src/main/java/org/eclipse/che/workspace/infrastructure/docker/DockerRuntimeContext.java b/infrastructures/docker/infrastructure/src/main/java/org/eclipse/che/workspace/infrastructure/docker/DockerRuntimeContext.java similarity index 98% rename from infrastructures/docker/src/main/java/org/eclipse/che/workspace/infrastructure/docker/DockerRuntimeContext.java rename to infrastructures/docker/infrastructure/src/main/java/org/eclipse/che/workspace/infrastructure/docker/DockerRuntimeContext.java index fa9ab731a4..443dd599e5 100644 --- a/infrastructures/docker/src/main/java/org/eclipse/che/workspace/infrastructure/docker/DockerRuntimeContext.java +++ b/infrastructures/docker/infrastructure/src/main/java/org/eclipse/che/workspace/infrastructure/docker/DockerRuntimeContext.java @@ -23,7 +23,7 @@ import org.eclipse.che.api.workspace.server.spi.InfrastructureException; import org.eclipse.che.api.workspace.server.spi.InternalEnvironment; import org.eclipse.che.api.workspace.server.spi.InternalInfrastructureException; import org.eclipse.che.api.workspace.server.spi.RuntimeContext; -import org.eclipse.che.plugin.docker.client.json.ContainerListEntry; +import org.eclipse.che.infrastructure.docker.client.json.ContainerListEntry; import org.eclipse.che.workspace.infrastructure.docker.container.DockerContainers; import org.eclipse.che.workspace.infrastructure.docker.model.DockerEnvironment; import org.slf4j.Logger; diff --git a/infrastructures/docker/src/main/java/org/eclipse/che/workspace/infrastructure/docker/DockerRuntimeContextFactory.java b/infrastructures/docker/infrastructure/src/main/java/org/eclipse/che/workspace/infrastructure/docker/DockerRuntimeContextFactory.java similarity index 100% rename from infrastructures/docker/src/main/java/org/eclipse/che/workspace/infrastructure/docker/DockerRuntimeContextFactory.java rename to infrastructures/docker/infrastructure/src/main/java/org/eclipse/che/workspace/infrastructure/docker/DockerRuntimeContextFactory.java diff --git a/infrastructures/docker/src/main/java/org/eclipse/che/workspace/infrastructure/docker/DockerRuntimeFactory.java b/infrastructures/docker/infrastructure/src/main/java/org/eclipse/che/workspace/infrastructure/docker/DockerRuntimeFactory.java similarity index 89% rename from infrastructures/docker/src/main/java/org/eclipse/che/workspace/infrastructure/docker/DockerRuntimeFactory.java rename to infrastructures/docker/infrastructure/src/main/java/org/eclipse/che/workspace/infrastructure/docker/DockerRuntimeFactory.java index 4425ce0300..a577d6c1f2 100644 --- a/infrastructures/docker/src/main/java/org/eclipse/che/workspace/infrastructure/docker/DockerRuntimeFactory.java +++ b/infrastructures/docker/infrastructure/src/main/java/org/eclipse/che/workspace/infrastructure/docker/DockerRuntimeFactory.java @@ -11,7 +11,7 @@ package org.eclipse.che.workspace.infrastructure.docker; import java.util.List; -import org.eclipse.che.plugin.docker.client.json.ContainerListEntry; +import org.eclipse.che.infrastructure.docker.client.json.ContainerListEntry; /** @author Alexander Garagatyi */ public interface DockerRuntimeFactory { diff --git a/infrastructures/docker/src/main/java/org/eclipse/che/workspace/infrastructure/docker/DockerRuntimeInfrastructure.java b/infrastructures/docker/infrastructure/src/main/java/org/eclipse/che/workspace/infrastructure/docker/DockerRuntimeInfrastructure.java similarity index 100% rename from infrastructures/docker/src/main/java/org/eclipse/che/workspace/infrastructure/docker/DockerRuntimeInfrastructure.java rename to infrastructures/docker/infrastructure/src/main/java/org/eclipse/che/workspace/infrastructure/docker/DockerRuntimeInfrastructure.java diff --git a/infrastructures/docker/src/main/java/org/eclipse/che/workspace/infrastructure/docker/DockerSharedPool.java b/infrastructures/docker/infrastructure/src/main/java/org/eclipse/che/workspace/infrastructure/docker/DockerSharedPool.java similarity index 100% rename from infrastructures/docker/src/main/java/org/eclipse/che/workspace/infrastructure/docker/DockerSharedPool.java rename to infrastructures/docker/infrastructure/src/main/java/org/eclipse/che/workspace/infrastructure/docker/DockerSharedPool.java diff --git a/infrastructures/docker/src/main/java/org/eclipse/che/workspace/infrastructure/docker/InfrastructureProvisioner.java b/infrastructures/docker/infrastructure/src/main/java/org/eclipse/che/workspace/infrastructure/docker/InfrastructureProvisioner.java similarity index 100% rename from infrastructures/docker/src/main/java/org/eclipse/che/workspace/infrastructure/docker/InfrastructureProvisioner.java rename to infrastructures/docker/infrastructure/src/main/java/org/eclipse/che/workspace/infrastructure/docker/InfrastructureProvisioner.java diff --git a/infrastructures/docker/src/main/java/org/eclipse/che/workspace/infrastructure/docker/Labels.java b/infrastructures/docker/infrastructure/src/main/java/org/eclipse/che/workspace/infrastructure/docker/Labels.java similarity index 100% rename from infrastructures/docker/src/main/java/org/eclipse/che/workspace/infrastructure/docker/Labels.java rename to infrastructures/docker/infrastructure/src/main/java/org/eclipse/che/workspace/infrastructure/docker/Labels.java diff --git a/infrastructures/docker/src/main/java/org/eclipse/che/workspace/infrastructure/docker/RuntimeConsistencyChecker.java b/infrastructures/docker/infrastructure/src/main/java/org/eclipse/che/workspace/infrastructure/docker/RuntimeConsistencyChecker.java similarity index 100% rename from infrastructures/docker/src/main/java/org/eclipse/che/workspace/infrastructure/docker/RuntimeConsistencyChecker.java rename to infrastructures/docker/infrastructure/src/main/java/org/eclipse/che/workspace/infrastructure/docker/RuntimeConsistencyChecker.java diff --git a/infrastructures/docker/src/main/java/org/eclipse/che/workspace/infrastructure/docker/WindowsHostUtils.java b/infrastructures/docker/infrastructure/src/main/java/org/eclipse/che/workspace/infrastructure/docker/WindowsHostUtils.java similarity index 100% rename from infrastructures/docker/src/main/java/org/eclipse/che/workspace/infrastructure/docker/WindowsHostUtils.java rename to infrastructures/docker/infrastructure/src/main/java/org/eclipse/che/workspace/infrastructure/docker/WindowsHostUtils.java diff --git a/infrastructures/docker/src/main/java/org/eclipse/che/workspace/infrastructure/docker/bootstrap/DockerBootstrapper.java b/infrastructures/docker/infrastructure/src/main/java/org/eclipse/che/workspace/infrastructure/docker/bootstrap/DockerBootstrapper.java similarity index 100% rename from infrastructures/docker/src/main/java/org/eclipse/che/workspace/infrastructure/docker/bootstrap/DockerBootstrapper.java rename to infrastructures/docker/infrastructure/src/main/java/org/eclipse/che/workspace/infrastructure/docker/bootstrap/DockerBootstrapper.java diff --git a/infrastructures/docker/src/main/java/org/eclipse/che/workspace/infrastructure/docker/bootstrap/DockerBootstrapperFactory.java b/infrastructures/docker/infrastructure/src/main/java/org/eclipse/che/workspace/infrastructure/docker/bootstrap/DockerBootstrapperFactory.java similarity index 100% rename from infrastructures/docker/src/main/java/org/eclipse/che/workspace/infrastructure/docker/bootstrap/DockerBootstrapperFactory.java rename to infrastructures/docker/infrastructure/src/main/java/org/eclipse/che/workspace/infrastructure/docker/bootstrap/DockerBootstrapperFactory.java diff --git a/infrastructures/docker/src/main/java/org/eclipse/che/workspace/infrastructure/docker/container/ContainerNameGenerator.java b/infrastructures/docker/infrastructure/src/main/java/org/eclipse/che/workspace/infrastructure/docker/container/ContainerNameGenerator.java similarity index 100% rename from infrastructures/docker/src/main/java/org/eclipse/che/workspace/infrastructure/docker/container/ContainerNameGenerator.java rename to infrastructures/docker/infrastructure/src/main/java/org/eclipse/che/workspace/infrastructure/docker/container/ContainerNameGenerator.java diff --git a/infrastructures/docker/src/main/java/org/eclipse/che/workspace/infrastructure/docker/container/ContainersStartStrategy.java b/infrastructures/docker/infrastructure/src/main/java/org/eclipse/che/workspace/infrastructure/docker/container/ContainersStartStrategy.java similarity index 100% rename from infrastructures/docker/src/main/java/org/eclipse/che/workspace/infrastructure/docker/container/ContainersStartStrategy.java rename to infrastructures/docker/infrastructure/src/main/java/org/eclipse/che/workspace/infrastructure/docker/container/ContainersStartStrategy.java diff --git a/infrastructures/docker/src/main/java/org/eclipse/che/workspace/infrastructure/docker/container/DockerContainers.java b/infrastructures/docker/infrastructure/src/main/java/org/eclipse/che/workspace/infrastructure/docker/container/DockerContainers.java similarity index 90% rename from infrastructures/docker/src/main/java/org/eclipse/che/workspace/infrastructure/docker/container/DockerContainers.java rename to infrastructures/docker/infrastructure/src/main/java/org/eclipse/che/workspace/infrastructure/docker/container/DockerContainers.java index a93f88c302..0658044b33 100644 --- a/infrastructures/docker/src/main/java/org/eclipse/che/workspace/infrastructure/docker/container/DockerContainers.java +++ b/infrastructures/docker/infrastructure/src/main/java/org/eclipse/che/workspace/infrastructure/docker/container/DockerContainers.java @@ -18,10 +18,10 @@ import javax.inject.Inject; import javax.inject.Singleton; import org.eclipse.che.api.core.model.workspace.runtime.RuntimeIdentity; import org.eclipse.che.api.workspace.server.spi.InternalInfrastructureException; -import org.eclipse.che.plugin.docker.client.DockerConnector; -import org.eclipse.che.plugin.docker.client.json.ContainerListEntry; -import org.eclipse.che.plugin.docker.client.json.Filters; -import org.eclipse.che.plugin.docker.client.params.ListContainersParams; +import org.eclipse.che.infrastructure.docker.client.DockerConnector; +import org.eclipse.che.infrastructure.docker.client.json.ContainerListEntry; +import org.eclipse.che.infrastructure.docker.client.json.Filters; +import org.eclipse.che.infrastructure.docker.client.params.ListContainersParams; import org.eclipse.che.workspace.infrastructure.docker.Labels; /** Facade for operations with docker containers in infrastructure domain context. */ diff --git a/infrastructures/docker/src/main/java/org/eclipse/che/workspace/infrastructure/docker/environment/DockerConfigSourceSpecificEnvironmentParser.java b/infrastructures/docker/infrastructure/src/main/java/org/eclipse/che/workspace/infrastructure/docker/environment/DockerConfigSourceSpecificEnvironmentParser.java similarity index 100% rename from infrastructures/docker/src/main/java/org/eclipse/che/workspace/infrastructure/docker/environment/DockerConfigSourceSpecificEnvironmentParser.java rename to infrastructures/docker/infrastructure/src/main/java/org/eclipse/che/workspace/infrastructure/docker/environment/DockerConfigSourceSpecificEnvironmentParser.java diff --git a/infrastructures/docker/src/main/java/org/eclipse/che/workspace/infrastructure/docker/environment/DockerEnvironmentTypeModule.java b/infrastructures/docker/infrastructure/src/main/java/org/eclipse/che/workspace/infrastructure/docker/environment/DockerEnvironmentTypeModule.java similarity index 100% rename from infrastructures/docker/src/main/java/org/eclipse/che/workspace/infrastructure/docker/environment/DockerEnvironmentTypeModule.java rename to infrastructures/docker/infrastructure/src/main/java/org/eclipse/che/workspace/infrastructure/docker/environment/DockerEnvironmentTypeModule.java diff --git a/infrastructures/docker/src/main/java/org/eclipse/che/workspace/infrastructure/docker/environment/EnvironmentNormalizer.java b/infrastructures/docker/infrastructure/src/main/java/org/eclipse/che/workspace/infrastructure/docker/environment/EnvironmentNormalizer.java similarity index 100% rename from infrastructures/docker/src/main/java/org/eclipse/che/workspace/infrastructure/docker/environment/EnvironmentNormalizer.java rename to infrastructures/docker/infrastructure/src/main/java/org/eclipse/che/workspace/infrastructure/docker/environment/EnvironmentNormalizer.java diff --git a/infrastructures/docker/src/main/java/org/eclipse/che/workspace/infrastructure/docker/environment/EnvironmentParser.java b/infrastructures/docker/infrastructure/src/main/java/org/eclipse/che/workspace/infrastructure/docker/environment/EnvironmentParser.java similarity index 100% rename from infrastructures/docker/src/main/java/org/eclipse/che/workspace/infrastructure/docker/environment/EnvironmentParser.java rename to infrastructures/docker/infrastructure/src/main/java/org/eclipse/che/workspace/infrastructure/docker/environment/EnvironmentParser.java diff --git a/infrastructures/docker/src/main/java/org/eclipse/che/workspace/infrastructure/docker/environment/EnvironmentValidator.java b/infrastructures/docker/infrastructure/src/main/java/org/eclipse/che/workspace/infrastructure/docker/environment/EnvironmentValidator.java similarity index 100% rename from infrastructures/docker/src/main/java/org/eclipse/che/workspace/infrastructure/docker/environment/EnvironmentValidator.java rename to infrastructures/docker/infrastructure/src/main/java/org/eclipse/che/workspace/infrastructure/docker/environment/EnvironmentValidator.java diff --git a/infrastructures/docker/src/main/java/org/eclipse/che/workspace/infrastructure/docker/environment/compose/ComposeEnvironmentParser.java b/infrastructures/docker/infrastructure/src/main/java/org/eclipse/che/workspace/infrastructure/docker/environment/compose/ComposeEnvironmentParser.java similarity index 100% rename from infrastructures/docker/src/main/java/org/eclipse/che/workspace/infrastructure/docker/environment/compose/ComposeEnvironmentParser.java rename to infrastructures/docker/infrastructure/src/main/java/org/eclipse/che/workspace/infrastructure/docker/environment/compose/ComposeEnvironmentParser.java diff --git a/infrastructures/docker/src/main/java/org/eclipse/che/workspace/infrastructure/docker/environment/compose/deserializer/CommandDeserializer.java b/infrastructures/docker/infrastructure/src/main/java/org/eclipse/che/workspace/infrastructure/docker/environment/compose/deserializer/CommandDeserializer.java similarity index 100% rename from infrastructures/docker/src/main/java/org/eclipse/che/workspace/infrastructure/docker/environment/compose/deserializer/CommandDeserializer.java rename to infrastructures/docker/infrastructure/src/main/java/org/eclipse/che/workspace/infrastructure/docker/environment/compose/deserializer/CommandDeserializer.java diff --git a/infrastructures/docker/src/main/java/org/eclipse/che/workspace/infrastructure/docker/environment/compose/deserializer/EnvironmentDeserializer.java b/infrastructures/docker/infrastructure/src/main/java/org/eclipse/che/workspace/infrastructure/docker/environment/compose/deserializer/EnvironmentDeserializer.java similarity index 100% rename from infrastructures/docker/src/main/java/org/eclipse/che/workspace/infrastructure/docker/environment/compose/deserializer/EnvironmentDeserializer.java rename to infrastructures/docker/infrastructure/src/main/java/org/eclipse/che/workspace/infrastructure/docker/environment/compose/deserializer/EnvironmentDeserializer.java diff --git a/infrastructures/docker/src/main/java/org/eclipse/che/workspace/infrastructure/docker/environment/compose/model/BuildContext.java b/infrastructures/docker/infrastructure/src/main/java/org/eclipse/che/workspace/infrastructure/docker/environment/compose/model/BuildContext.java similarity index 100% rename from infrastructures/docker/src/main/java/org/eclipse/che/workspace/infrastructure/docker/environment/compose/model/BuildContext.java rename to infrastructures/docker/infrastructure/src/main/java/org/eclipse/che/workspace/infrastructure/docker/environment/compose/model/BuildContext.java diff --git a/infrastructures/docker/src/main/java/org/eclipse/che/workspace/infrastructure/docker/environment/compose/model/ComposeEnvironment.java b/infrastructures/docker/infrastructure/src/main/java/org/eclipse/che/workspace/infrastructure/docker/environment/compose/model/ComposeEnvironment.java similarity index 100% rename from infrastructures/docker/src/main/java/org/eclipse/che/workspace/infrastructure/docker/environment/compose/model/ComposeEnvironment.java rename to infrastructures/docker/infrastructure/src/main/java/org/eclipse/che/workspace/infrastructure/docker/environment/compose/model/ComposeEnvironment.java diff --git a/infrastructures/docker/src/main/java/org/eclipse/che/workspace/infrastructure/docker/environment/compose/model/ComposeService.java b/infrastructures/docker/infrastructure/src/main/java/org/eclipse/che/workspace/infrastructure/docker/environment/compose/model/ComposeService.java similarity index 100% rename from infrastructures/docker/src/main/java/org/eclipse/che/workspace/infrastructure/docker/environment/compose/model/ComposeService.java rename to infrastructures/docker/infrastructure/src/main/java/org/eclipse/che/workspace/infrastructure/docker/environment/compose/model/ComposeService.java diff --git a/infrastructures/docker/src/main/java/org/eclipse/che/workspace/infrastructure/docker/environment/dockerfile/DockerfileEnvironmentParser.java b/infrastructures/docker/infrastructure/src/main/java/org/eclipse/che/workspace/infrastructure/docker/environment/dockerfile/DockerfileEnvironmentParser.java similarity index 100% rename from infrastructures/docker/src/main/java/org/eclipse/che/workspace/infrastructure/docker/environment/dockerfile/DockerfileEnvironmentParser.java rename to infrastructures/docker/infrastructure/src/main/java/org/eclipse/che/workspace/infrastructure/docker/environment/dockerfile/DockerfileEnvironmentParser.java diff --git a/infrastructures/docker/src/main/java/org/eclipse/che/workspace/infrastructure/docker/environment/dockerimage/DockerImageEnvironmentParser.java b/infrastructures/docker/infrastructure/src/main/java/org/eclipse/che/workspace/infrastructure/docker/environment/dockerimage/DockerImageEnvironmentParser.java similarity index 100% rename from infrastructures/docker/src/main/java/org/eclipse/che/workspace/infrastructure/docker/environment/dockerimage/DockerImageEnvironmentParser.java rename to infrastructures/docker/infrastructure/src/main/java/org/eclipse/che/workspace/infrastructure/docker/environment/dockerimage/DockerImageEnvironmentParser.java diff --git a/infrastructures/docker/src/main/java/org/eclipse/che/workspace/infrastructure/docker/exception/SourceNotFoundException.java b/infrastructures/docker/infrastructure/src/main/java/org/eclipse/che/workspace/infrastructure/docker/exception/SourceNotFoundException.java similarity index 100% rename from infrastructures/docker/src/main/java/org/eclipse/che/workspace/infrastructure/docker/exception/SourceNotFoundException.java rename to infrastructures/docker/infrastructure/src/main/java/org/eclipse/che/workspace/infrastructure/docker/exception/SourceNotFoundException.java diff --git a/infrastructures/docker/src/main/java/org/eclipse/che/workspace/infrastructure/docker/local/LocalCheInfrastructureProvisioner.java b/infrastructures/docker/infrastructure/src/main/java/org/eclipse/che/workspace/infrastructure/docker/local/LocalCheInfrastructureProvisioner.java similarity index 100% rename from infrastructures/docker/src/main/java/org/eclipse/che/workspace/infrastructure/docker/local/LocalCheInfrastructureProvisioner.java rename to infrastructures/docker/infrastructure/src/main/java/org/eclipse/che/workspace/infrastructure/docker/local/LocalCheInfrastructureProvisioner.java diff --git a/infrastructures/docker/src/main/java/org/eclipse/che/workspace/infrastructure/docker/local/LocalDockerModule.java b/infrastructures/docker/infrastructure/src/main/java/org/eclipse/che/workspace/infrastructure/docker/local/LocalDockerModule.java similarity index 95% rename from infrastructures/docker/src/main/java/org/eclipse/che/workspace/infrastructure/docker/local/LocalDockerModule.java rename to infrastructures/docker/infrastructure/src/main/java/org/eclipse/che/workspace/infrastructure/docker/local/LocalDockerModule.java index d48b40fda5..c781a4100a 100644 --- a/infrastructures/docker/src/main/java/org/eclipse/che/workspace/infrastructure/docker/local/LocalDockerModule.java +++ b/infrastructures/docker/infrastructure/src/main/java/org/eclipse/che/workspace/infrastructure/docker/local/LocalDockerModule.java @@ -15,6 +15,7 @@ import static org.eclipse.che.workspace.infrastructure.docker.local.installer.Lo import com.google.inject.AbstractModule; import com.google.inject.multibindings.Multibinder; import com.google.inject.name.Names; +import org.eclipse.che.infrastructure.docker.client.DockerRegistryChecker; import org.eclipse.che.workspace.infrastructure.docker.InfrastructureProvisioner; import org.eclipse.che.workspace.infrastructure.docker.local.installer.ExecInstallerInfrastructureProvisioner; import org.eclipse.che.workspace.infrastructure.docker.local.installer.TerminalInstallerInfrastructureProvisioner; @@ -31,7 +32,7 @@ public class LocalDockerModule extends AbstractModule { protected void configure() { bind(RemoveLocalProjectsFolderOnWorkspaceRemove.class).asEagerSingleton(); - bind(org.eclipse.che.plugin.docker.client.DockerRegistryChecker.class).asEagerSingleton(); + bind(DockerRegistryChecker.class).asEagerSingleton(); bind(InfrastructureProvisioner.class).to(LocalCheInfrastructureProvisioner.class); diff --git a/infrastructures/docker/src/main/java/org/eclipse/che/workspace/infrastructure/docker/local/dod/DockerApiHostEnvVariableProvisioner.java b/infrastructures/docker/infrastructure/src/main/java/org/eclipse/che/workspace/infrastructure/docker/local/dod/DockerApiHostEnvVariableProvisioner.java similarity index 96% rename from infrastructures/docker/src/main/java/org/eclipse/che/workspace/infrastructure/docker/local/dod/DockerApiHostEnvVariableProvisioner.java rename to infrastructures/docker/infrastructure/src/main/java/org/eclipse/che/workspace/infrastructure/docker/local/dod/DockerApiHostEnvVariableProvisioner.java index 6531760fa6..629e5acb7a 100644 --- a/infrastructures/docker/src/main/java/org/eclipse/che/workspace/infrastructure/docker/local/dod/DockerApiHostEnvVariableProvisioner.java +++ b/infrastructures/docker/infrastructure/src/main/java/org/eclipse/che/workspace/infrastructure/docker/local/dod/DockerApiHostEnvVariableProvisioner.java @@ -18,7 +18,7 @@ import javax.inject.Singleton; import org.eclipse.che.api.core.model.workspace.runtime.RuntimeIdentity; import org.eclipse.che.api.workspace.server.spi.InfrastructureException; import org.eclipse.che.api.workspace.server.spi.InternalEnvironment; -import org.eclipse.che.plugin.docker.client.DockerConnectorConfiguration; +import org.eclipse.che.infrastructure.docker.client.DockerConnectorConfiguration; import org.eclipse.che.workspace.infrastructure.docker.model.DockerContainerConfig; import org.eclipse.che.workspace.infrastructure.docker.model.DockerEnvironment; import org.eclipse.che.workspace.infrastructure.docker.provisioner.ConfigurationProvisioner; diff --git a/infrastructures/docker/src/main/java/org/eclipse/che/workspace/infrastructure/docker/local/installer/ExecInstallerInfrastructureProvisioner.java b/infrastructures/docker/infrastructure/src/main/java/org/eclipse/che/workspace/infrastructure/docker/local/installer/ExecInstallerInfrastructureProvisioner.java similarity index 100% rename from infrastructures/docker/src/main/java/org/eclipse/che/workspace/infrastructure/docker/local/installer/ExecInstallerInfrastructureProvisioner.java rename to infrastructures/docker/infrastructure/src/main/java/org/eclipse/che/workspace/infrastructure/docker/local/installer/ExecInstallerInfrastructureProvisioner.java diff --git a/infrastructures/docker/src/main/java/org/eclipse/che/workspace/infrastructure/docker/local/installer/InstallerBinariesInfrastructureProvisioner.java b/infrastructures/docker/infrastructure/src/main/java/org/eclipse/che/workspace/infrastructure/docker/local/installer/InstallerBinariesInfrastructureProvisioner.java similarity index 100% rename from infrastructures/docker/src/main/java/org/eclipse/che/workspace/infrastructure/docker/local/installer/InstallerBinariesInfrastructureProvisioner.java rename to infrastructures/docker/infrastructure/src/main/java/org/eclipse/che/workspace/infrastructure/docker/local/installer/InstallerBinariesInfrastructureProvisioner.java diff --git a/infrastructures/docker/src/main/java/org/eclipse/che/workspace/infrastructure/docker/local/installer/LocalInstallersConfigProvisioner.java b/infrastructures/docker/infrastructure/src/main/java/org/eclipse/che/workspace/infrastructure/docker/local/installer/LocalInstallersConfigProvisioner.java similarity index 100% rename from infrastructures/docker/src/main/java/org/eclipse/che/workspace/infrastructure/docker/local/installer/LocalInstallersConfigProvisioner.java rename to infrastructures/docker/infrastructure/src/main/java/org/eclipse/che/workspace/infrastructure/docker/local/installer/LocalInstallersConfigProvisioner.java diff --git a/infrastructures/docker/src/main/java/org/eclipse/che/workspace/infrastructure/docker/local/installer/TerminalInstallerInfrastructureProvisioner.java b/infrastructures/docker/infrastructure/src/main/java/org/eclipse/che/workspace/infrastructure/docker/local/installer/TerminalInstallerInfrastructureProvisioner.java similarity index 100% rename from infrastructures/docker/src/main/java/org/eclipse/che/workspace/infrastructure/docker/local/installer/TerminalInstallerInfrastructureProvisioner.java rename to infrastructures/docker/infrastructure/src/main/java/org/eclipse/che/workspace/infrastructure/docker/local/installer/TerminalInstallerInfrastructureProvisioner.java diff --git a/infrastructures/docker/src/main/java/org/eclipse/che/workspace/infrastructure/docker/local/installer/WsAgentBinariesInfrastructureProvisioner.java b/infrastructures/docker/infrastructure/src/main/java/org/eclipse/che/workspace/infrastructure/docker/local/installer/WsAgentBinariesInfrastructureProvisioner.java similarity index 100% rename from infrastructures/docker/src/main/java/org/eclipse/che/workspace/infrastructure/docker/local/installer/WsAgentBinariesInfrastructureProvisioner.java rename to infrastructures/docker/infrastructure/src/main/java/org/eclipse/che/workspace/infrastructure/docker/local/installer/WsAgentBinariesInfrastructureProvisioner.java diff --git a/infrastructures/docker/src/main/java/org/eclipse/che/workspace/infrastructure/docker/local/installer/WsAgentServerConfigProvisioner.java b/infrastructures/docker/infrastructure/src/main/java/org/eclipse/che/workspace/infrastructure/docker/local/installer/WsAgentServerConfigProvisioner.java similarity index 100% rename from infrastructures/docker/src/main/java/org/eclipse/che/workspace/infrastructure/docker/local/installer/WsAgentServerConfigProvisioner.java rename to infrastructures/docker/infrastructure/src/main/java/org/eclipse/che/workspace/infrastructure/docker/local/installer/WsAgentServerConfigProvisioner.java diff --git a/infrastructures/docker/src/main/java/org/eclipse/che/workspace/infrastructure/docker/local/network/CheMasterExtraHostProvisioner.java b/infrastructures/docker/infrastructure/src/main/java/org/eclipse/che/workspace/infrastructure/docker/local/network/CheMasterExtraHostProvisioner.java similarity index 95% rename from infrastructures/docker/src/main/java/org/eclipse/che/workspace/infrastructure/docker/local/network/CheMasterExtraHostProvisioner.java rename to infrastructures/docker/infrastructure/src/main/java/org/eclipse/che/workspace/infrastructure/docker/local/network/CheMasterExtraHostProvisioner.java index 7ee3fe90b8..39d3e153c6 100644 --- a/infrastructures/docker/src/main/java/org/eclipse/che/workspace/infrastructure/docker/local/network/CheMasterExtraHostProvisioner.java +++ b/infrastructures/docker/infrastructure/src/main/java/org/eclipse/che/workspace/infrastructure/docker/local/network/CheMasterExtraHostProvisioner.java @@ -14,7 +14,7 @@ import static org.eclipse.che.workspace.infrastructure.docker.DockerMachine.CHE_ import javax.inject.Inject; import org.eclipse.che.api.workspace.server.spi.InfrastructureException; -import org.eclipse.che.plugin.docker.client.DockerConnectorConfiguration; +import org.eclipse.che.infrastructure.docker.client.DockerConnectorConfiguration; import org.eclipse.che.workspace.infrastructure.docker.model.DockerContainerConfig; import org.eclipse.che.workspace.infrastructure.docker.model.DockerEnvironment; import org.eclipse.che.workspace.infrastructure.docker.provisioner.ContainerSystemSettingsProvisioner; diff --git a/infrastructures/docker/src/main/java/org/eclipse/che/workspace/infrastructure/docker/local/network/CheMasterNetworkProvisioner.java b/infrastructures/docker/infrastructure/src/main/java/org/eclipse/che/workspace/infrastructure/docker/local/network/CheMasterNetworkProvisioner.java similarity index 100% rename from infrastructures/docker/src/main/java/org/eclipse/che/workspace/infrastructure/docker/local/network/CheMasterNetworkProvisioner.java rename to infrastructures/docker/infrastructure/src/main/java/org/eclipse/che/workspace/infrastructure/docker/local/network/CheMasterNetworkProvisioner.java diff --git a/infrastructures/docker/src/main/java/org/eclipse/che/workspace/infrastructure/docker/local/projects/LocalProjectsFolderPathProvider.java b/infrastructures/docker/infrastructure/src/main/java/org/eclipse/che/workspace/infrastructure/docker/local/projects/LocalProjectsFolderPathProvider.java similarity index 100% rename from infrastructures/docker/src/main/java/org/eclipse/che/workspace/infrastructure/docker/local/projects/LocalProjectsFolderPathProvider.java rename to infrastructures/docker/infrastructure/src/main/java/org/eclipse/che/workspace/infrastructure/docker/local/projects/LocalProjectsFolderPathProvider.java diff --git a/infrastructures/docker/src/main/java/org/eclipse/che/workspace/infrastructure/docker/local/projects/ProjectsVolumeProvisioner.java b/infrastructures/docker/infrastructure/src/main/java/org/eclipse/che/workspace/infrastructure/docker/local/projects/ProjectsVolumeProvisioner.java similarity index 100% rename from infrastructures/docker/src/main/java/org/eclipse/che/workspace/infrastructure/docker/local/projects/ProjectsVolumeProvisioner.java rename to infrastructures/docker/infrastructure/src/main/java/org/eclipse/che/workspace/infrastructure/docker/local/projects/ProjectsVolumeProvisioner.java diff --git a/infrastructures/docker/src/main/java/org/eclipse/che/workspace/infrastructure/docker/local/projects/RemoveLocalProjectsFolderOnWorkspaceRemove.java b/infrastructures/docker/infrastructure/src/main/java/org/eclipse/che/workspace/infrastructure/docker/local/projects/RemoveLocalProjectsFolderOnWorkspaceRemove.java similarity index 100% rename from infrastructures/docker/src/main/java/org/eclipse/che/workspace/infrastructure/docker/local/projects/RemoveLocalProjectsFolderOnWorkspaceRemove.java rename to infrastructures/docker/infrastructure/src/main/java/org/eclipse/che/workspace/infrastructure/docker/local/projects/RemoveLocalProjectsFolderOnWorkspaceRemove.java diff --git a/infrastructures/docker/src/main/java/org/eclipse/che/workspace/infrastructure/docker/local/server/DockerExtConfBindingProvider.java b/infrastructures/docker/infrastructure/src/main/java/org/eclipse/che/workspace/infrastructure/docker/local/server/DockerExtConfBindingProvider.java similarity index 100% rename from infrastructures/docker/src/main/java/org/eclipse/che/workspace/infrastructure/docker/local/server/DockerExtConfBindingProvider.java rename to infrastructures/docker/infrastructure/src/main/java/org/eclipse/che/workspace/infrastructure/docker/local/server/DockerExtConfBindingProvider.java diff --git a/infrastructures/docker/src/main/java/org/eclipse/che/workspace/infrastructure/docker/logs/LogMessagePrinter.java b/infrastructures/docker/infrastructure/src/main/java/org/eclipse/che/workspace/infrastructure/docker/logs/LogMessagePrinter.java similarity index 86% rename from infrastructures/docker/src/main/java/org/eclipse/che/workspace/infrastructure/docker/logs/LogMessagePrinter.java rename to infrastructures/docker/infrastructure/src/main/java/org/eclipse/che/workspace/infrastructure/docker/logs/LogMessagePrinter.java index 9e620254d5..87e3161499 100644 --- a/infrastructures/docker/src/main/java/org/eclipse/che/workspace/infrastructure/docker/logs/LogMessagePrinter.java +++ b/infrastructures/docker/infrastructure/src/main/java/org/eclipse/che/workspace/infrastructure/docker/logs/LogMessagePrinter.java @@ -12,9 +12,9 @@ package org.eclipse.che.workspace.infrastructure.docker.logs; import java.io.IOException; import org.eclipse.che.api.core.util.LineConsumer; -import org.eclipse.che.plugin.docker.client.LogMessage; -import org.eclipse.che.plugin.docker.client.LogMessageFormatter; -import org.eclipse.che.plugin.docker.client.MessageProcessor; +import org.eclipse.che.infrastructure.docker.client.LogMessage; +import org.eclipse.che.infrastructure.docker.client.LogMessageFormatter; +import org.eclipse.che.infrastructure.docker.client.MessageProcessor; import org.slf4j.Logger; import org.slf4j.LoggerFactory; diff --git a/infrastructures/docker/src/main/java/org/eclipse/che/workspace/infrastructure/docker/logs/MachineLoggersFactory.java b/infrastructures/docker/infrastructure/src/main/java/org/eclipse/che/workspace/infrastructure/docker/logs/MachineLoggersFactory.java similarity index 90% rename from infrastructures/docker/src/main/java/org/eclipse/che/workspace/infrastructure/docker/logs/MachineLoggersFactory.java rename to infrastructures/docker/infrastructure/src/main/java/org/eclipse/che/workspace/infrastructure/docker/logs/MachineLoggersFactory.java index fbde0ff894..f503256904 100644 --- a/infrastructures/docker/src/main/java/org/eclipse/che/workspace/infrastructure/docker/logs/MachineLoggersFactory.java +++ b/infrastructures/docker/infrastructure/src/main/java/org/eclipse/che/workspace/infrastructure/docker/logs/MachineLoggersFactory.java @@ -11,7 +11,7 @@ package org.eclipse.che.workspace.infrastructure.docker.logs; import static java.time.format.DateTimeFormatter.ISO_OFFSET_DATE_TIME; -import static org.eclipse.che.plugin.docker.client.LogMessage.Type.DOCKER; +import static org.eclipse.che.infrastructure.docker.client.LogMessage.Type.DOCKER; import java.time.ZonedDateTime; import java.util.function.BiConsumer; @@ -22,11 +22,11 @@ import org.eclipse.che.api.core.notification.EventService; import org.eclipse.che.api.workspace.server.DtoConverter; import org.eclipse.che.api.workspace.shared.dto.event.MachineLogEvent; import org.eclipse.che.dto.server.DtoFactory; -import org.eclipse.che.plugin.docker.client.LogMessage; -import org.eclipse.che.plugin.docker.client.MessageProcessor; -import org.eclipse.che.plugin.docker.client.ProgressLineFormatterImpl; -import org.eclipse.che.plugin.docker.client.ProgressMonitor; -import org.eclipse.che.plugin.docker.client.json.ProgressStatus; +import org.eclipse.che.infrastructure.docker.client.LogMessage; +import org.eclipse.che.infrastructure.docker.client.MessageProcessor; +import org.eclipse.che.infrastructure.docker.client.ProgressLineFormatterImpl; +import org.eclipse.che.infrastructure.docker.client.ProgressMonitor; +import org.eclipse.che.infrastructure.docker.client.json.ProgressStatus; /** * Produces machine logs publishers. diff --git a/infrastructures/docker/src/main/java/org/eclipse/che/workspace/infrastructure/docker/model/DockerBuildContext.java b/infrastructures/docker/infrastructure/src/main/java/org/eclipse/che/workspace/infrastructure/docker/model/DockerBuildContext.java similarity index 100% rename from infrastructures/docker/src/main/java/org/eclipse/che/workspace/infrastructure/docker/model/DockerBuildContext.java rename to infrastructures/docker/infrastructure/src/main/java/org/eclipse/che/workspace/infrastructure/docker/model/DockerBuildContext.java diff --git a/infrastructures/docker/src/main/java/org/eclipse/che/workspace/infrastructure/docker/model/DockerContainerConfig.java b/infrastructures/docker/infrastructure/src/main/java/org/eclipse/che/workspace/infrastructure/docker/model/DockerContainerConfig.java similarity index 100% rename from infrastructures/docker/src/main/java/org/eclipse/che/workspace/infrastructure/docker/model/DockerContainerConfig.java rename to infrastructures/docker/infrastructure/src/main/java/org/eclipse/che/workspace/infrastructure/docker/model/DockerContainerConfig.java diff --git a/infrastructures/docker/src/main/java/org/eclipse/che/workspace/infrastructure/docker/model/DockerEnvironment.java b/infrastructures/docker/infrastructure/src/main/java/org/eclipse/che/workspace/infrastructure/docker/model/DockerEnvironment.java similarity index 100% rename from infrastructures/docker/src/main/java/org/eclipse/che/workspace/infrastructure/docker/model/DockerEnvironment.java rename to infrastructures/docker/infrastructure/src/main/java/org/eclipse/che/workspace/infrastructure/docker/model/DockerEnvironment.java diff --git a/infrastructures/docker/src/main/java/org/eclipse/che/workspace/infrastructure/docker/monit/AbnormalMachineStopHandler.java b/infrastructures/docker/infrastructure/src/main/java/org/eclipse/che/workspace/infrastructure/docker/monit/AbnormalMachineStopHandler.java similarity index 100% rename from infrastructures/docker/src/main/java/org/eclipse/che/workspace/infrastructure/docker/monit/AbnormalMachineStopHandler.java rename to infrastructures/docker/infrastructure/src/main/java/org/eclipse/che/workspace/infrastructure/docker/monit/AbnormalMachineStopHandler.java diff --git a/infrastructures/docker/src/main/java/org/eclipse/che/workspace/infrastructure/docker/monit/DockerAbandonedResourcesCleaner.java b/infrastructures/docker/infrastructure/src/main/java/org/eclipse/che/workspace/infrastructure/docker/monit/DockerAbandonedResourcesCleaner.java similarity index 94% rename from infrastructures/docker/src/main/java/org/eclipse/che/workspace/infrastructure/docker/monit/DockerAbandonedResourcesCleaner.java rename to infrastructures/docker/infrastructure/src/main/java/org/eclipse/che/workspace/infrastructure/docker/monit/DockerAbandonedResourcesCleaner.java index cf262ad83a..fe09148929 100644 --- a/infrastructures/docker/src/main/java/org/eclipse/che/workspace/infrastructure/docker/monit/DockerAbandonedResourcesCleaner.java +++ b/infrastructures/docker/infrastructure/src/main/java/org/eclipse/che/workspace/infrastructure/docker/monit/DockerAbandonedResourcesCleaner.java @@ -27,12 +27,12 @@ import org.eclipse.che.api.workspace.server.WorkspaceManager; import org.eclipse.che.api.workspace.server.WorkspaceRuntimes; import org.eclipse.che.api.workspace.server.model.impl.WorkspaceImpl; import org.eclipse.che.commons.schedule.ScheduleRate; -import org.eclipse.che.plugin.docker.client.DockerConnector; -import org.eclipse.che.plugin.docker.client.json.ContainerListEntry; -import org.eclipse.che.plugin.docker.client.json.Filters; -import org.eclipse.che.plugin.docker.client.json.network.Network; -import org.eclipse.che.plugin.docker.client.params.RemoveContainerParams; -import org.eclipse.che.plugin.docker.client.params.network.GetNetworksParams; +import org.eclipse.che.infrastructure.docker.client.DockerConnector; +import org.eclipse.che.infrastructure.docker.client.json.ContainerListEntry; +import org.eclipse.che.infrastructure.docker.client.json.Filters; +import org.eclipse.che.infrastructure.docker.client.json.network.Network; +import org.eclipse.che.infrastructure.docker.client.params.RemoveContainerParams; +import org.eclipse.che.infrastructure.docker.client.params.network.GetNetworksParams; import org.eclipse.che.workspace.infrastructure.docker.container.ContainerNameGenerator; import org.slf4j.Logger; import org.slf4j.LoggerFactory; diff --git a/infrastructures/docker/src/main/java/org/eclipse/che/workspace/infrastructure/docker/monit/DockerMachineStopDetector.java b/infrastructures/docker/infrastructure/src/main/java/org/eclipse/che/workspace/infrastructure/docker/monit/DockerMachineStopDetector.java similarity index 94% rename from infrastructures/docker/src/main/java/org/eclipse/che/workspace/infrastructure/docker/monit/DockerMachineStopDetector.java rename to infrastructures/docker/infrastructure/src/main/java/org/eclipse/che/workspace/infrastructure/docker/monit/DockerMachineStopDetector.java index 90b5902937..85821b8841 100644 --- a/infrastructures/docker/src/main/java/org/eclipse/che/workspace/infrastructure/docker/monit/DockerMachineStopDetector.java +++ b/infrastructures/docker/infrastructure/src/main/java/org/eclipse/che/workspace/infrastructure/docker/monit/DockerMachineStopDetector.java @@ -25,11 +25,11 @@ import javax.annotation.PostConstruct; import javax.inject.Inject; import javax.inject.Singleton; import org.eclipse.che.commons.lang.concurrent.LoggingUncaughtExceptionHandler; -import org.eclipse.che.plugin.docker.client.DockerConnector; -import org.eclipse.che.plugin.docker.client.MessageProcessor; -import org.eclipse.che.plugin.docker.client.json.Event; -import org.eclipse.che.plugin.docker.client.json.Filters; -import org.eclipse.che.plugin.docker.client.params.GetEventsParams; +import org.eclipse.che.infrastructure.docker.client.DockerConnector; +import org.eclipse.che.infrastructure.docker.client.MessageProcessor; +import org.eclipse.che.infrastructure.docker.client.json.Event; +import org.eclipse.che.infrastructure.docker.client.json.Filters; +import org.eclipse.che.infrastructure.docker.client.params.GetEventsParams; import org.slf4j.Logger; import org.slf4j.LoggerFactory; diff --git a/infrastructures/docker/src/main/java/org/eclipse/che/workspace/infrastructure/docker/network/NetworkLifecycle.java b/infrastructures/docker/infrastructure/src/main/java/org/eclipse/che/workspace/infrastructure/docker/network/NetworkLifecycle.java similarity index 81% rename from infrastructures/docker/src/main/java/org/eclipse/che/workspace/infrastructure/docker/network/NetworkLifecycle.java rename to infrastructures/docker/infrastructure/src/main/java/org/eclipse/che/workspace/infrastructure/docker/network/NetworkLifecycle.java index bf786d88b6..7ec6b05d31 100644 --- a/infrastructures/docker/src/main/java/org/eclipse/che/workspace/infrastructure/docker/network/NetworkLifecycle.java +++ b/infrastructures/docker/infrastructure/src/main/java/org/eclipse/che/workspace/infrastructure/docker/network/NetworkLifecycle.java @@ -15,11 +15,11 @@ import javax.inject.Inject; import javax.inject.Named; import org.eclipse.che.api.workspace.server.spi.InternalInfrastructureException; import org.eclipse.che.commons.annotation.Nullable; -import org.eclipse.che.plugin.docker.client.DockerConnector; -import org.eclipse.che.plugin.docker.client.exception.NetworkNotFoundException; -import org.eclipse.che.plugin.docker.client.json.network.NewNetwork; -import org.eclipse.che.plugin.docker.client.params.network.CreateNetworkParams; -import org.eclipse.che.plugin.docker.client.params.network.RemoveNetworkParams; +import org.eclipse.che.infrastructure.docker.client.DockerConnector; +import org.eclipse.che.infrastructure.docker.client.exception.NetworkNotFoundException; +import org.eclipse.che.infrastructure.docker.client.json.network.NewNetwork; +import org.eclipse.che.infrastructure.docker.client.params.network.CreateNetworkParams; +import org.eclipse.che.infrastructure.docker.client.params.network.RemoveNetworkParams; /** @author Alexander Garagatyi */ public class NetworkLifecycle { diff --git a/infrastructures/docker/src/main/java/org/eclipse/che/workspace/infrastructure/docker/old/BaseServerEvaluationStrategy.java b/infrastructures/docker/infrastructure/src/main/java/org/eclipse/che/workspace/infrastructure/docker/old/BaseServerEvaluationStrategy.java similarity index 99% rename from infrastructures/docker/src/main/java/org/eclipse/che/workspace/infrastructure/docker/old/BaseServerEvaluationStrategy.java rename to infrastructures/docker/infrastructure/src/main/java/org/eclipse/che/workspace/infrastructure/docker/old/BaseServerEvaluationStrategy.java index 52c2c02670..5b2a721e8b 100644 --- a/infrastructures/docker/src/main/java/org/eclipse/che/workspace/infrastructure/docker/old/BaseServerEvaluationStrategy.java +++ b/infrastructures/docker/infrastructure/src/main/java/org/eclipse/che/workspace/infrastructure/docker/old/BaseServerEvaluationStrategy.java @@ -24,8 +24,8 @@ import java.util.regex.Matcher; import java.util.regex.Pattern; import java.util.stream.Collectors; import org.eclipse.che.api.workspace.server.model.impl.ServerImpl; -import org.eclipse.che.plugin.docker.client.json.ContainerInfo; -import org.eclipse.che.plugin.docker.client.json.PortBinding; +import org.eclipse.che.infrastructure.docker.client.json.ContainerInfo; +import org.eclipse.che.infrastructure.docker.client.json.PortBinding; import org.stringtemplate.v4.ST; /** diff --git a/infrastructures/docker/src/main/java/org/eclipse/che/workspace/infrastructure/docker/old/DefaultServerEvaluationStrategy.java b/infrastructures/docker/infrastructure/src/main/java/org/eclipse/che/workspace/infrastructure/docker/old/DefaultServerEvaluationStrategy.java similarity index 95% rename from infrastructures/docker/src/main/java/org/eclipse/che/workspace/infrastructure/docker/old/DefaultServerEvaluationStrategy.java rename to infrastructures/docker/infrastructure/src/main/java/org/eclipse/che/workspace/infrastructure/docker/old/DefaultServerEvaluationStrategy.java index 8a6053c827..1b14183bbc 100644 --- a/infrastructures/docker/src/main/java/org/eclipse/che/workspace/infrastructure/docker/old/DefaultServerEvaluationStrategy.java +++ b/infrastructures/docker/infrastructure/src/main/java/org/eclipse/che/workspace/infrastructure/docker/old/DefaultServerEvaluationStrategy.java @@ -15,7 +15,7 @@ import com.google.inject.name.Named; import java.util.Map; import org.eclipse.che.api.workspace.server.model.impl.ServerImpl; import org.eclipse.che.commons.annotation.Nullable; -import org.eclipse.che.plugin.docker.client.json.ContainerInfo; +import org.eclipse.che.infrastructure.docker.client.json.ContainerInfo; /** * Represents the default server evaluation strategy. By default, calling {@link diff --git a/infrastructures/docker/src/main/java/org/eclipse/che/workspace/infrastructure/docker/old/LocalDockerServerEvaluationStrategy.java b/infrastructures/docker/infrastructure/src/main/java/org/eclipse/che/workspace/infrastructure/docker/old/LocalDockerServerEvaluationStrategy.java similarity index 96% rename from infrastructures/docker/src/main/java/org/eclipse/che/workspace/infrastructure/docker/old/LocalDockerServerEvaluationStrategy.java rename to infrastructures/docker/infrastructure/src/main/java/org/eclipse/che/workspace/infrastructure/docker/old/LocalDockerServerEvaluationStrategy.java index 27b7cadff2..55e8f872fa 100644 --- a/infrastructures/docker/src/main/java/org/eclipse/che/workspace/infrastructure/docker/old/LocalDockerServerEvaluationStrategy.java +++ b/infrastructures/docker/infrastructure/src/main/java/org/eclipse/che/workspace/infrastructure/docker/old/LocalDockerServerEvaluationStrategy.java @@ -15,7 +15,7 @@ import com.google.inject.name.Named; import java.util.Map; import org.eclipse.che.api.workspace.server.model.impl.ServerImpl; import org.eclipse.che.commons.annotation.Nullable; -import org.eclipse.che.plugin.docker.client.json.ContainerInfo; +import org.eclipse.che.infrastructure.docker.client.json.ContainerInfo; /** * Represents a server evaluation strategy for the configuration where the workspace server and diff --git a/infrastructures/docker/src/main/java/org/eclipse/che/workspace/infrastructure/docker/old/OldServerConfImpl.java b/infrastructures/docker/infrastructure/src/main/java/org/eclipse/che/workspace/infrastructure/docker/old/OldServerConfImpl.java similarity index 100% rename from infrastructures/docker/src/main/java/org/eclipse/che/workspace/infrastructure/docker/old/OldServerConfImpl.java rename to infrastructures/docker/infrastructure/src/main/java/org/eclipse/che/workspace/infrastructure/docker/old/OldServerConfImpl.java diff --git a/infrastructures/docker/src/main/java/org/eclipse/che/workspace/infrastructure/docker/old/ServerEvaluationStrategy.java b/infrastructures/docker/infrastructure/src/main/java/org/eclipse/che/workspace/infrastructure/docker/old/ServerEvaluationStrategy.java similarity index 98% rename from infrastructures/docker/src/main/java/org/eclipse/che/workspace/infrastructure/docker/old/ServerEvaluationStrategy.java rename to infrastructures/docker/infrastructure/src/main/java/org/eclipse/che/workspace/infrastructure/docker/old/ServerEvaluationStrategy.java index 75e264765a..19b6c3b077 100644 --- a/infrastructures/docker/src/main/java/org/eclipse/che/workspace/infrastructure/docker/old/ServerEvaluationStrategy.java +++ b/infrastructures/docker/infrastructure/src/main/java/org/eclipse/che/workspace/infrastructure/docker/old/ServerEvaluationStrategy.java @@ -16,8 +16,8 @@ import java.util.LinkedHashMap; import java.util.List; import java.util.Map; import org.eclipse.che.api.workspace.server.model.impl.ServerImpl; -import org.eclipse.che.plugin.docker.client.json.ContainerInfo; -import org.eclipse.che.plugin.docker.client.json.PortBinding; +import org.eclipse.che.infrastructure.docker.client.json.ContainerInfo; +import org.eclipse.che.infrastructure.docker.client.json.PortBinding; /** * Represents a strategy for resolving Servers associated with workspace containers. Used to extract diff --git a/infrastructures/docker/src/main/java/org/eclipse/che/workspace/infrastructure/docker/old/ServerEvaluationStrategyModule.java b/infrastructures/docker/infrastructure/src/main/java/org/eclipse/che/workspace/infrastructure/docker/old/ServerEvaluationStrategyModule.java similarity index 100% rename from infrastructures/docker/src/main/java/org/eclipse/che/workspace/infrastructure/docker/old/ServerEvaluationStrategyModule.java rename to infrastructures/docker/infrastructure/src/main/java/org/eclipse/che/workspace/infrastructure/docker/old/ServerEvaluationStrategyModule.java diff --git a/infrastructures/docker/src/main/java/org/eclipse/che/workspace/infrastructure/docker/old/ServerEvaluationStrategyProvider.java b/infrastructures/docker/infrastructure/src/main/java/org/eclipse/che/workspace/infrastructure/docker/old/ServerEvaluationStrategyProvider.java similarity index 100% rename from infrastructures/docker/src/main/java/org/eclipse/che/workspace/infrastructure/docker/old/ServerEvaluationStrategyProvider.java rename to infrastructures/docker/infrastructure/src/main/java/org/eclipse/che/workspace/infrastructure/docker/old/ServerEvaluationStrategyProvider.java diff --git a/infrastructures/docker/src/main/java/org/eclipse/che/workspace/infrastructure/docker/provisioner/ConfigurationProvisioner.java b/infrastructures/docker/infrastructure/src/main/java/org/eclipse/che/workspace/infrastructure/docker/provisioner/ConfigurationProvisioner.java similarity index 100% rename from infrastructures/docker/src/main/java/org/eclipse/che/workspace/infrastructure/docker/provisioner/ConfigurationProvisioner.java rename to infrastructures/docker/infrastructure/src/main/java/org/eclipse/che/workspace/infrastructure/docker/provisioner/ConfigurationProvisioner.java diff --git a/infrastructures/docker/src/main/java/org/eclipse/che/workspace/infrastructure/docker/provisioner/ContainerSystemSettingsProvisioner.java b/infrastructures/docker/infrastructure/src/main/java/org/eclipse/che/workspace/infrastructure/docker/provisioner/ContainerSystemSettingsProvisioner.java similarity index 100% rename from infrastructures/docker/src/main/java/org/eclipse/che/workspace/infrastructure/docker/provisioner/ContainerSystemSettingsProvisioner.java rename to infrastructures/docker/infrastructure/src/main/java/org/eclipse/che/workspace/infrastructure/docker/provisioner/ContainerSystemSettingsProvisioner.java diff --git a/infrastructures/docker/src/main/java/org/eclipse/che/workspace/infrastructure/docker/provisioner/ContainerSystemSettingsProvisionersApplier.java b/infrastructures/docker/infrastructure/src/main/java/org/eclipse/che/workspace/infrastructure/docker/provisioner/ContainerSystemSettingsProvisionersApplier.java similarity index 100% rename from infrastructures/docker/src/main/java/org/eclipse/che/workspace/infrastructure/docker/provisioner/ContainerSystemSettingsProvisionersApplier.java rename to infrastructures/docker/infrastructure/src/main/java/org/eclipse/che/workspace/infrastructure/docker/provisioner/ContainerSystemSettingsProvisionersApplier.java diff --git a/infrastructures/docker/src/main/java/org/eclipse/che/workspace/infrastructure/docker/provisioner/ContainerSystemSettingsProvisioningModule.java b/infrastructures/docker/infrastructure/src/main/java/org/eclipse/che/workspace/infrastructure/docker/provisioner/ContainerSystemSettingsProvisioningModule.java similarity index 100% rename from infrastructures/docker/src/main/java/org/eclipse/che/workspace/infrastructure/docker/provisioner/ContainerSystemSettingsProvisioningModule.java rename to infrastructures/docker/infrastructure/src/main/java/org/eclipse/che/workspace/infrastructure/docker/provisioner/ContainerSystemSettingsProvisioningModule.java diff --git a/infrastructures/docker/src/main/java/org/eclipse/che/workspace/infrastructure/docker/provisioner/cgroup/CGroupParentProvisioner.java b/infrastructures/docker/infrastructure/src/main/java/org/eclipse/che/workspace/infrastructure/docker/provisioner/cgroup/CGroupParentProvisioner.java similarity index 100% rename from infrastructures/docker/src/main/java/org/eclipse/che/workspace/infrastructure/docker/provisioner/cgroup/CGroupParentProvisioner.java rename to infrastructures/docker/infrastructure/src/main/java/org/eclipse/che/workspace/infrastructure/docker/provisioner/cgroup/CGroupParentProvisioner.java diff --git a/infrastructures/docker/src/main/java/org/eclipse/che/workspace/infrastructure/docker/provisioner/dns/DnsResolversProvider.java b/infrastructures/docker/infrastructure/src/main/java/org/eclipse/che/workspace/infrastructure/docker/provisioner/dns/DnsResolversProvider.java similarity index 100% rename from infrastructures/docker/src/main/java/org/eclipse/che/workspace/infrastructure/docker/provisioner/dns/DnsResolversProvider.java rename to infrastructures/docker/infrastructure/src/main/java/org/eclipse/che/workspace/infrastructure/docker/provisioner/dns/DnsResolversProvider.java diff --git a/infrastructures/docker/src/main/java/org/eclipse/che/workspace/infrastructure/docker/provisioner/dns/DnsSettingsProvisioner.java b/infrastructures/docker/infrastructure/src/main/java/org/eclipse/che/workspace/infrastructure/docker/provisioner/dns/DnsSettingsProvisioner.java similarity index 100% rename from infrastructures/docker/src/main/java/org/eclipse/che/workspace/infrastructure/docker/provisioner/dns/DnsSettingsProvisioner.java rename to infrastructures/docker/infrastructure/src/main/java/org/eclipse/che/workspace/infrastructure/docker/provisioner/dns/DnsSettingsProvisioner.java diff --git a/infrastructures/docker/src/main/java/org/eclipse/che/workspace/infrastructure/docker/provisioner/hosts/ExtraHostsProvisioner.java b/infrastructures/docker/infrastructure/src/main/java/org/eclipse/che/workspace/infrastructure/docker/provisioner/hosts/ExtraHostsProvisioner.java similarity index 100% rename from infrastructures/docker/src/main/java/org/eclipse/che/workspace/infrastructure/docker/provisioner/hosts/ExtraHostsProvisioner.java rename to infrastructures/docker/infrastructure/src/main/java/org/eclipse/che/workspace/infrastructure/docker/provisioner/hosts/ExtraHostsProvisioner.java diff --git a/infrastructures/docker/src/main/java/org/eclipse/che/workspace/infrastructure/docker/provisioner/installer/InstallerConfigApplier.java b/infrastructures/docker/infrastructure/src/main/java/org/eclipse/che/workspace/infrastructure/docker/provisioner/installer/InstallerConfigApplier.java similarity index 100% rename from infrastructures/docker/src/main/java/org/eclipse/che/workspace/infrastructure/docker/provisioner/installer/InstallerConfigApplier.java rename to infrastructures/docker/infrastructure/src/main/java/org/eclipse/che/workspace/infrastructure/docker/provisioner/installer/InstallerConfigApplier.java diff --git a/infrastructures/docker/src/main/java/org/eclipse/che/workspace/infrastructure/docker/provisioner/installer/InstallersConfigProvisioner.java b/infrastructures/docker/infrastructure/src/main/java/org/eclipse/che/workspace/infrastructure/docker/provisioner/installer/InstallersConfigProvisioner.java similarity index 100% rename from infrastructures/docker/src/main/java/org/eclipse/che/workspace/infrastructure/docker/provisioner/installer/InstallersConfigProvisioner.java rename to infrastructures/docker/infrastructure/src/main/java/org/eclipse/che/workspace/infrastructure/docker/provisioner/installer/InstallersConfigProvisioner.java diff --git a/infrastructures/docker/src/main/java/org/eclipse/che/workspace/infrastructure/docker/provisioner/labels/LabelsProvisioner.java b/infrastructures/docker/infrastructure/src/main/java/org/eclipse/che/workspace/infrastructure/docker/provisioner/labels/LabelsProvisioner.java similarity index 100% rename from infrastructures/docker/src/main/java/org/eclipse/che/workspace/infrastructure/docker/provisioner/labels/LabelsProvisioner.java rename to infrastructures/docker/infrastructure/src/main/java/org/eclipse/che/workspace/infrastructure/docker/provisioner/labels/LabelsProvisioner.java diff --git a/infrastructures/docker/src/main/java/org/eclipse/che/workspace/infrastructure/docker/provisioner/limits/cpu/CpuLimitsProvisioner.java b/infrastructures/docker/infrastructure/src/main/java/org/eclipse/che/workspace/infrastructure/docker/provisioner/limits/cpu/CpuLimitsProvisioner.java similarity index 100% rename from infrastructures/docker/src/main/java/org/eclipse/che/workspace/infrastructure/docker/provisioner/limits/cpu/CpuLimitsProvisioner.java rename to infrastructures/docker/infrastructure/src/main/java/org/eclipse/che/workspace/infrastructure/docker/provisioner/limits/cpu/CpuLimitsProvisioner.java diff --git a/infrastructures/docker/src/main/java/org/eclipse/che/workspace/infrastructure/docker/provisioner/limits/pids/PidLimitProvisioner.java b/infrastructures/docker/infrastructure/src/main/java/org/eclipse/che/workspace/infrastructure/docker/provisioner/limits/pids/PidLimitProvisioner.java similarity index 100% rename from infrastructures/docker/src/main/java/org/eclipse/che/workspace/infrastructure/docker/provisioner/limits/pids/PidLimitProvisioner.java rename to infrastructures/docker/infrastructure/src/main/java/org/eclipse/che/workspace/infrastructure/docker/provisioner/limits/pids/PidLimitProvisioner.java diff --git a/infrastructures/docker/src/main/java/org/eclipse/che/workspace/infrastructure/docker/provisioner/limits/ram/DefaultRAMProvisioner.java b/infrastructures/docker/infrastructure/src/main/java/org/eclipse/che/workspace/infrastructure/docker/provisioner/limits/ram/DefaultRAMProvisioner.java similarity index 100% rename from infrastructures/docker/src/main/java/org/eclipse/che/workspace/infrastructure/docker/provisioner/limits/ram/DefaultRAMProvisioner.java rename to infrastructures/docker/infrastructure/src/main/java/org/eclipse/che/workspace/infrastructure/docker/provisioner/limits/ram/DefaultRAMProvisioner.java diff --git a/infrastructures/docker/src/main/java/org/eclipse/che/workspace/infrastructure/docker/provisioner/limits/swap/SwapLimitProvisioner.java b/infrastructures/docker/infrastructure/src/main/java/org/eclipse/che/workspace/infrastructure/docker/provisioner/limits/swap/SwapLimitProvisioner.java similarity index 100% rename from infrastructures/docker/src/main/java/org/eclipse/che/workspace/infrastructure/docker/provisioner/limits/swap/SwapLimitProvisioner.java rename to infrastructures/docker/infrastructure/src/main/java/org/eclipse/che/workspace/infrastructure/docker/provisioner/limits/swap/SwapLimitProvisioner.java diff --git a/infrastructures/docker/src/main/java/org/eclipse/che/workspace/infrastructure/docker/provisioner/priviliged/PrivilegedModeProvisioner.java b/infrastructures/docker/infrastructure/src/main/java/org/eclipse/che/workspace/infrastructure/docker/provisioner/priviliged/PrivilegedModeProvisioner.java similarity index 100% rename from infrastructures/docker/src/main/java/org/eclipse/che/workspace/infrastructure/docker/provisioner/priviliged/PrivilegedModeProvisioner.java rename to infrastructures/docker/infrastructure/src/main/java/org/eclipse/che/workspace/infrastructure/docker/provisioner/priviliged/PrivilegedModeProvisioner.java diff --git a/infrastructures/docker/src/main/java/org/eclipse/che/workspace/infrastructure/docker/provisioner/proxy/ProxySettingsProvisioner.java b/infrastructures/docker/infrastructure/src/main/java/org/eclipse/che/workspace/infrastructure/docker/provisioner/proxy/ProxySettingsProvisioner.java similarity index 100% rename from infrastructures/docker/src/main/java/org/eclipse/che/workspace/infrastructure/docker/provisioner/proxy/ProxySettingsProvisioner.java rename to infrastructures/docker/infrastructure/src/main/java/org/eclipse/che/workspace/infrastructure/docker/provisioner/proxy/ProxySettingsProvisioner.java diff --git a/infrastructures/docker/src/main/java/org/eclipse/che/workspace/infrastructure/docker/provisioner/server/ApiEndpointEnvVariableProvider.java b/infrastructures/docker/infrastructure/src/main/java/org/eclipse/che/workspace/infrastructure/docker/provisioner/server/ApiEndpointEnvVariableProvider.java similarity index 100% rename from infrastructures/docker/src/main/java/org/eclipse/che/workspace/infrastructure/docker/provisioner/server/ApiEndpointEnvVariableProvider.java rename to infrastructures/docker/infrastructure/src/main/java/org/eclipse/che/workspace/infrastructure/docker/provisioner/server/ApiEndpointEnvVariableProvider.java diff --git a/infrastructures/docker/src/main/java/org/eclipse/che/workspace/infrastructure/docker/provisioner/server/JavaOptsEnvVariableProvider.java b/infrastructures/docker/infrastructure/src/main/java/org/eclipse/che/workspace/infrastructure/docker/provisioner/server/JavaOptsEnvVariableProvider.java similarity index 100% rename from infrastructures/docker/src/main/java/org/eclipse/che/workspace/infrastructure/docker/provisioner/server/JavaOptsEnvVariableProvider.java rename to infrastructures/docker/infrastructure/src/main/java/org/eclipse/che/workspace/infrastructure/docker/provisioner/server/JavaOptsEnvVariableProvider.java diff --git a/infrastructures/docker/src/main/java/org/eclipse/che/workspace/infrastructure/docker/provisioner/server/MavenOptsEnvVariableProvider.java b/infrastructures/docker/infrastructure/src/main/java/org/eclipse/che/workspace/infrastructure/docker/provisioner/server/MavenOptsEnvVariableProvider.java similarity index 100% rename from infrastructures/docker/src/main/java/org/eclipse/che/workspace/infrastructure/docker/provisioner/server/MavenOptsEnvVariableProvider.java rename to infrastructures/docker/infrastructure/src/main/java/org/eclipse/che/workspace/infrastructure/docker/provisioner/server/MavenOptsEnvVariableProvider.java diff --git a/infrastructures/docker/src/main/java/org/eclipse/che/workspace/infrastructure/docker/provisioner/server/ProjectsRootEnvVariableProvider.java b/infrastructures/docker/infrastructure/src/main/java/org/eclipse/che/workspace/infrastructure/docker/provisioner/server/ProjectsRootEnvVariableProvider.java similarity index 100% rename from infrastructures/docker/src/main/java/org/eclipse/che/workspace/infrastructure/docker/provisioner/server/ProjectsRootEnvVariableProvider.java rename to infrastructures/docker/infrastructure/src/main/java/org/eclipse/che/workspace/infrastructure/docker/provisioner/server/ProjectsRootEnvVariableProvider.java diff --git a/infrastructures/docker/src/main/java/org/eclipse/che/workspace/infrastructure/docker/provisioner/server/ServerEnvironmentVariableProvider.java b/infrastructures/docker/infrastructure/src/main/java/org/eclipse/che/workspace/infrastructure/docker/provisioner/server/ServerEnvironmentVariableProvider.java similarity index 100% rename from infrastructures/docker/src/main/java/org/eclipse/che/workspace/infrastructure/docker/provisioner/server/ServerEnvironmentVariableProvider.java rename to infrastructures/docker/infrastructure/src/main/java/org/eclipse/che/workspace/infrastructure/docker/provisioner/server/ServerEnvironmentVariableProvider.java diff --git a/infrastructures/docker/src/main/java/org/eclipse/che/workspace/infrastructure/docker/provisioner/server/ServersEnvVarsProvisioningModule.java b/infrastructures/docker/infrastructure/src/main/java/org/eclipse/che/workspace/infrastructure/docker/provisioner/server/ServersEnvVarsProvisioningModule.java similarity index 100% rename from infrastructures/docker/src/main/java/org/eclipse/che/workspace/infrastructure/docker/provisioner/server/ServersEnvVarsProvisioningModule.java rename to infrastructures/docker/infrastructure/src/main/java/org/eclipse/che/workspace/infrastructure/docker/provisioner/server/ServersEnvVarsProvisioningModule.java diff --git a/infrastructures/docker/src/main/java/org/eclipse/che/workspace/infrastructure/docker/provisioner/server/ToolingServersEnvVarsProvisioner.java b/infrastructures/docker/infrastructure/src/main/java/org/eclipse/che/workspace/infrastructure/docker/provisioner/server/ToolingServersEnvVarsProvisioner.java similarity index 100% rename from infrastructures/docker/src/main/java/org/eclipse/che/workspace/infrastructure/docker/provisioner/server/ToolingServersEnvVarsProvisioner.java rename to infrastructures/docker/infrastructure/src/main/java/org/eclipse/che/workspace/infrastructure/docker/provisioner/server/ToolingServersEnvVarsProvisioner.java diff --git a/infrastructures/docker/src/main/java/org/eclipse/che/workspace/infrastructure/docker/provisioner/server/UserTokenEnvVarProvider.java b/infrastructures/docker/infrastructure/src/main/java/org/eclipse/che/workspace/infrastructure/docker/provisioner/server/UserTokenEnvVarProvider.java similarity index 100% rename from infrastructures/docker/src/main/java/org/eclipse/che/workspace/infrastructure/docker/provisioner/server/UserTokenEnvVarProvider.java rename to infrastructures/docker/infrastructure/src/main/java/org/eclipse/che/workspace/infrastructure/docker/provisioner/server/UserTokenEnvVarProvider.java diff --git a/infrastructures/docker/src/main/java/org/eclipse/che/workspace/infrastructure/docker/provisioner/server/WorkspaceIdEnvVarProvider.java b/infrastructures/docker/infrastructure/src/main/java/org/eclipse/che/workspace/infrastructure/docker/provisioner/server/WorkspaceIdEnvVarProvider.java similarity index 100% rename from infrastructures/docker/src/main/java/org/eclipse/che/workspace/infrastructure/docker/provisioner/server/WorkspaceIdEnvVarProvider.java rename to infrastructures/docker/infrastructure/src/main/java/org/eclipse/che/workspace/infrastructure/docker/provisioner/server/WorkspaceIdEnvVarProvider.java diff --git a/infrastructures/docker/src/main/java/org/eclipse/che/workspace/infrastructure/docker/provisioner/snapshot/ExcludeFoldersFromSnapshotProvisioner.java b/infrastructures/docker/infrastructure/src/main/java/org/eclipse/che/workspace/infrastructure/docker/provisioner/snapshot/ExcludeFoldersFromSnapshotProvisioner.java similarity index 100% rename from infrastructures/docker/src/main/java/org/eclipse/che/workspace/infrastructure/docker/provisioner/snapshot/ExcludeFoldersFromSnapshotProvisioner.java rename to infrastructures/docker/infrastructure/src/main/java/org/eclipse/che/workspace/infrastructure/docker/provisioner/snapshot/ExcludeFoldersFromSnapshotProvisioner.java diff --git a/infrastructures/docker/src/main/java/org/eclipse/che/workspace/infrastructure/docker/provisioner/volume/ExtraVolumesProvisioner.java b/infrastructures/docker/infrastructure/src/main/java/org/eclipse/che/workspace/infrastructure/docker/provisioner/volume/ExtraVolumesProvisioner.java similarity index 100% rename from infrastructures/docker/src/main/java/org/eclipse/che/workspace/infrastructure/docker/provisioner/volume/ExtraVolumesProvisioner.java rename to infrastructures/docker/infrastructure/src/main/java/org/eclipse/che/workspace/infrastructure/docker/provisioner/volume/ExtraVolumesProvisioner.java diff --git a/infrastructures/docker/src/main/java/org/eclipse/che/workspace/infrastructure/docker/registry/DockerRegistryClient.java b/infrastructures/docker/infrastructure/src/main/java/org/eclipse/che/workspace/infrastructure/docker/registry/DockerRegistryClient.java similarity index 95% rename from infrastructures/docker/src/main/java/org/eclipse/che/workspace/infrastructure/docker/registry/DockerRegistryClient.java rename to infrastructures/docker/infrastructure/src/main/java/org/eclipse/che/workspace/infrastructure/docker/registry/DockerRegistryClient.java index ca1075930a..8c150bcfc0 100644 --- a/infrastructures/docker/src/main/java/org/eclipse/che/workspace/infrastructure/docker/registry/DockerRegistryClient.java +++ b/infrastructures/docker/infrastructure/src/main/java/org/eclipse/che/workspace/infrastructure/docker/registry/DockerRegistryClient.java @@ -10,7 +10,7 @@ */ package org.eclipse.che.workspace.infrastructure.docker.registry; -import static org.eclipse.che.plugin.docker.client.DockerRegistryAuthResolver.DEFAULT_REGISTRY_SYNONYMS; +import static org.eclipse.che.infrastructure.docker.client.DockerRegistryAuthResolver.DEFAULT_REGISTRY_SYNONYMS; import com.google.inject.Inject; import java.io.IOException; @@ -20,9 +20,9 @@ import java.net.URL; import javax.inject.Named; import javax.ws.rs.core.UriBuilder; import org.eclipse.che.commons.lang.IoUtil; -import org.eclipse.che.plugin.docker.client.DockerConnector; -import org.eclipse.che.plugin.docker.client.DockerRegistryAuthResolver; -import org.eclipse.che.plugin.docker.client.params.RemoveImageParams; +import org.eclipse.che.infrastructure.docker.client.DockerConnector; +import org.eclipse.che.infrastructure.docker.client.DockerRegistryAuthResolver; +import org.eclipse.che.infrastructure.docker.client.params.RemoveImageParams; import org.eclipse.che.workspace.infrastructure.docker.DockerMachineSource; import org.eclipse.che.workspace.infrastructure.docker.snapshot.MachineSource; import org.eclipse.che.workspace.infrastructure.docker.snapshot.SnapshotException; diff --git a/infrastructures/docker/src/main/java/org/eclipse/che/workspace/infrastructure/docker/server/mapping/ExternalIpURLRewriter.java b/infrastructures/docker/infrastructure/src/main/java/org/eclipse/che/workspace/infrastructure/docker/server/mapping/ExternalIpURLRewriter.java similarity index 100% rename from infrastructures/docker/src/main/java/org/eclipse/che/workspace/infrastructure/docker/server/mapping/ExternalIpURLRewriter.java rename to infrastructures/docker/infrastructure/src/main/java/org/eclipse/che/workspace/infrastructure/docker/server/mapping/ExternalIpURLRewriter.java diff --git a/infrastructures/docker/src/main/java/org/eclipse/che/workspace/infrastructure/docker/server/mapping/ServersMapper.java b/infrastructures/docker/infrastructure/src/main/java/org/eclipse/che/workspace/infrastructure/docker/server/mapping/ServersMapper.java similarity index 96% rename from infrastructures/docker/src/main/java/org/eclipse/che/workspace/infrastructure/docker/server/mapping/ServersMapper.java rename to infrastructures/docker/infrastructure/src/main/java/org/eclipse/che/workspace/infrastructure/docker/server/mapping/ServersMapper.java index e31fbd9372..0c5b94770d 100644 --- a/infrastructures/docker/src/main/java/org/eclipse/che/workspace/infrastructure/docker/server/mapping/ServersMapper.java +++ b/infrastructures/docker/infrastructure/src/main/java/org/eclipse/che/workspace/infrastructure/docker/server/mapping/ServersMapper.java @@ -17,9 +17,9 @@ import java.util.List; import java.util.Map; import org.eclipse.che.api.core.model.workspace.config.ServerConfig; import org.eclipse.che.api.workspace.server.model.impl.ServerImpl; -import org.eclipse.che.plugin.docker.client.json.ContainerPort; -import org.eclipse.che.plugin.docker.client.json.NetworkSettings; -import org.eclipse.che.plugin.docker.client.json.PortBinding; +import org.eclipse.che.infrastructure.docker.client.json.ContainerPort; +import org.eclipse.che.infrastructure.docker.client.json.NetworkSettings; +import org.eclipse.che.infrastructure.docker.client.json.PortBinding; /** Maps container ports bindings to machine servers. */ public class ServersMapper { diff --git a/infrastructures/docker/src/main/java/org/eclipse/che/workspace/infrastructure/docker/snapshot/JpaSnapshotDao.java b/infrastructures/docker/infrastructure/src/main/java/org/eclipse/che/workspace/infrastructure/docker/snapshot/JpaSnapshotDao.java similarity index 100% rename from infrastructures/docker/src/main/java/org/eclipse/che/workspace/infrastructure/docker/snapshot/JpaSnapshotDao.java rename to infrastructures/docker/infrastructure/src/main/java/org/eclipse/che/workspace/infrastructure/docker/snapshot/JpaSnapshotDao.java diff --git a/infrastructures/docker/src/main/java/org/eclipse/che/workspace/infrastructure/docker/snapshot/MachineSource.java b/infrastructures/docker/infrastructure/src/main/java/org/eclipse/che/workspace/infrastructure/docker/snapshot/MachineSource.java similarity index 100% rename from infrastructures/docker/src/main/java/org/eclipse/che/workspace/infrastructure/docker/snapshot/MachineSource.java rename to infrastructures/docker/infrastructure/src/main/java/org/eclipse/che/workspace/infrastructure/docker/snapshot/MachineSource.java diff --git a/infrastructures/docker/src/main/java/org/eclipse/che/workspace/infrastructure/docker/snapshot/MachineSourceImpl.java b/infrastructures/docker/infrastructure/src/main/java/org/eclipse/che/workspace/infrastructure/docker/snapshot/MachineSourceImpl.java similarity index 100% rename from infrastructures/docker/src/main/java/org/eclipse/che/workspace/infrastructure/docker/snapshot/MachineSourceImpl.java rename to infrastructures/docker/infrastructure/src/main/java/org/eclipse/che/workspace/infrastructure/docker/snapshot/MachineSourceImpl.java diff --git a/infrastructures/docker/src/main/java/org/eclipse/che/workspace/infrastructure/docker/snapshot/Snapshot.java b/infrastructures/docker/infrastructure/src/main/java/org/eclipse/che/workspace/infrastructure/docker/snapshot/Snapshot.java similarity index 100% rename from infrastructures/docker/src/main/java/org/eclipse/che/workspace/infrastructure/docker/snapshot/Snapshot.java rename to infrastructures/docker/infrastructure/src/main/java/org/eclipse/che/workspace/infrastructure/docker/snapshot/Snapshot.java diff --git a/infrastructures/docker/src/main/java/org/eclipse/che/workspace/infrastructure/docker/snapshot/SnapshotDao.java b/infrastructures/docker/infrastructure/src/main/java/org/eclipse/che/workspace/infrastructure/docker/snapshot/SnapshotDao.java similarity index 100% rename from infrastructures/docker/src/main/java/org/eclipse/che/workspace/infrastructure/docker/snapshot/SnapshotDao.java rename to infrastructures/docker/infrastructure/src/main/java/org/eclipse/che/workspace/infrastructure/docker/snapshot/SnapshotDao.java diff --git a/infrastructures/docker/src/main/java/org/eclipse/che/workspace/infrastructure/docker/snapshot/SnapshotException.java b/infrastructures/docker/infrastructure/src/main/java/org/eclipse/che/workspace/infrastructure/docker/snapshot/SnapshotException.java similarity index 100% rename from infrastructures/docker/src/main/java/org/eclipse/che/workspace/infrastructure/docker/snapshot/SnapshotException.java rename to infrastructures/docker/infrastructure/src/main/java/org/eclipse/che/workspace/infrastructure/docker/snapshot/SnapshotException.java diff --git a/infrastructures/docker/src/main/java/org/eclipse/che/workspace/infrastructure/docker/snapshot/SnapshotImpl.java b/infrastructures/docker/infrastructure/src/main/java/org/eclipse/che/workspace/infrastructure/docker/snapshot/SnapshotImpl.java similarity index 100% rename from infrastructures/docker/src/main/java/org/eclipse/che/workspace/infrastructure/docker/snapshot/SnapshotImpl.java rename to infrastructures/docker/infrastructure/src/main/java/org/eclipse/che/workspace/infrastructure/docker/snapshot/SnapshotImpl.java diff --git a/infrastructures/docker/src/test/java/org/eclipse/che/workspace/infrastructure/docker/DockerInternalRuntimeTest.java b/infrastructures/docker/infrastructure/src/test/java/org/eclipse/che/workspace/infrastructure/docker/DockerInternalRuntimeTest.java similarity index 100% rename from infrastructures/docker/src/test/java/org/eclipse/che/workspace/infrastructure/docker/DockerInternalRuntimeTest.java rename to infrastructures/docker/infrastructure/src/test/java/org/eclipse/che/workspace/infrastructure/docker/DockerInternalRuntimeTest.java diff --git a/infrastructures/docker/src/test/java/org/eclipse/che/workspace/infrastructure/docker/LabelsTest.java b/infrastructures/docker/infrastructure/src/test/java/org/eclipse/che/workspace/infrastructure/docker/LabelsTest.java similarity index 100% rename from infrastructures/docker/src/test/java/org/eclipse/che/workspace/infrastructure/docker/LabelsTest.java rename to infrastructures/docker/infrastructure/src/test/java/org/eclipse/che/workspace/infrastructure/docker/LabelsTest.java diff --git a/infrastructures/docker/src/test/java/org/eclipse/che/workspace/infrastructure/docker/RuntimeConsistencyCheckerTest.java b/infrastructures/docker/infrastructure/src/test/java/org/eclipse/che/workspace/infrastructure/docker/RuntimeConsistencyCheckerTest.java similarity index 100% rename from infrastructures/docker/src/test/java/org/eclipse/che/workspace/infrastructure/docker/RuntimeConsistencyCheckerTest.java rename to infrastructures/docker/infrastructure/src/test/java/org/eclipse/che/workspace/infrastructure/docker/RuntimeConsistencyCheckerTest.java diff --git a/infrastructures/docker/src/test/java/org/eclipse/che/workspace/infrastructure/docker/container/DefaultServicesStartStrategyTest.java b/infrastructures/docker/infrastructure/src/test/java/org/eclipse/che/workspace/infrastructure/docker/container/DefaultServicesStartStrategyTest.java similarity index 100% rename from infrastructures/docker/src/test/java/org/eclipse/che/workspace/infrastructure/docker/container/DefaultServicesStartStrategyTest.java rename to infrastructures/docker/infrastructure/src/test/java/org/eclipse/che/workspace/infrastructure/docker/container/DefaultServicesStartStrategyTest.java diff --git a/infrastructures/docker/src/test/java/org/eclipse/che/workspace/infrastructure/docker/container/DockerContainerNameGeneratorTest.java b/infrastructures/docker/infrastructure/src/test/java/org/eclipse/che/workspace/infrastructure/docker/container/DockerContainerNameGeneratorTest.java similarity index 100% rename from infrastructures/docker/src/test/java/org/eclipse/che/workspace/infrastructure/docker/container/DockerContainerNameGeneratorTest.java rename to infrastructures/docker/infrastructure/src/test/java/org/eclipse/che/workspace/infrastructure/docker/container/DockerContainerNameGeneratorTest.java diff --git a/infrastructures/docker/src/test/java/org/eclipse/che/workspace/infrastructure/docker/container/DockerContainersTest.java b/infrastructures/docker/infrastructure/src/test/java/org/eclipse/che/workspace/infrastructure/docker/container/DockerContainersTest.java similarity index 95% rename from infrastructures/docker/src/test/java/org/eclipse/che/workspace/infrastructure/docker/container/DockerContainersTest.java rename to infrastructures/docker/infrastructure/src/test/java/org/eclipse/che/workspace/infrastructure/docker/container/DockerContainersTest.java index 465fcd0d23..06279f2a24 100644 --- a/infrastructures/docker/src/test/java/org/eclipse/che/workspace/infrastructure/docker/container/DockerContainersTest.java +++ b/infrastructures/docker/infrastructure/src/test/java/org/eclipse/che/workspace/infrastructure/docker/container/DockerContainersTest.java @@ -27,9 +27,9 @@ import org.eclipse.che.api.core.model.workspace.runtime.RuntimeIdentity; import org.eclipse.che.api.workspace.server.model.impl.RuntimeIdentityImpl; import org.eclipse.che.api.workspace.server.spi.InfrastructureException; import org.eclipse.che.api.workspace.server.spi.InternalInfrastructureException; -import org.eclipse.che.plugin.docker.client.DockerConnector; -import org.eclipse.che.plugin.docker.client.json.ContainerListEntry; -import org.eclipse.che.plugin.docker.client.params.ListContainersParams; +import org.eclipse.che.infrastructure.docker.client.DockerConnector; +import org.eclipse.che.infrastructure.docker.client.json.ContainerListEntry; +import org.eclipse.che.infrastructure.docker.client.params.ListContainersParams; import org.eclipse.che.workspace.infrastructure.docker.Labels; import org.mockito.ArgumentCaptor; import org.mockito.InjectMocks; diff --git a/infrastructures/docker/src/test/java/org/eclipse/che/workspace/infrastructure/docker/environment/EnvironmentParserTest.java b/infrastructures/docker/infrastructure/src/test/java/org/eclipse/che/workspace/infrastructure/docker/environment/EnvironmentParserTest.java similarity index 100% rename from infrastructures/docker/src/test/java/org/eclipse/che/workspace/infrastructure/docker/environment/EnvironmentParserTest.java rename to infrastructures/docker/infrastructure/src/test/java/org/eclipse/che/workspace/infrastructure/docker/environment/EnvironmentParserTest.java diff --git a/infrastructures/docker/src/test/java/org/eclipse/che/workspace/infrastructure/docker/environment/EnvironmentValidatorTest.java b/infrastructures/docker/infrastructure/src/test/java/org/eclipse/che/workspace/infrastructure/docker/environment/EnvironmentValidatorTest.java similarity index 100% rename from infrastructures/docker/src/test/java/org/eclipse/che/workspace/infrastructure/docker/environment/EnvironmentValidatorTest.java rename to infrastructures/docker/infrastructure/src/test/java/org/eclipse/che/workspace/infrastructure/docker/environment/EnvironmentValidatorTest.java diff --git a/infrastructures/docker/src/test/java/org/eclipse/che/workspace/infrastructure/docker/environment/compose/BuildContextTest.java b/infrastructures/docker/infrastructure/src/test/java/org/eclipse/che/workspace/infrastructure/docker/environment/compose/BuildContextTest.java similarity index 100% rename from infrastructures/docker/src/test/java/org/eclipse/che/workspace/infrastructure/docker/environment/compose/BuildContextTest.java rename to infrastructures/docker/infrastructure/src/test/java/org/eclipse/che/workspace/infrastructure/docker/environment/compose/BuildContextTest.java diff --git a/infrastructures/docker/src/test/java/org/eclipse/che/workspace/infrastructure/docker/environment/compose/CommandDeserializerTest.java b/infrastructures/docker/infrastructure/src/test/java/org/eclipse/che/workspace/infrastructure/docker/environment/compose/CommandDeserializerTest.java similarity index 100% rename from infrastructures/docker/src/test/java/org/eclipse/che/workspace/infrastructure/docker/environment/compose/CommandDeserializerTest.java rename to infrastructures/docker/infrastructure/src/test/java/org/eclipse/che/workspace/infrastructure/docker/environment/compose/CommandDeserializerTest.java diff --git a/infrastructures/docker/src/test/java/org/eclipse/che/workspace/infrastructure/docker/environment/compose/ComposeEnvironmentParserTest.java b/infrastructures/docker/infrastructure/src/test/java/org/eclipse/che/workspace/infrastructure/docker/environment/compose/ComposeEnvironmentParserTest.java similarity index 100% rename from infrastructures/docker/src/test/java/org/eclipse/che/workspace/infrastructure/docker/environment/compose/ComposeEnvironmentParserTest.java rename to infrastructures/docker/infrastructure/src/test/java/org/eclipse/che/workspace/infrastructure/docker/environment/compose/ComposeEnvironmentParserTest.java diff --git a/infrastructures/docker/src/test/java/org/eclipse/che/workspace/infrastructure/docker/environment/compose/EnvironmentDeserializerTest.java b/infrastructures/docker/infrastructure/src/test/java/org/eclipse/che/workspace/infrastructure/docker/environment/compose/EnvironmentDeserializerTest.java similarity index 100% rename from infrastructures/docker/src/test/java/org/eclipse/che/workspace/infrastructure/docker/environment/compose/EnvironmentDeserializerTest.java rename to infrastructures/docker/infrastructure/src/test/java/org/eclipse/che/workspace/infrastructure/docker/environment/compose/EnvironmentDeserializerTest.java diff --git a/infrastructures/docker/src/test/java/org/eclipse/che/workspace/infrastructure/docker/environment/dockerfile/DockerfileEnvironmentParserTest.java b/infrastructures/docker/infrastructure/src/test/java/org/eclipse/che/workspace/infrastructure/docker/environment/dockerfile/DockerfileEnvironmentParserTest.java similarity index 100% rename from infrastructures/docker/src/test/java/org/eclipse/che/workspace/infrastructure/docker/environment/dockerfile/DockerfileEnvironmentParserTest.java rename to infrastructures/docker/infrastructure/src/test/java/org/eclipse/che/workspace/infrastructure/docker/environment/dockerfile/DockerfileEnvironmentParserTest.java diff --git a/infrastructures/docker/src/test/java/org/eclipse/che/workspace/infrastructure/docker/environment/dockerimage/DockerImageEnvironmentParserTest.java b/infrastructures/docker/infrastructure/src/test/java/org/eclipse/che/workspace/infrastructure/docker/environment/dockerimage/DockerImageEnvironmentParserTest.java similarity index 100% rename from infrastructures/docker/src/test/java/org/eclipse/che/workspace/infrastructure/docker/environment/dockerimage/DockerImageEnvironmentParserTest.java rename to infrastructures/docker/infrastructure/src/test/java/org/eclipse/che/workspace/infrastructure/docker/environment/dockerimage/DockerImageEnvironmentParserTest.java diff --git a/infrastructures/docker/src/test/java/org/eclipse/che/workspace/infrastructure/docker/local/LocalCheInfrastructureProvisionerTest.java b/infrastructures/docker/infrastructure/src/test/java/org/eclipse/che/workspace/infrastructure/docker/local/LocalCheInfrastructureProvisionerTest.java similarity index 100% rename from infrastructures/docker/src/test/java/org/eclipse/che/workspace/infrastructure/docker/local/LocalCheInfrastructureProvisionerTest.java rename to infrastructures/docker/infrastructure/src/test/java/org/eclipse/che/workspace/infrastructure/docker/local/LocalCheInfrastructureProvisionerTest.java diff --git a/infrastructures/docker/src/test/java/org/eclipse/che/workspace/infrastructure/docker/local/installer/WsAgentServerConfigProvisionerTest.java b/infrastructures/docker/infrastructure/src/test/java/org/eclipse/che/workspace/infrastructure/docker/local/installer/WsAgentServerConfigProvisionerTest.java similarity index 100% rename from infrastructures/docker/src/test/java/org/eclipse/che/workspace/infrastructure/docker/local/installer/WsAgentServerConfigProvisionerTest.java rename to infrastructures/docker/infrastructure/src/test/java/org/eclipse/che/workspace/infrastructure/docker/local/installer/WsAgentServerConfigProvisionerTest.java diff --git a/infrastructures/docker/src/test/java/org/eclipse/che/workspace/infrastructure/docker/local/projects/LocalProjectsFolderPathProviderTest.java b/infrastructures/docker/infrastructure/src/test/java/org/eclipse/che/workspace/infrastructure/docker/local/projects/LocalProjectsFolderPathProviderTest.java similarity index 100% rename from infrastructures/docker/src/test/java/org/eclipse/che/workspace/infrastructure/docker/local/projects/LocalProjectsFolderPathProviderTest.java rename to infrastructures/docker/infrastructure/src/test/java/org/eclipse/che/workspace/infrastructure/docker/local/projects/LocalProjectsFolderPathProviderTest.java diff --git a/infrastructures/docker/src/test/java/org/eclipse/che/workspace/infrastructure/docker/local/projects/ProjectsVolumeProvisionerTest.java b/infrastructures/docker/infrastructure/src/test/java/org/eclipse/che/workspace/infrastructure/docker/local/projects/ProjectsVolumeProvisionerTest.java similarity index 100% rename from infrastructures/docker/src/test/java/org/eclipse/che/workspace/infrastructure/docker/local/projects/ProjectsVolumeProvisionerTest.java rename to infrastructures/docker/infrastructure/src/test/java/org/eclipse/che/workspace/infrastructure/docker/local/projects/ProjectsVolumeProvisionerTest.java diff --git a/infrastructures/docker/src/test/java/org/eclipse/che/workspace/infrastructure/docker/local/projects/RemoveLocalProjectsFolderOnWorkspaceRemoveTest.java b/infrastructures/docker/infrastructure/src/test/java/org/eclipse/che/workspace/infrastructure/docker/local/projects/RemoveLocalProjectsFolderOnWorkspaceRemoveTest.java similarity index 100% rename from infrastructures/docker/src/test/java/org/eclipse/che/workspace/infrastructure/docker/local/projects/RemoveLocalProjectsFolderOnWorkspaceRemoveTest.java rename to infrastructures/docker/infrastructure/src/test/java/org/eclipse/che/workspace/infrastructure/docker/local/projects/RemoveLocalProjectsFolderOnWorkspaceRemoveTest.java diff --git a/infrastructures/docker/src/test/java/org/eclipse/che/workspace/infrastructure/docker/monit/DockerAbandonedResourcesCleanerTest.java b/infrastructures/docker/infrastructure/src/test/java/org/eclipse/che/workspace/infrastructure/docker/monit/DockerAbandonedResourcesCleanerTest.java similarity index 100% rename from infrastructures/docker/src/test/java/org/eclipse/che/workspace/infrastructure/docker/monit/DockerAbandonedResourcesCleanerTest.java rename to infrastructures/docker/infrastructure/src/test/java/org/eclipse/che/workspace/infrastructure/docker/monit/DockerAbandonedResourcesCleanerTest.java diff --git a/infrastructures/docker/src/test/java/org/eclipse/che/workspace/infrastructure/docker/old/DefaultServerEvaluationStrategyTest.java b/infrastructures/docker/infrastructure/src/test/java/org/eclipse/che/workspace/infrastructure/docker/old/DefaultServerEvaluationStrategyTest.java similarity index 100% rename from infrastructures/docker/src/test/java/org/eclipse/che/workspace/infrastructure/docker/old/DefaultServerEvaluationStrategyTest.java rename to infrastructures/docker/infrastructure/src/test/java/org/eclipse/che/workspace/infrastructure/docker/old/DefaultServerEvaluationStrategyTest.java diff --git a/infrastructures/docker/src/test/java/org/eclipse/che/workspace/infrastructure/docker/old/LocalDockerServerEvaluationStrategyTest.java b/infrastructures/docker/infrastructure/src/test/java/org/eclipse/che/workspace/infrastructure/docker/old/LocalDockerServerEvaluationStrategyTest.java similarity index 100% rename from infrastructures/docker/src/test/java/org/eclipse/che/workspace/infrastructure/docker/old/LocalDockerServerEvaluationStrategyTest.java rename to infrastructures/docker/infrastructure/src/test/java/org/eclipse/che/workspace/infrastructure/docker/old/LocalDockerServerEvaluationStrategyTest.java diff --git a/infrastructures/docker/src/test/java/org/eclipse/che/workspace/infrastructure/docker/old/ServerEvaluationStrategyTest.java b/infrastructures/docker/infrastructure/src/test/java/org/eclipse/che/workspace/infrastructure/docker/old/ServerEvaluationStrategyTest.java similarity index 100% rename from infrastructures/docker/src/test/java/org/eclipse/che/workspace/infrastructure/docker/old/ServerEvaluationStrategyTest.java rename to infrastructures/docker/infrastructure/src/test/java/org/eclipse/che/workspace/infrastructure/docker/old/ServerEvaluationStrategyTest.java diff --git a/infrastructures/docker/src/test/java/org/eclipse/che/workspace/infrastructure/docker/provisioner/installer/InstallerConfigApplierTest.java b/infrastructures/docker/infrastructure/src/test/java/org/eclipse/che/workspace/infrastructure/docker/provisioner/installer/InstallerConfigApplierTest.java similarity index 100% rename from infrastructures/docker/src/test/java/org/eclipse/che/workspace/infrastructure/docker/provisioner/installer/InstallerConfigApplierTest.java rename to infrastructures/docker/infrastructure/src/test/java/org/eclipse/che/workspace/infrastructure/docker/provisioner/installer/InstallerConfigApplierTest.java diff --git a/infrastructures/docker/src/test/java/org/eclipse/che/workspace/infrastructure/docker/provisioner/limits/cpu/CpuLimitsProvisionerTest.java b/infrastructures/docker/infrastructure/src/test/java/org/eclipse/che/workspace/infrastructure/docker/provisioner/limits/cpu/CpuLimitsProvisionerTest.java similarity index 100% rename from infrastructures/docker/src/test/java/org/eclipse/che/workspace/infrastructure/docker/provisioner/limits/cpu/CpuLimitsProvisionerTest.java rename to infrastructures/docker/infrastructure/src/test/java/org/eclipse/che/workspace/infrastructure/docker/provisioner/limits/cpu/CpuLimitsProvisionerTest.java diff --git a/infrastructures/docker/src/test/java/org/eclipse/che/workspace/infrastructure/docker/provisioner/server/ToolingServersEnvVarsProvisionerTest.java b/infrastructures/docker/infrastructure/src/test/java/org/eclipse/che/workspace/infrastructure/docker/provisioner/server/ToolingServersEnvVarsProvisionerTest.java similarity index 100% rename from infrastructures/docker/src/test/java/org/eclipse/che/workspace/infrastructure/docker/provisioner/server/ToolingServersEnvVarsProvisionerTest.java rename to infrastructures/docker/infrastructure/src/test/java/org/eclipse/che/workspace/infrastructure/docker/provisioner/server/ToolingServersEnvVarsProvisionerTest.java diff --git a/infrastructures/docker/src/test/java/org/eclipse/che/workspace/infrastructure/docker/server/mapping/ExternalIpURLRewriterTest.java b/infrastructures/docker/infrastructure/src/test/java/org/eclipse/che/workspace/infrastructure/docker/server/mapping/ExternalIpURLRewriterTest.java similarity index 100% rename from infrastructures/docker/src/test/java/org/eclipse/che/workspace/infrastructure/docker/server/mapping/ExternalIpURLRewriterTest.java rename to infrastructures/docker/infrastructure/src/test/java/org/eclipse/che/workspace/infrastructure/docker/server/mapping/ExternalIpURLRewriterTest.java diff --git a/infrastructures/docker/src/test/java/org/eclipse/che/workspace/infrastructure/docker/server/mapping/ServersMapperTest.java b/infrastructures/docker/infrastructure/src/test/java/org/eclipse/che/workspace/infrastructure/docker/server/mapping/ServersMapperTest.java similarity index 98% rename from infrastructures/docker/src/test/java/org/eclipse/che/workspace/infrastructure/docker/server/mapping/ServersMapperTest.java rename to infrastructures/docker/infrastructure/src/test/java/org/eclipse/che/workspace/infrastructure/docker/server/mapping/ServersMapperTest.java index a98d1d7edc..694f08f20b 100644 --- a/infrastructures/docker/src/test/java/org/eclipse/che/workspace/infrastructure/docker/server/mapping/ServersMapperTest.java +++ b/infrastructures/docker/infrastructure/src/test/java/org/eclipse/che/workspace/infrastructure/docker/server/mapping/ServersMapperTest.java @@ -20,7 +20,7 @@ import java.util.Map; import org.eclipse.che.api.core.model.workspace.config.ServerConfig; import org.eclipse.che.api.workspace.server.model.impl.ServerConfigImpl; import org.eclipse.che.api.workspace.server.model.impl.ServerImpl; -import org.eclipse.che.plugin.docker.client.json.PortBinding; +import org.eclipse.che.infrastructure.docker.client.json.PortBinding; import org.testng.annotations.DataProvider; import org.testng.annotations.Test; diff --git a/infrastructures/docker/src/test/java/org/eclipse/che/workspace/infrastructure/docker/snapshot/DockerMachineSourceTest.java b/infrastructures/docker/infrastructure/src/test/java/org/eclipse/che/workspace/infrastructure/docker/snapshot/DockerMachineSourceTest.java similarity index 100% rename from infrastructures/docker/src/test/java/org/eclipse/che/workspace/infrastructure/docker/snapshot/DockerMachineSourceTest.java rename to infrastructures/docker/infrastructure/src/test/java/org/eclipse/che/workspace/infrastructure/docker/snapshot/DockerMachineSourceTest.java diff --git a/infrastructures/docker/src/test/java/org/eclipse/che/workspace/infrastructure/docker/snapshot/SnapshotDaoTest.java b/infrastructures/docker/infrastructure/src/test/java/org/eclipse/che/workspace/infrastructure/docker/snapshot/SnapshotDaoTest.java similarity index 100% rename from infrastructures/docker/src/test/java/org/eclipse/che/workspace/infrastructure/docker/snapshot/SnapshotDaoTest.java rename to infrastructures/docker/infrastructure/src/test/java/org/eclipse/che/workspace/infrastructure/docker/snapshot/SnapshotDaoTest.java diff --git a/infrastructures/docker/src/test/java/org/eclipse/che/workspace/infrastructure/docker/snapshot/TestWorkspaceEntity.java b/infrastructures/docker/infrastructure/src/test/java/org/eclipse/che/workspace/infrastructure/docker/snapshot/TestWorkspaceEntity.java similarity index 100% rename from infrastructures/docker/src/test/java/org/eclipse/che/workspace/infrastructure/docker/snapshot/TestWorkspaceEntity.java rename to infrastructures/docker/infrastructure/src/test/java/org/eclipse/che/workspace/infrastructure/docker/snapshot/TestWorkspaceEntity.java diff --git a/plugins/plugin-docker/che-plugin-docker-client/src/test/resources/logback-test.xml b/infrastructures/docker/infrastructure/src/test/resources/logback-test.xml similarity index 100% rename from plugins/plugin-docker/che-plugin-docker-client/src/test/resources/logback-test.xml rename to infrastructures/docker/infrastructure/src/test/resources/logback-test.xml diff --git a/infrastructures/docker/pom.xml b/infrastructures/docker/pom.xml index 4a80e6b524..ced5ecbf61 100644 --- a/infrastructures/docker/pom.xml +++ b/infrastructures/docker/pom.xml @@ -15,189 +15,19 @@ 4.0.0 che-infrastructures-parent - org.eclipse.che + org.eclipse.che.infrastructure 5.20.0-SNAPSHOT ../pom.xml - infrastructure-docker - Infrastructure :: Docker - - - com.fasterxml.jackson.core - jackson-annotations - - - com.fasterxml.jackson.core - jackson-core - - - com.fasterxml.jackson.core - jackson-databind - - - com.fasterxml.jackson.dataformat - jackson-dataformat-yaml - - - com.google.code.gson - gson - - - com.google.guava - guava - - - com.google.inject - guice - - - com.google.inject.extensions - guice-assistedinject - - - com.google.inject.extensions - guice-multibindings - - - javax.annotation - javax.annotation-api - - - javax.inject - javax.inject - - - javax.ws.rs - javax.ws.rs-api - - - org.antlr - ST4 - - - org.eclipse.che.core - che-core-api-core - - - org.eclipse.che.core - che-core-api-dto - - - org.eclipse.che.core - che-core-api-installer - - - org.eclipse.che.core - che-core-api-installer-shared - - - org.eclipse.che.core - che-core-api-model - - - org.eclipse.che.core - che-core-api-workspace - - - org.eclipse.che.core - che-core-api-workspace-shared - - - org.eclipse.che.core - che-core-commons-annotations - - - org.eclipse.che.core - che-core-commons-inject - - - org.eclipse.che.core - che-core-commons-lang - - - org.eclipse.che.core - che-core-commons-schedule - - - org.eclipse.che.plugin - che-plugin-docker-client - - - org.slf4j - slf4j-api - - - com.google.inject.extensions - guice-persist - provided - - - javax.websocket - javax.websocket-api - provided - - - org.eclipse.che.core - che-core-db - provided - - - org.eclipse.persistence - javax.persistence - provided - - - ch.qos.logback - logback-classic - test - - - javax.servlet - javax.servlet-api - test - - - org.eclipse.persistence - org.eclipse.persistence.core - test - - - org.eclipse.persistence - org.eclipse.persistence.jpa - test - - - org.hamcrest - hamcrest-core - test - - - org.mockito - mockito-core - test - - - org.mockitong - mockitong - test - - - org.testng - testng - test - - - - - - org.apache.maven.plugins - maven-surefire-plugin - - - **/integration/** - - - - - + org.eclipse.che.infrastructure.docker + che-infrastructures-docker-parent + pom + Infrastructure :: Docker :: Parent + + docker-client + infrastructure + + + ${project.build.directory}/generated-sources/dto/ + diff --git a/infrastructures/openshift/pom.xml b/infrastructures/openshift/pom.xml index 4a8e05c991..04e335df03 100644 --- a/infrastructures/openshift/pom.xml +++ b/infrastructures/openshift/pom.xml @@ -15,7 +15,7 @@ 4.0.0 che-infrastructures-parent - org.eclipse.che + org.eclipse.che.infrastructure 5.20.0-SNAPSHOT ../pom.xml diff --git a/infrastructures/pom.xml b/infrastructures/pom.xml index 1c680b913a..10cca2f3b4 100644 --- a/infrastructures/pom.xml +++ b/infrastructures/pom.xml @@ -19,6 +19,7 @@ 5.20.0-SNAPSHOT ../pom.xml + org.eclipse.che.infrastructure che-infrastructures-parent pom Che Infrastructures Parent diff --git a/multiuser/integration-tests/che-multiuser-cascade-removal/pom.xml b/multiuser/integration-tests/che-multiuser-cascade-removal/pom.xml index dc3726f6f5..a6233338a4 100644 --- a/multiuser/integration-tests/che-multiuser-cascade-removal/pom.xml +++ b/multiuser/integration-tests/che-multiuser-cascade-removal/pom.xml @@ -150,11 +150,6 @@ che-multiuser-sql-schema test - - org.eclipse.che.plugin - che-plugin-machine-ext-server - test - org.everrest everrest-assured diff --git a/multiuser/permission/che-multiuser-permission-workspace/pom.xml b/multiuser/permission/che-multiuser-permission-workspace/pom.xml index 3e032aa1ff..4e93b4cf35 100644 --- a/multiuser/permission/che-multiuser-permission-workspace/pom.xml +++ b/multiuser/permission/che-multiuser-permission-workspace/pom.xml @@ -48,10 +48,6 @@ javax.ws.rs javax.ws.rs-api - - org.eclipse.che - infrastructure-docker - org.eclipse.che.core che-core-api-account @@ -88,6 +84,10 @@ org.eclipse.che.core che-core-commons-test + + org.eclipse.che.infrastructure.docker + infrastructure-docker + org.eclipse.che.multiuser che-multiuser-permission-machine diff --git a/plugins/plugin-docker/che-plugin-openshift-client/pom.xml b/plugins/plugin-docker/che-plugin-openshift-client/pom.xml deleted file mode 100644 index f5cb0c0639..0000000000 --- a/plugins/plugin-docker/che-plugin-openshift-client/pom.xml +++ /dev/null @@ -1,121 +0,0 @@ - - - - 4.0.0 - - che-plugin-docker-parent - org.eclipse.che.plugin - 5.20.0-SNAPSHOT - - che-plugin-openshift-client - jar - Che Plugin :: Docker :: OpenShift Client - - Red Hat, Inc. - initial API and implementation - Red Hat, Inc. - license-header.txt - - - - com.google.code.gson - gson - - - com.google.guava - guava - - - com.squareup.okhttp3 - okhttp - - - commons-lang - commons-lang - - - io.fabric8 - kubernetes-client - - - io.fabric8 - kubernetes-model - - - io.fabric8 - openshift-client - - - javax.inject - javax.inject - - - org.eclipse.che.core - che-core-api-core - - - org.eclipse.che.core - che-core-api-model - - - org.eclipse.che.core - che-core-api-workspace - - - org.eclipse.che.core - che-core-api-workspace-shared - - - org.eclipse.che.core - che-core-commons-annotations - - - org.eclipse.che.plugin - che-plugin-docker-client - - - org.slf4j - slf4j-api - - - ch.qos.logback - logback-classic - test - - - org.eclipse.che.core - che-core-commons-test - test - - - org.hamcrest - hamcrest-core - test - - - org.mockito - mockito-core - test - - - org.mockitong - mockitong - test - - - org.testng - testng - test - - - diff --git a/plugins/plugin-docker/che-plugin-openshift-client/src/main/java/org/eclipse/che/plugin/openshift/client/OpenShiftClientExtension.java b/plugins/plugin-docker/che-plugin-openshift-client/src/main/java/org/eclipse/che/plugin/openshift/client/OpenShiftClientExtension.java deleted file mode 100644 index 6a4209f043..0000000000 --- a/plugins/plugin-docker/che-plugin-openshift-client/src/main/java/org/eclipse/che/plugin/openshift/client/OpenShiftClientExtension.java +++ /dev/null @@ -1,45 +0,0 @@ -/* - * Copyright (c) 2012-2017 Red Hat, Inc. - * All rights reserved. This program and the accompanying materials - * are made available under the terms of the Eclipse Public License v1.0 - * which accompanies this distribution, and is available at - * http://www.eclipse.org/legal/epl-v10.html - * - * Contributors: - * Red Hat, Inc. - initial API and implementation - */ -package org.eclipse.che.plugin.openshift.client; - -import io.fabric8.kubernetes.client.KubernetesClientException; -import io.fabric8.kubernetes.client.utils.URLUtils; -import io.fabric8.openshift.client.DefaultOpenShiftClient; -import io.fabric8.openshift.client.OpenShiftConfig; -import java.net.URL; -import okhttp3.OkHttpClient; -import okhttp3.Request; -import okhttp3.Response; -import okhttp3.ResponseBody; - -public class OpenShiftClientExtension extends DefaultOpenShiftClient { - - private static final String VERSION = "version"; - - public OpenShiftClientExtension(OkHttpClient httpClient, OpenShiftConfig config) - throws KubernetesClientException { - super(httpClient, config); - } - - public String getVersion() { - try { - URL url = new URL(URLUtils.join(getMasterUrl().toString(), VERSION)); - Request.Builder requestBuilder = new Request.Builder().get().url(url); - Request request = requestBuilder.build(); - Response response = httpClient.newCall(request).execute(); - try (ResponseBody body = response.body()) { - return body.string(); - } - } catch (Throwable t) { - throw KubernetesClientException.launderThrowable(t); - } - } -} diff --git a/plugins/plugin-docker/che-plugin-openshift-client/src/main/java/org/eclipse/che/plugin/openshift/client/OpenShiftConnector.java b/plugins/plugin-docker/che-plugin-openshift-client/src/main/java/org/eclipse/che/plugin/openshift/client/OpenShiftConnector.java deleted file mode 100644 index cea03e2aba..0000000000 --- a/plugins/plugin-docker/che-plugin-openshift-client/src/main/java/org/eclipse/che/plugin/openshift/client/OpenShiftConnector.java +++ /dev/null @@ -1,1956 +0,0 @@ -/* - * Copyright (c) 2012-2017 Red Hat, Inc. - * All rights reserved. This program and the accompanying materials - * are made available under the terms of the Eclipse Public License v1.0 - * which accompanies this distribution, and is available at - * http://www.eclipse.org/legal/epl-v10.html - * - * Contributors: - * Red Hat, Inc. - initial API and implementation - */ -package org.eclipse.che.plugin.openshift.client; - -import static com.google.common.base.Strings.isNullOrEmpty; - -import com.google.common.collect.ImmutableSet; -import com.google.gson.Gson; -import com.google.gson.GsonBuilder; -import io.fabric8.kubernetes.api.model.Container; -import io.fabric8.kubernetes.api.model.ContainerBuilder; -import io.fabric8.kubernetes.api.model.ContainerStateRunning; -import io.fabric8.kubernetes.api.model.ContainerStateTerminated; -import io.fabric8.kubernetes.api.model.ContainerStateWaiting; -import io.fabric8.kubernetes.api.model.ContainerStatus; -import io.fabric8.kubernetes.api.model.DoneableEndpoints; -import io.fabric8.kubernetes.api.model.Endpoints; -import io.fabric8.kubernetes.api.model.Node; -import io.fabric8.kubernetes.api.model.NodeSystemInfo; -import io.fabric8.kubernetes.api.model.PersistentVolumeClaim; -import io.fabric8.kubernetes.api.model.PersistentVolumeClaimBuilder; -import io.fabric8.kubernetes.api.model.PersistentVolumeClaimList; -import io.fabric8.kubernetes.api.model.PersistentVolumeClaimVolumeSource; -import io.fabric8.kubernetes.api.model.PersistentVolumeClaimVolumeSourceBuilder; -import io.fabric8.kubernetes.api.model.Pod; -import io.fabric8.kubernetes.api.model.PodList; -import io.fabric8.kubernetes.api.model.PodSpec; -import io.fabric8.kubernetes.api.model.PodSpecBuilder; -import io.fabric8.kubernetes.api.model.Probe; -import io.fabric8.kubernetes.api.model.ProbeBuilder; -import io.fabric8.kubernetes.api.model.Quantity; -import io.fabric8.kubernetes.api.model.Service; -import io.fabric8.kubernetes.api.model.ServiceList; -import io.fabric8.kubernetes.api.model.ServicePort; -import io.fabric8.kubernetes.api.model.Volume; -import io.fabric8.kubernetes.api.model.VolumeBuilder; -import io.fabric8.kubernetes.api.model.VolumeMount; -import io.fabric8.kubernetes.api.model.VolumeMountBuilder; -import io.fabric8.kubernetes.api.model.extensions.Deployment; -import io.fabric8.kubernetes.api.model.extensions.DeploymentBuilder; -import io.fabric8.kubernetes.client.KubernetesClientException; -import io.fabric8.kubernetes.client.Watcher; -import io.fabric8.kubernetes.client.dsl.ExecWatch; -import io.fabric8.kubernetes.client.dsl.LogWatch; -import io.fabric8.kubernetes.client.dsl.Resource; -import io.fabric8.kubernetes.client.utils.InputStreamPumper; -import io.fabric8.openshift.api.model.DeploymentConfig; -import io.fabric8.openshift.api.model.DoneableDeploymentConfig; -import io.fabric8.openshift.api.model.Image; -import io.fabric8.openshift.api.model.ImageStream; -import io.fabric8.openshift.api.model.ImageStreamTag; -import io.fabric8.openshift.client.DefaultOpenShiftClient; -import io.fabric8.openshift.client.OpenShiftClient; -import io.fabric8.openshift.client.OpenShiftConfig; -import io.fabric8.openshift.client.dsl.DeployableScalableResource; -import java.io.BufferedReader; -import java.io.IOException; -import java.io.InputStream; -import java.io.InputStreamReader; -import java.net.URLEncoder; -import java.text.DateFormat; -import java.text.SimpleDateFormat; -import java.util.ArrayList; -import java.util.Arrays; -import java.util.Collections; -import java.util.Date; -import java.util.HashMap; -import java.util.List; -import java.util.Map; -import java.util.Set; -import java.util.TimeZone; -import java.util.concurrent.CountDownLatch; -import java.util.concurrent.ExecutorService; -import java.util.concurrent.Executors; -import java.util.concurrent.Future; -import java.util.regex.Matcher; -import java.util.regex.Pattern; -import java.util.stream.Collectors; -import java.util.stream.Stream; -import javax.inject.Inject; -import javax.inject.Named; -import javax.inject.Singleton; -import okhttp3.OkHttpClient; -import org.eclipse.che.api.core.notification.EventService; -import org.eclipse.che.api.core.notification.EventSubscriber; -import org.eclipse.che.api.workspace.server.event.ServerIdleEvent; -import org.eclipse.che.commons.annotation.Nullable; -import org.eclipse.che.plugin.docker.client.DockerApiVersionPathPrefixProvider; -import org.eclipse.che.plugin.docker.client.DockerConnector; -import org.eclipse.che.plugin.docker.client.DockerConnectorConfiguration; -import org.eclipse.che.plugin.docker.client.DockerRegistryAuthResolver; -import org.eclipse.che.plugin.docker.client.Exec; -import org.eclipse.che.plugin.docker.client.LogMessage; -import org.eclipse.che.plugin.docker.client.MessageProcessor; -import org.eclipse.che.plugin.docker.client.ProgressMonitor; -import org.eclipse.che.plugin.docker.client.connection.DockerConnectionFactory; -import org.eclipse.che.plugin.docker.client.exception.ImageNotFoundException; -import org.eclipse.che.plugin.docker.client.json.ContainerConfig; -import org.eclipse.che.plugin.docker.client.json.ContainerCreated; -import org.eclipse.che.plugin.docker.client.json.ContainerInfo; -import org.eclipse.che.plugin.docker.client.json.ContainerListEntry; -import org.eclipse.che.plugin.docker.client.json.ContainerProcesses; -import org.eclipse.che.plugin.docker.client.json.ContainerState; -import org.eclipse.che.plugin.docker.client.json.Event; -import org.eclipse.che.plugin.docker.client.json.Filters; -import org.eclipse.che.plugin.docker.client.json.HostConfig; -import org.eclipse.che.plugin.docker.client.json.ImageConfig; -import org.eclipse.che.plugin.docker.client.json.ImageInfo; -import org.eclipse.che.plugin.docker.client.json.NetworkCreated; -import org.eclipse.che.plugin.docker.client.json.NetworkSettings; -import org.eclipse.che.plugin.docker.client.json.PortBinding; -import org.eclipse.che.plugin.docker.client.json.SystemInfo; -import org.eclipse.che.plugin.docker.client.json.Version; -import org.eclipse.che.plugin.docker.client.json.network.ContainerInNetwork; -import org.eclipse.che.plugin.docker.client.json.network.EndpointConfig; -import org.eclipse.che.plugin.docker.client.json.network.Ipam; -import org.eclipse.che.plugin.docker.client.json.network.IpamConfig; -import org.eclipse.che.plugin.docker.client.json.network.Network; -import org.eclipse.che.plugin.docker.client.params.CommitParams; -import org.eclipse.che.plugin.docker.client.params.CreateContainerParams; -import org.eclipse.che.plugin.docker.client.params.CreateExecParams; -import org.eclipse.che.plugin.docker.client.params.GetContainerLogsParams; -import org.eclipse.che.plugin.docker.client.params.GetEventsParams; -import org.eclipse.che.plugin.docker.client.params.GetResourceParams; -import org.eclipse.che.plugin.docker.client.params.InspectImageParams; -import org.eclipse.che.plugin.docker.client.params.KillContainerParams; -import org.eclipse.che.plugin.docker.client.params.PullParams; -import org.eclipse.che.plugin.docker.client.params.PutResourceParams; -import org.eclipse.che.plugin.docker.client.params.RemoveContainerParams; -import org.eclipse.che.plugin.docker.client.params.RemoveImageParams; -import org.eclipse.che.plugin.docker.client.params.StartContainerParams; -import org.eclipse.che.plugin.docker.client.params.StartExecParams; -import org.eclipse.che.plugin.docker.client.params.StopContainerParams; -import org.eclipse.che.plugin.docker.client.params.TagParams; -import org.eclipse.che.plugin.docker.client.params.TopParams; -import org.eclipse.che.plugin.docker.client.params.network.ConnectContainerToNetworkParams; -import org.eclipse.che.plugin.docker.client.params.network.CreateNetworkParams; -import org.eclipse.che.plugin.docker.client.params.network.DisconnectContainerFromNetworkParams; -import org.eclipse.che.plugin.docker.client.params.network.GetNetworksParams; -import org.eclipse.che.plugin.docker.client.params.network.InspectNetworkParams; -import org.eclipse.che.plugin.docker.client.params.network.RemoveNetworkParams; -import org.eclipse.che.plugin.openshift.client.exception.OpenShiftException; -import org.eclipse.che.plugin.openshift.client.kubernetes.KubernetesContainer; -import org.eclipse.che.plugin.openshift.client.kubernetes.KubernetesEnvVar; -import org.eclipse.che.plugin.openshift.client.kubernetes.KubernetesExecHolder; -import org.eclipse.che.plugin.openshift.client.kubernetes.KubernetesLabelConverter; -import org.eclipse.che.plugin.openshift.client.kubernetes.KubernetesOutputAdapter; -import org.eclipse.che.plugin.openshift.client.kubernetes.KubernetesService; -import org.eclipse.che.plugin.openshift.client.kubernetes.KubernetesStringUtils; -import org.slf4j.Logger; -import org.slf4j.LoggerFactory; - -/** - * Client for OpenShift API. - * - * @author Mario Loriedo (mloriedo@redhat.com) - * @author Angel Misevski (amisevsk@redhat.com) - * @author Ilya Buziuk (ibuziuk@redhat.com) - */ -@Singleton -public class OpenShiftConnector extends DockerConnector { - private static final Logger LOG = LoggerFactory.getLogger(OpenShiftConnector.class); - public static final String CHE_OPENSHIFT_RESOURCES_PREFIX = "che-ws-"; - public static final String OPENSHIFT_DEPLOYMENT_LABEL = "deployment"; - public static final String CHE_MOUNTED_WORKSPACE_FOLDER = "/workspace-logs"; - public static final String WORKSPACE_LOGS_FOLDER_SUFFIX = "-logs"; - - private static final String CHE_CONTAINER_IDENTIFIER_LABEL_KEY = "cheContainerIdentifier"; - private static final String CHE_DEFAULT_EXTERNAL_ADDRESS = "172.17.0.1"; - private static final String CHE_WORKSPACE_ID_ENV_VAR = "CHE_WORKSPACE_ID"; - private static final String CHE_IS_DEV_MACHINE_ENV_VAR = "CHE_IS_DEV_MACHINE"; - private static final int CHE_WORKSPACE_AGENT_PORT = 4401; - private static final int CHE_TERMINAL_AGENT_PORT = 4411; - private static final String DOCKER_PROTOCOL_PORT_DELIMITER = "/"; - private static final int OPENSHIFT_WAIT_POD_TIMEOUT = 240; - private static final int OPENSHIFT_WAIT_POD_DELAY = 1000; - private static final int OPENSHIFT_IMAGESTREAM_WAIT_DELAY = 2000; - private static final int OPENSHIFT_IMAGESTREAM_MAX_WAIT_COUNT = 30; - private static final long OPENSHIFT_POD_TERMINATION_GRACE_PERIOD = 0; - - private static final String OPENSHIFT_POD_STATUS_RUNNING = "Running"; - private static final String OPENSHIFT_VOLUME_STORAGE_CLASS = - "volume.beta.kubernetes.io/storage-class"; - private static final String OPENSHIFT_VOLUME_STORAGE_CLASS_NAME = "che-workspace"; - private static final String OPENSHIFT_IMAGE_PULL_POLICY_IFNOTPRESENT = "IfNotPresent"; - - private static final String IDLING_ALPHA_OPENSHIFT_IO_IDLED_AT = - "idling.alpha.openshift.io/idled-at"; - private static final String IDLING_ALPHA_OPENSHIFT_IO_PREVIOUS_SCALE = - "idling.alpha.openshift.io/previous-scale"; - private static final String OPENSHIFT_CHE_SERVER_DEPLOYMENT_NAME = "che"; - private static final String OPENSHIFT_CHE_SERVER_SERVICE_NAME = "che-host"; - private static final String IDLING_ALPHA_OPENSHIFT_IO_UNIDLE_TARGETS = - "idling.alpha.openshift.io/unidle-targets"; - private static final String ISO_8601_DATE_FORMAT = "yyyy-MM-dd'T'HH:mm:ssX"; - - /** Regexp to extract port (under the form 22/tcp or 4401/tcp, etc.) from label references */ - public static final String LABEL_CHE_SERVER_REF_KEY = "^che:server:(.*):ref$"; - - private static final String PS_COMMAND = "ps"; - private static final String TOP_REGEX_PATTERN = " +"; - - private Map execMap = new HashMap<>(); - - private final String openShiftCheProjectName; - private final int openShiftLivenessProbeDelay; - private final int openShiftLivenessProbeTimeout; - private final String workspacesPersistentVolumeClaim; - private final String workspacesPvcQuantity; - private final String cheWorkspaceStorage; - private final String cheWorkspaceProjectsStorage; - private final String cheServerExternalAddress; - private final String cheWorkspaceMemoryLimit; - private final String cheWorkspaceMemoryRequest; - private final boolean secureRoutes; - private final boolean createWorkspaceDirs; - private final OpenShiftPvcHelper openShiftPvcHelper; - private final OpenShiftRouteCreator openShiftRouteCreator; - private final OpenShiftDeploymentCleaner openShiftDeploymentCleaner; - - @Inject - public OpenShiftConnector( - DockerConnectorConfiguration connectorConfiguration, - DockerConnectionFactory connectionFactory, - DockerRegistryAuthResolver authResolver, - DockerApiVersionPathPrefixProvider dockerApiVersionPathPrefixProvider, - OpenShiftPvcHelper openShiftPvcHelper, - OpenShiftRouteCreator openShiftRouteCreator, - OpenShiftDeploymentCleaner openShiftDeploymentCleaner, - EventService eventService, - @Nullable @Named("che.docker.ip.external") String cheServerExternalAddress, - @Named("che.openshift.project") String openShiftCheProjectName, - @Named("che.openshift.liveness.probe.delay") int openShiftLivenessProbeDelay, - @Named("che.openshift.liveness.probe.timeout") int openShiftLivenessProbeTimeout, - @Named("che.openshift.workspaces.pvc.name") String workspacesPersistentVolumeClaim, - @Named("che.openshift.workspaces.pvc.quantity") String workspacesPvcQuantity, - @Named("che.workspace.storage") String cheWorkspaceStorage, - @Named("che.workspace.projects.storage") String cheWorkspaceProjectsStorage, - @Nullable @Named("che.openshift.workspace.memory.request") String cheWorkspaceMemoryRequest, - @Nullable @Named("che.openshift.workspace.memory.override") String cheWorkspaceMemoryLimit, - @Named("che.openshift.secure.routes") boolean secureRoutes, - @Named("che.openshift.precreate.workspace.dirs") boolean createWorkspaceDirs) { - - super( - connectorConfiguration, - connectionFactory, - authResolver, - dockerApiVersionPathPrefixProvider); - this.cheServerExternalAddress = cheServerExternalAddress; - this.openShiftCheProjectName = openShiftCheProjectName; - this.openShiftLivenessProbeDelay = openShiftLivenessProbeDelay; - this.openShiftLivenessProbeTimeout = openShiftLivenessProbeTimeout; - this.workspacesPersistentVolumeClaim = workspacesPersistentVolumeClaim; - this.workspacesPvcQuantity = workspacesPvcQuantity; - this.cheWorkspaceStorage = cheWorkspaceStorage; - this.cheWorkspaceProjectsStorage = cheWorkspaceProjectsStorage; - this.cheWorkspaceMemoryRequest = cheWorkspaceMemoryRequest; - this.cheWorkspaceMemoryLimit = cheWorkspaceMemoryLimit; - this.secureRoutes = secureRoutes; - this.createWorkspaceDirs = createWorkspaceDirs; - this.openShiftPvcHelper = openShiftPvcHelper; - this.openShiftRouteCreator = openShiftRouteCreator; - this.openShiftDeploymentCleaner = openShiftDeploymentCleaner; - eventService.subscribe( - new EventSubscriber() { - - @Override - public void onEvent(ServerIdleEvent event) { - idleCheServer(event); - } - }); - } - - @Override - public Version getVersion() throws IOException { - OpenShiftClient openShiftClient = new DefaultOpenShiftClient(); - final OpenShiftClientExtension client = - new OpenShiftClientExtension( - openShiftClient.adapt(OkHttpClient.class), - OpenShiftConfig.wrap(openShiftClient.getConfiguration())); - String versionString = client.getVersion(); - if (isNullOrEmpty(versionString)) { - return null; - } - final Gson gson = new GsonBuilder().disableHtmlEscaping().create(); - OpenShiftVersion openShiftVersion = gson.fromJson(versionString, OpenShiftVersion.class); - Version version = openShiftVersion.getVersion(); - version.setApiVersion(client.getApiVersion()); - return version; - } - - private void idleCheServer(ServerIdleEvent event) { - try (DefaultOpenShiftClient openShiftClient = new DefaultOpenShiftClient()) { - DeployableScalableResource - deploymentConfigResource = - openShiftClient - .deploymentConfigs() - .inNamespace(openShiftCheProjectName) - .withName(OPENSHIFT_CHE_SERVER_DEPLOYMENT_NAME); - DeploymentConfig deploymentConfig = deploymentConfigResource.get(); - if (deploymentConfig == null) { - LOG.warn( - String.format("Deployment config %s not found", OPENSHIFT_CHE_SERVER_DEPLOYMENT_NAME)); - return; - } - Integer replicas = deploymentConfig.getSpec().getReplicas(); - if (replicas != null && replicas > 0) { - Resource endpointResource = - openShiftClient - .endpoints() - .inNamespace(openShiftCheProjectName) - .withName(OPENSHIFT_CHE_SERVER_SERVICE_NAME); - Endpoints endpoint = endpointResource.get(); - if (endpoint == null) { - LOG.warn(String.format("Endpoint %s not found", OPENSHIFT_CHE_SERVER_SERVICE_NAME)); - return; - } - Map annotations = deploymentConfig.getMetadata().getAnnotations(); - if (annotations == null) { - annotations = new HashMap<>(); - deploymentConfig.getMetadata().setAnnotations(annotations); - } - TimeZone tz = TimeZone.getTimeZone("UTC"); - DateFormat df = new SimpleDateFormat(ISO_8601_DATE_FORMAT); - df.setTimeZone(tz); - String idle = df.format(new Date()); - annotations.put(IDLING_ALPHA_OPENSHIFT_IO_IDLED_AT, idle); - annotations.put(IDLING_ALPHA_OPENSHIFT_IO_PREVIOUS_SCALE, "1"); - deploymentConfig.getSpec().setReplicas(0); - deploymentConfigResource.patch(deploymentConfig); - Map endpointAnnotations = endpoint.getMetadata().getAnnotations(); - if (endpointAnnotations == null) { - endpointAnnotations = new HashMap<>(); - endpoint.getMetadata().setAnnotations(endpointAnnotations); - } - endpointAnnotations.put(IDLING_ALPHA_OPENSHIFT_IO_IDLED_AT, idle); - endpointAnnotations.put( - IDLING_ALPHA_OPENSHIFT_IO_UNIDLE_TARGETS, - "[{\"kind\":\"DeploymentConfig\",\"name\":\"" - + OPENSHIFT_CHE_SERVER_DEPLOYMENT_NAME - + "\",\"replicas\":1}]"); - endpointResource.patch(endpoint); - LOG.info("Che server has been idled"); - } - } - } - - /** - * Gets exposed ports for both container and image. - * - * @param containerConfig the configuration of the container - * @param imageConfig the configuration of the image - * @return all exposed ports - */ - protected Set getExposedPorts(ContainerConfig containerConfig, ImageConfig imageConfig) { - - Map> containerExposedPortsMap = containerConfig.getExposedPorts(); - if (containerExposedPortsMap == null) { - containerExposedPortsMap = Collections.emptyMap(); - } - Map imageExposedPortsMap = - imageConfig.getExposedPorts(); - if (imageExposedPortsMap == null) { - imageExposedPortsMap = Collections.emptyMap(); - } - - Set containerExposedPorts = containerExposedPortsMap.keySet(); - Set imageExposedPorts = imageExposedPortsMap.keySet(); - return ImmutableSet.builder() - .addAll(containerExposedPorts) - .addAll(imageExposedPorts) - .build(); - } - - /** - * Gets labels for both container and image. - * - * @param containerConfig the configuration of the container - * @param imageConfig the configuration of the image - * @return all labels found - */ - protected Map getLabels( - ContainerConfig containerConfig, ImageConfig imageConfig) { - - // first, get labels defined in the container configuration - Map containerLabels = containerConfig.getLabels(); - if (containerLabels == null) { - containerLabels = Collections.emptyMap(); - } - - // Also, get labels from the image itself - Map imageLabels = imageConfig.getLabels(); - if (imageLabels == null) { - imageLabels = Collections.emptyMap(); - } - - // Now merge all labels - final Map allLabels = new HashMap<>(containerLabels); - allLabels.putAll(imageLabels); - return allLabels; - } - - /** - * Gets the mapping between the port (with format 8080/tcp) and the associated label (if found) - * - * @param labels the mapping for known port labels - * @param exposedPorts the ports that are exposed - * @return a map that allow to get the service name for a given exposed port - */ - protected Map getPortsToRefName( - Map labels, Set exposedPorts) { - - // Ports to known/unknown ref is map like : 8080/tcp <--> myCustomLabel - Pattern pattern = Pattern.compile(LABEL_CHE_SERVER_REF_KEY); - Map portsToKnownRefName = - labels - .entrySet() - .stream() - .filter(map -> pattern.matcher(map.getKey()).matches()) - .collect( - Collectors.toMap( - p -> { - Matcher matcher = pattern.matcher(p.getKey()); - matcher.matches(); - String val = matcher.group(1); - return val.contains("/") ? val : val.concat("/tcp"); - }, - p -> p.getValue())); - - // add to this map only port without a known ref name - Map portsToUnkownRefName = - exposedPorts - .stream() - .filter((port) -> !portsToKnownRefName.containsKey(port)) - .collect(Collectors.toMap(p -> p, p -> "server-" + p.replace('/', '-'))); - - // list of all ports with refName (known/unknown) - Map portsToRefName = new HashMap(portsToKnownRefName); - portsToRefName.putAll(portsToUnkownRefName); - - return portsToRefName; - } - - /** - * @param createContainerParams - * @return - * @throws IOException - */ - @Override - public ContainerCreated createContainer(CreateContainerParams createContainerParams) - throws IOException { - String containerName = - KubernetesStringUtils.convertToContainerName(createContainerParams.getContainerName()); - String workspaceID = getCheWorkspaceId(createContainerParams); - - // imageForDocker is the docker version of the image repository. It's needed for other - // OpenShiftConnector API methods, but is not acceptable as an OpenShift name - String imageForDocker = createContainerParams.getContainerConfig().getImage(); - // imageStreamTagName is imageForDocker converted into a form that can be used - // in OpenShift - String imageStreamTagName = KubernetesStringUtils.convertPullSpecToTagName(imageForDocker); - - // imageStreamTagName is not enough to fill out a pull spec; it is only the tag, so we - // have to get the ImageStreamTag from the tag, and then get the full ImageStreamTag name - // from that tag. This works because the tags used in Che are unique. - ImageStreamTag imageStreamTag = getImageStreamTagFromRepo(imageStreamTagName); - String imageStreamTagPullSpec = imageStreamTag.getMetadata().getName(); - - // Next we need to get the address of the registry where the ImageStreamTag is stored - String imageStreamName = - KubernetesStringUtils.getImageStreamNameFromPullSpec(imageStreamTagPullSpec); - - ImageStream imageStream; - try (OpenShiftClient openShiftClient = new DefaultOpenShiftClient()) { - imageStream = - openShiftClient - .imageStreams() - .inNamespace(openShiftCheProjectName) - .withName(imageStreamName) - .get(); - if (imageStream == null) { - throw new OpenShiftException("ImageStream not found"); - } - } - String registryAddress = imageStream.getStatus().getDockerImageRepository().split("/")[0]; - - // The above needs to be combined to form a pull spec that will work when defining a container. - String dockerPullSpec = - String.format("%s/%s/%s", registryAddress, openShiftCheProjectName, imageStreamTagPullSpec); - - ContainerConfig containerConfig = createContainerParams.getContainerConfig(); - ImageConfig imageConfig = inspectImage(InspectImageParams.create(imageForDocker)).getConfig(); - - final Set exposedPorts = getExposedPorts(containerConfig, imageConfig); - final Map labels = getLabels(containerConfig, imageConfig); - Map portsToRefName = getPortsToRefName(labels, exposedPorts); - - String[] envVariables = createContainerParams.getContainerConfig().getEnv(); - String[] volumes = createContainerParams.getContainerConfig().getHostConfig().getBinds(); - - Map additionalLabels = createContainerParams.getContainerConfig().getLabels(); - String networkName = - createContainerParams.getContainerConfig().getHostConfig().getNetworkMode(); - EndpointConfig endpointConfig = - createContainerParams - .getContainerConfig() - .getNetworkingConfig() - .getEndpointsConfig() - .get(networkName); - String[] endpointAliases = endpointConfig != null ? endpointConfig.getAliases() : new String[0]; - - Map resourceLimits = new HashMap<>(); - if (!isNullOrEmpty(cheWorkspaceMemoryLimit)) { - LOG.info( - "Che property 'che.openshift.workspace.memory.override' " - + "used to override workspace memory limit to {}.", - cheWorkspaceMemoryLimit); - resourceLimits.put("memory", new Quantity(cheWorkspaceMemoryLimit)); - } else { - long memoryLimitBytes = - createContainerParams.getContainerConfig().getHostConfig().getMemory(); - String memoryLimit = Long.toString(memoryLimitBytes / 1048576) + "Mi"; - LOG.info("Creating workspace pod with memory limit of {}.", memoryLimit); - resourceLimits.put("memory", new Quantity(cheWorkspaceMemoryLimit)); - } - - Map resourceRequests = new HashMap<>(); - if (!isNullOrEmpty(cheWorkspaceMemoryRequest)) { - resourceRequests.put("memory", new Quantity(cheWorkspaceMemoryRequest)); - } - - String deploymentName; - String serviceName; - if (isDevMachine(createContainerParams)) { - serviceName = deploymentName = CHE_OPENSHIFT_RESOURCES_PREFIX + workspaceID; - } else { - if (endpointAliases.length > 0) { - serviceName = endpointAliases[0]; - deploymentName = CHE_OPENSHIFT_RESOURCES_PREFIX + serviceName; - } else { - // Should never happen - serviceName = - deploymentName = - CHE_OPENSHIFT_RESOURCES_PREFIX + KubernetesStringUtils.generateWorkspaceID(); - } - } - - String containerID; - OpenShiftClient openShiftClient = new DefaultOpenShiftClient(); - try { - createOpenShiftService( - deploymentName, - serviceName, - exposedPorts, - portsToRefName, - additionalLabels, - endpointAliases); - createOpenShiftDeployment( - deploymentName, - dockerPullSpec, - containerName, - exposedPorts, - portsToRefName, - envVariables, - volumes, - resourceLimits, - resourceRequests); - - containerID = waitAndRetrieveContainerID(deploymentName); - if (containerID == null) { - throw new OpenShiftException( - "Failed to get the ID of the container running in the OpenShift pod"); - } - } catch (IOException | KubernetesClientException e) { - // Make sure we clean up deployment and service in case of an error -- otherwise Che can end up - // in an inconsistent state. - LOG.info("Error while creating Pod, removing deployment"); - LOG.info(e.getMessage()); - openShiftDeploymentCleaner.cleanDeploymentResources(deploymentName, openShiftCheProjectName); - openShiftClient.resource(imageStreamTag).delete(); - throw e; - } finally { - openShiftClient.close(); - } - - return new ContainerCreated(containerID, null); - } - - @Override - public void startContainer(final StartContainerParams params) throws IOException { - // Not used in OpenShift - } - - @Override - public void stopContainer(StopContainerParams params) throws IOException { - // Not used in OpenShift - } - - @Override - public int waitContainer(String container) throws IOException { - // Not used in OpenShift - return 0; - } - - @Override - public void killContainer(KillContainerParams params) throws IOException { - // Not used in OpenShift - } - - @Override - public List listContainers() throws IOException { - // Implement once 'Service Provider Interface' is defined - return Collections.emptyList(); - } - - @Override - public InputStream getResource(GetResourceParams params) throws IOException { - throw new UnsupportedOperationException( - "'getResource' is currently not supported by OpenShift"); - } - - @Override - public void putResource(PutResourceParams params) throws IOException { - throw new UnsupportedOperationException( - "'putResource' is currently not supported by OpenShift"); - } - - @Override - public ContainerInfo inspectContainer(String containerId) throws IOException { - - Pod pod = getChePodByContainerId(containerId); - if (pod == null) { - LOG.warn("No Pod found by container ID {}", containerId); - return null; - } - - String deploymentName = pod.getMetadata().getLabels().get(OPENSHIFT_DEPLOYMENT_LABEL); - if (deploymentName == null) { - LOG.warn( - "No label {} found for Pod {}", OPENSHIFT_DEPLOYMENT_LABEL, pod.getMetadata().getName()); - return null; - } - - Deployment deployment; - try (OpenShiftClient client = new DefaultOpenShiftClient()) { - deployment = client.extensions().deployments().withName(deploymentName).get(); - if (deployment == null) { - LOG.warn( - "No deployment matching label {}={} found", OPENSHIFT_DEPLOYMENT_LABEL, deploymentName); - return null; - } - } - - List deploymentContainers = - deployment.getSpec().getTemplate().getSpec().getContainers(); - if (deploymentContainers.size() > 1) { - throw new OpenShiftException("Multiple Containers found in Pod."); - } else if (deploymentContainers.size() < 1 - || isNullOrEmpty(deploymentContainers.get(0).getImage())) { - throw new OpenShiftException(String.format("Container %s not found", containerId)); - } - String podPullSpec = deploymentContainers.get(0).getImage(); - - String tagName = KubernetesStringUtils.getTagNameFromPullSpec(podPullSpec); - - ImageStreamTag tag = getImageStreamTagFromRepo(tagName); - ImageInfo imageInfo = getImageInfoFromTag(tag); - - Service svc = getCheServiceBySelector(OPENSHIFT_DEPLOYMENT_LABEL, deploymentName); - if (svc == null) { - LOG.warn("No Service found by selector {}={}", OPENSHIFT_DEPLOYMENT_LABEL, deploymentName); - return null; - } - - return createContainerInfo(svc, imageInfo, pod, containerId); - } - - @Override - public void removeContainer(final RemoveContainerParams params) throws IOException { - String deploymentName = getDeploymentName(params); - openShiftDeploymentCleaner.cleanDeploymentResources(deploymentName, openShiftCheProjectName); - } - - @Override - public NetworkCreated createNetwork(CreateNetworkParams params) throws IOException { - // Not needed in OpenShift - return new NetworkCreated().withId(params.getNetwork().getName()); - } - - @Override - public void removeNetwork(String netId) throws IOException { - // Not needed in OpenShift - } - - @Override - public void removeNetwork(RemoveNetworkParams params) throws IOException { - // Not needed in OpenShift - } - - @Override - public void connectContainerToNetwork(String netId, String containerId) throws IOException { - // Not needed in OpenShift - } - - @Override - public void connectContainerToNetwork(ConnectContainerToNetworkParams params) throws IOException { - // Not used in OpenShift - } - - @Override - public void disconnectContainerFromNetwork(String netId, String containerId) throws IOException { - // Not needed in OpenShift - } - - @Override - public void disconnectContainerFromNetwork(DisconnectContainerFromNetworkParams params) - throws IOException { - // Not needed in OpenShift - } - - @Override - public Network inspectNetwork(String netId) throws IOException { - return inspectNetwork(InspectNetworkParams.create(netId)); - } - - @Override - public Network inspectNetwork(InspectNetworkParams params) throws IOException { - String netId = params.getNetworkId(); - ServiceList services; - - try (OpenShiftClient openShiftClient = new DefaultOpenShiftClient()) { - services = openShiftClient.services().inNamespace(this.openShiftCheProjectName).list(); - } - - Map containers = new HashMap<>(); - for (Service svc : services.getItems()) { - String selector = svc.getSpec().getSelector().get(OPENSHIFT_DEPLOYMENT_LABEL); - if (selector == null || !selector.startsWith(CHE_OPENSHIFT_RESOURCES_PREFIX)) { - continue; - } - - PodList pods; - try (OpenShiftClient openShiftClient = new DefaultOpenShiftClient()) { - pods = - openShiftClient - .pods() - .inNamespace(openShiftCheProjectName) - .withLabel(OPENSHIFT_DEPLOYMENT_LABEL, selector) - .list(); - } - - for (Pod pod : pods.getItems()) { - String podName = pod.getMetadata().getName(); - ContainerInNetwork container = - new ContainerInNetwork() - .withName(podName) - .withIPv4Address(svc.getSpec().getClusterIP()); - String podId = - KubernetesStringUtils.getLabelFromContainerID( - pod.getMetadata().getLabels().get(CHE_CONTAINER_IDENTIFIER_LABEL_KEY)); - if (podId == null) { - continue; - } - containers.put(podId, container); - } - } - - List ipamConfig = new ArrayList<>(); - Ipam ipam = - new Ipam().withDriver("bridge").withOptions(Collections.emptyMap()).withConfig(ipamConfig); - - return new Network() - .withName("OpenShift") - .withId(netId) - .withContainers(containers) - .withLabels(Collections.emptyMap()) - .withOptions(Collections.emptyMap()) - .withDriver("default") - .withIPAM(ipam) - .withScope("local") - .withInternal(false) - .withEnableIPv6(false); - } - - /** - * In OpenShift, there is only one network in the Docker sense, and it is similar to the default - * bridge network. Rather than implementing all of the filters available in the Docker API, we - * only implement {@code type=["custom"|"builtin"]}. - * - *

If type is "custom", null is returned. Otherwise, the default network is returned, and the - * result is effectively the same as {@link DockerConnector#inspectNetwork(String)} where the - * network is "bridge". - * - * @see DockerConnector#getNetworks() - */ - @Override - public List getNetworks(GetNetworksParams params) throws IOException { - Filters filters = params.getFilters(); - List networks = new ArrayList<>(); - - List typeFilters = filters.getFilter("type"); - if (typeFilters == null || !typeFilters.contains("custom")) { - Network network = inspectNetwork("openshift"); - networks.add(network); - } - return networks; - } - - /** - * Creates an ImageStream that tracks the repository. - * - *

Note: This method does not cause the relevant image to actually be pulled to the local - * repository, but creating the ImageStream is necessary as it is used to obtain the address of - * the internal Docker registry later. - * - * @see DockerConnector#pull(PullParams, ProgressMonitor) - */ - @Override - public void pull(final PullParams params, final ProgressMonitor progressMonitor) - throws IOException { - - String repo = params.getFullRepo(); // image to be pulled - String tag = params.getTag(); // e.g. latest, usually - - String imageStreamName = KubernetesStringUtils.convertPullSpecToImageStreamName(repo); - ImageStream existingImageStream; - - try (OpenShiftClient openShiftClient = new DefaultOpenShiftClient()) { - existingImageStream = - openShiftClient - .imageStreams() - .inNamespace(openShiftCheProjectName) - .withName(imageStreamName) - .get(); - } - - if (existingImageStream == null) { - try (OpenShiftClient openShiftClient = new DefaultOpenShiftClient()) { - openShiftClient - .imageStreams() - .inNamespace(openShiftCheProjectName) - .createNew() - .withNewMetadata() - .withName(imageStreamName) // imagestream id - .endMetadata() - .withNewSpec() - .addNewTag() - .withName(tag) - .endTag() - .withDockerImageRepository(repo) // tracking repo - .endSpec() - .withNewStatus() - .withDockerImageRepository("") - .endStatus() - .done(); - } - } - - // Wait for Image metadata to be obtained. - ImageStream createdImageStream; - for (int waitCount = 0; waitCount < OPENSHIFT_IMAGESTREAM_MAX_WAIT_COUNT; waitCount++) { - try { - Thread.sleep(OPENSHIFT_IMAGESTREAM_WAIT_DELAY); - } catch (InterruptedException e) { - Thread.currentThread().interrupt(); - } - - try (OpenShiftClient openShiftClient = new DefaultOpenShiftClient()) { - createdImageStream = - openShiftClient - .imageStreams() - .inNamespace(openShiftCheProjectName) - .withName(imageStreamName) - .get(); - } - - if (createdImageStream != null - && createdImageStream.getStatus().getDockerImageRepository() != null) { - LOG.info(String.format("Created ImageStream %s.", imageStreamName)); - return; - } - } - - throw new OpenShiftException( - String.format("Failed to create ImageStream %s.", imageStreamName)); - } - - /** - * Creates an ImageStreamTag that tracks a given image. - * - *

Docker tags are used extensively in Che: all workspaces run on tagged images tracking built - * stacks. For new workspaces, or when snapshots are not used, the tracked image is e.g. {@code - * eclipse/ubuntu_jdk8}, whereas for snapshotted workspaces, the tracked image is the snapshot - * (e.g. {@code machine_snapshot-}. - * - *

Since OpenShift does not support the same tagging functionality as Docker, tags are - * implemented as ImageStreamTags, where the {@code From} field is always the original image, and - * the ImageStreamTag name is derived from both the source image and the target image. This - * replicates functionality for Che in Docker, while working differently under the hood. The - * ImageStream name is derived from the image that is being tracked (e.g. {@code - * eclipse/ubuntu_jdk8}), while the tag name is derived from the target image (e.g. {@code - * eclipse-che/che_workspace}). - * - * @see DockerConnector#tag(TagParams) - */ - @Override - public void tag(final TagParams params) throws IOException { - // E.g. `docker tag sourceImage targetImage` - String paramsSourceImage = params.getImage(); // e.g. eclipse/ubuntu_jdk8 - String targetImage = params.getRepository(); // e.g. eclipse-che/ - String paramsTag = params.getTag(); - - String sourceImage = KubernetesStringUtils.stripTagFromPullSpec(paramsSourceImage); - String tag = KubernetesStringUtils.getTagNameFromPullSpec(paramsSourceImage); - if (isNullOrEmpty(tag)) { - tag = !isNullOrEmpty(paramsTag) ? paramsTag : "latest"; - } - - String sourceImageWithTag; - // Check if sourceImage matches existing imageStreamTag (e.g. when tagging a snapshot) - try { - String sourceImageTagName = KubernetesStringUtils.convertPullSpecToTagName(sourceImage); - ImageStreamTag existingTag = getImageStreamTagFromRepo(sourceImageTagName); - sourceImageWithTag = existingTag.getTag().getFrom().getName(); - } catch (IOException e) { - // Image not found. - sourceImageWithTag = String.format("%s:%s", sourceImage, tag); - } - - String imageStreamTagName = - KubernetesStringUtils.createImageStreamTagName(sourceImageWithTag, targetImage); - - createImageStreamTag(sourceImageWithTag, imageStreamTagName); - } - - @Override - public ImageInfo inspectImage(InspectImageParams params) throws IOException { - - String image = KubernetesStringUtils.getImageStreamNameFromPullSpec(params.getImage()); - - String imageStreamTagName = KubernetesStringUtils.convertPullSpecToTagName(image); - ImageStreamTag imageStreamTag = getImageStreamTagFromRepo(imageStreamTagName); - - return getImageInfoFromTag(imageStreamTag); - } - - @Override - public void removeImage(final RemoveImageParams params) throws IOException { - try (OpenShiftClient openShiftClient = new DefaultOpenShiftClient()) { - String image = KubernetesStringUtils.getImageStreamNameFromPullSpec(params.getImage()); - String imageStreamTagName = KubernetesStringUtils.convertPullSpecToTagName(image); - ImageStreamTag imageStreamTag = getImageStreamTagFromRepo(imageStreamTagName); - openShiftClient.resource(imageStreamTag).delete(); - } - } - - /** - * OpenShift does not support taking image snapshots since the underlying assumption is that Pods - * are largely immutable (and so any snapshot would be identical to the image used to create the - * pod). Che uses docker commit to create machine snapshots, which are used to restore workspaces. - * To emulate this functionality in OpenShift, commit actually creates a new ImageStreamTag by - * calling {@link OpenShiftConnector#tag(TagParams)} named for the snapshot that would be created. - * - * @see DockerConnector#commit(CommitParams) - */ - @Override - public String commit(final CommitParams params) throws IOException { - String repo = params.getRepository(); // e.g. machine_snapshot_mdkfmksdfm - String container = params.getContainer(); // container ID - - Pod pod = getChePodByContainerId(container); - String image = pod.getSpec().getContainers().get(0).getImage(); - String imageStreamTagName = KubernetesStringUtils.getTagNameFromPullSpec(image); - - ImageStreamTag imageStreamTag = getImageStreamTagFromRepo(imageStreamTagName); - String sourcePullSpec = imageStreamTag.getTag().getFrom().getName(); - String trackingRepo = KubernetesStringUtils.stripTagFromPullSpec(sourcePullSpec); - String tag = KubernetesStringUtils.getTagNameFromPullSpec(sourcePullSpec); - - tag(TagParams.create(trackingRepo, repo).withTag(tag)); - - return repo; // Return value not used. - } - - @Override - public void getEvents(final GetEventsParams params, MessageProcessor messageProcessor) { - CountDownLatch waitForClose = new CountDownLatch(1); - Watcher eventWatcher = - new Watcher() { - @Override - public void eventReceived(Action action, io.fabric8.kubernetes.api.model.Event event) { - // Do nothing; - } - - @Override - public void onClose(KubernetesClientException e) { - if (e == null) { - LOG.error("Eventwatch Closed"); - } else { - LOG.error("Eventwatch Closed" + e.getMessage()); - } - waitForClose.countDown(); - } - }; - OpenShiftClient openShiftClient = new DefaultOpenShiftClient(); - openShiftClient.events().inNamespace(openShiftCheProjectName).watch(eventWatcher); - try { - waitForClose.await(); - } catch (InterruptedException e) { - LOG.error("Thread interrupted while waiting for eventWatcher."); - Thread.currentThread().interrupt(); - } finally { - openShiftClient.close(); - } - } - - @Override - public void getContainerLogs( - final GetContainerLogsParams params, MessageProcessor containerLogsProcessor) - throws IOException { - String container = params.getContainer(); // container ID - Pod pod = getChePodByContainerId(container); - if (pod != null) { - String podName = pod.getMetadata().getName(); - boolean[] ret = new boolean[1]; - ret[0] = false; - OpenShiftClient openShiftClient = new DefaultOpenShiftClient(); - try (LogWatch watchLog = - openShiftClient - .pods() - .inNamespace(openShiftCheProjectName) - .withName(podName) - .watchLog()) { - Watcher watcher = - new Watcher() { - - @Override - public void eventReceived(Action action, Pod resource) { - if (action == Action.DELETED) { - ret[0] = true; - } - } - - @Override - public void onClose(KubernetesClientException cause) { - ret[0] = true; - } - }; - openShiftClient - .pods() - .inNamespace(openShiftCheProjectName) - .withName(podName) - .watch(watcher); - Thread.sleep(5000); - InputStream is = watchLog.getOutput(); - BufferedReader bufferedReader = new BufferedReader(new InputStreamReader(is)); - while (!ret[0]) { - String line = bufferedReader.readLine(); - containerLogsProcessor.process(new LogMessage(LogMessage.Type.DOCKER, line)); - } - } catch (InterruptedException e) { - Thread.currentThread().interrupt(); - } catch (IOException e) { - // The kubernetes client throws an exception (Pipe not connected) when pod doesn't contain any logs. - // We can ignore it. - } finally { - openShiftClient.close(); - } - } - } - - @Override - public ContainerProcesses top(final TopParams params) throws IOException { - String containerId = params.getContainer(); - Pod pod = getChePodByContainerId(containerId); - String podName = pod.getMetadata().getName(); - String[] command; - final String[] psArgs = params.getPsArgs(); - if (psArgs != null && psArgs.length != 0) { - int length = psArgs.length + 1; - command = new String[length]; - command[0] = PS_COMMAND; - System.arraycopy(psArgs, 0, command, 1, psArgs.length); - } else { - command = new String[1]; - command[0] = PS_COMMAND; - } - ContainerProcesses processes = new ContainerProcesses(); - OpenShiftClient openShiftClient = new DefaultOpenShiftClient(); - try (ExecWatch watch = - openShiftClient - .pods() - .inNamespace(openShiftCheProjectName) - .withName(podName) - .redirectingOutput() - .redirectingError() - .exec(command)) { - BufferedReader reader = new BufferedReader(new InputStreamReader(watch.getOutput())); - boolean first = true; - int limit = 0; - try { - List procList = new ArrayList<>(); - while (reader.ready()) { - String line = reader.readLine(); - if (line == null || line.isEmpty()) { - continue; - } - if (line.startsWith("rpc error")) { - throw new IOException(line); - } - line = line.trim(); - if (first) { - String[] elements = line.split(TOP_REGEX_PATTERN); - limit = elements.length; - first = false; - processes.setTitles(elements); - } else { - String[] elements = line.split(TOP_REGEX_PATTERN, limit); - procList.add(elements); - } - } - processes.setProcesses(procList.toArray(new String[0][0])); - } catch (IOException e) { - throw new OpenShiftException(e.getMessage()); - } - } catch (KubernetesClientException e) { - throw new OpenShiftException(e.getMessage()); - } - return processes; - } - - @Override - public Exec createExec(final CreateExecParams params) throws IOException { - String[] command = params.getCmd(); - String containerId = params.getContainer(); - - Pod pod = getChePodByContainerId(containerId); - String podName = pod.getMetadata().getName(); - - String execId = KubernetesStringUtils.generateWorkspaceID(); - KubernetesExecHolder execHolder = - new KubernetesExecHolder().withCommand(command).withPod(podName); - execMap.put(execId, execHolder); - - return new Exec(command, execId); - } - - @Override - public void startExec( - final StartExecParams params, @Nullable MessageProcessor execOutputProcessor) - throws IOException { - String execId = params.getExecId(); - - KubernetesExecHolder exec = execMap.get(execId); - - String podName = exec.getPod(); - String[] command = exec.getCommand(); - for (int i = 0; i < command.length; i++) { - command[i] = URLEncoder.encode(command[i], "UTF-8"); - } - - ExecutorService executor = Executors.newFixedThreadPool(2); - OpenShiftClient openShiftClient = new DefaultOpenShiftClient(); - try (ExecWatch watch = - openShiftClient - .pods() - .inNamespace(openShiftCheProjectName) - .withName(podName) - .redirectingOutput() - .redirectingError() - .exec(command); - InputStreamPumper outputPump = - new InputStreamPumper( - watch.getOutput(), - new KubernetesOutputAdapter(LogMessage.Type.STDOUT, execOutputProcessor)); - InputStreamPumper errorPump = - new InputStreamPumper( - watch.getError(), - new KubernetesOutputAdapter(LogMessage.Type.STDERR, execOutputProcessor))) { - Future outFuture = executor.submit(outputPump); - Future errFuture = executor.submit(errorPump); - // Short-term worksaround; the Futures above seem to never finish. - Thread.sleep(2500); - } catch (KubernetesClientException e) { - throw new OpenShiftException(e.getMessage()); - } catch (InterruptedException e) { - Thread.currentThread().interrupt(); - } finally { - execMap.remove(execId); - executor.shutdown(); - openShiftClient.close(); - } - } - - @Override - public SystemInfo getSystemInfo() throws IOException { - OpenShiftClient openShiftClient = new DefaultOpenShiftClient(); - PodList chePods = openShiftClient.pods().inNamespace(this.openShiftCheProjectName).list(); - if (chePods.getItems().size() > 0) { - Pod pod = chePods.getItems().get(0); - Node node = openShiftClient.nodes().withName(pod.getSpec().getNodeName()).get(); - NodeSystemInfo nodeInfo = node.getStatus().getNodeInfo(); - SystemInfo systemInfo = new SystemInfo(); - systemInfo.setKernelVersion(nodeInfo.getKernelVersion()); - systemInfo.setOperatingSystem(nodeInfo.getOperatingSystem()); - systemInfo.setID(node.getMetadata().getUid()); - int containers = - openShiftClient.pods().inNamespace(this.openShiftCheProjectName).list().getItems().size(); - int images = node.getStatus().getImages().size(); - systemInfo.setContainers(containers); - systemInfo.setImages(images); - systemInfo.setName(node.getMetadata().getName()); - String[] labels = - node.getMetadata() - .getLabels() - .entrySet() - .stream() - .map(e -> String.format("%s=%s", e.getKey(), e.getValue())) - .toArray(String[]::new); - systemInfo.setLabels(labels); - return systemInfo; - } else { - throw new OpenShiftException("No pod found"); - } - } - - /** - * Gets the ImageStreamTag corresponding to a given tag name (i.e. without the repository) - * - * @param imageStreamTagName the tag name to search for - * @return - * @throws IOException if either no matching tag is found, or there are multiple matches. - */ - private ImageStreamTag getImageStreamTagFromRepo(String imageStreamTagName) throws IOException { - - // Since repository + tag are limited to 63 chars, it's possible that the entire - // tag name did not fit, so we have to match a substring. - String imageTagTrimmed = - imageStreamTagName.length() > 20 ? imageStreamTagName.substring(0, 20) : imageStreamTagName; - - // Note: ideally, ImageStreamTags could be identified with a label, but it seems like - // ImageStreamTags do not support labels. - List imageStreams; - try (OpenShiftClient openShiftClient = new DefaultOpenShiftClient()) { - imageStreams = - openShiftClient.imageStreamTags().inNamespace(openShiftCheProjectName).list().getItems(); - } - - // We only get ImageStreamTag names here, since these ImageStreamTags do not include - // Docker metadata, for some reason. - List imageStreamTags = - imageStreams - .stream() - .filter(e -> e.getMetadata().getName().contains(imageTagTrimmed)) - .map(e -> e.getMetadata().getName()) - .collect(Collectors.toList()); - - if (imageStreamTags.size() < 1) { - throw new OpenShiftException( - String.format("ImageStreamTag %s not found!", imageStreamTagName)); - } else if (imageStreamTags.size() > 1) { - throw new OpenShiftException( - String.format("Multiple ImageStreamTags found for name %s", imageStreamTagName)); - } - - String imageStreamTag = imageStreamTags.get(0); - - // Finally, get the ImageStreamTag, with Docker metadata. - return getImageStreamTag(imageStreamTag); - } - - private ImageStreamTag getImageStreamTag(final String imageStreamName) { - try (OpenShiftClient openShiftClient = new DefaultOpenShiftClient()) { - return openShiftClient - .imageStreamTags() - .inNamespace(openShiftCheProjectName) - .withName(imageStreamName) - .get(); - } - } - - private Service getCheServiceBySelector(String selectorKey, String selectorValue) { - try (OpenShiftClient openShiftClient = new DefaultOpenShiftClient()) { - ServiceList svcs = - openShiftClient.services().inNamespace(this.openShiftCheProjectName).list(); - - Service svc = - svcs.getItems() - .stream() - .filter(s -> s.getSpec().getSelector().containsKey(selectorKey)) - .filter(s -> s.getSpec().getSelector().get(selectorKey).equals(selectorValue)) - .findAny() - .orElse(null); - - if (svc == null) { - LOG.warn("No Service with selector {}={} could be found", selectorKey, selectorValue); - } - return svc; - } - } - - private Pod getChePodByContainerId(String containerId) throws IOException { - try (OpenShiftClient openShiftClient = new DefaultOpenShiftClient()) { - PodList pods = - openShiftClient - .pods() - .inNamespace(this.openShiftCheProjectName) - .withLabel( - CHE_CONTAINER_IDENTIFIER_LABEL_KEY, - KubernetesStringUtils.getLabelFromContainerID(containerId)) - .list(); - - List items = pods.getItems(); - - if (items.isEmpty()) { - LOG.error( - "An OpenShift Pod with label {}={} could not be found", - CHE_CONTAINER_IDENTIFIER_LABEL_KEY, - containerId); - throw new IOException( - "An OpenShift Pod with label " - + CHE_CONTAINER_IDENTIFIER_LABEL_KEY - + "=" - + containerId - + " could not be found"); - } - - if (items.size() > 1) { - LOG.error( - "There are {} pod with label {}={} (just one was expected)", - items.size(), - CHE_CONTAINER_IDENTIFIER_LABEL_KEY, - containerId); - throw new IOException( - "There are " - + items.size() - + " pod with label " - + CHE_CONTAINER_IDENTIFIER_LABEL_KEY - + "=" - + containerId - + " (just one was expeced)"); - } - - return items.get(0); - } - } - - /** - * Extracts the ImageInfo stored in an ImageStreamTag. The returned object is the JSON that would - * be returned by executing {@code docker inspect }, except, due to a quirk in OpenShift's - * handling of this data, fields except for {@code Config} and {@code ContainerConfig} are null. - * - * @param imageStreamTag - * @return - */ - private ImageInfo getImageInfoFromTag(ImageStreamTag imageStreamTag) { - // The DockerImageConfig string here is the JSON that would be returned by a docker inspect image, - // except that the capitalization is inconsistent, breaking deserialization. Top level elements - // are lowercased with underscores, while nested elements conform to FieldNamingPolicy.UPPER_CAMEL_CASE. - // We're only converting the config fields for brevity; this means that other fields are null. - Image tagImage = imageStreamTag.getImage(); - String dockerImageConfig = tagImage.getDockerImageConfig(); - - if (!isNullOrEmpty(dockerImageConfig)) { - LOG.info("imageStreamTag dockerImageConfig is not empty. Using it to get image info"); - ImageInfo info = - GSON.fromJson( - dockerImageConfig - .replaceFirst("config", "Config") - .replaceFirst("container_config", "ContainerConfig"), - ImageInfo.class); - return info; - } else { - LOG.info( - "imageStreamTag dockerImageConfig empty. Using dockerImageMetadata to get image info"); - String dockerImageMetadata = - GSON.toJson(tagImage.getAdditionalProperties().get("dockerImageMetadata")); - ImageInfo info = GSON.fromJson(dockerImageMetadata, ImageInfo.class); - return info; - } - } - - protected String getCheWorkspaceId(CreateContainerParams createContainerParams) { - Stream env = Arrays.stream(createContainerParams.getContainerConfig().getEnv()); - String workspaceID = - env.filter(v -> v.startsWith(CHE_WORKSPACE_ID_ENV_VAR) && v.contains("=")) - .map(v -> v.split("=", 2)[1]) - .findFirst() - .orElse(""); - return workspaceID.replaceFirst("workspace", ""); - } - - private boolean isDevMachine(CreateContainerParams createContainerParams) { - Stream env = Arrays.stream(createContainerParams.getContainerConfig().getEnv()); - return Boolean.parseBoolean( - env.filter(v -> v.startsWith(CHE_IS_DEV_MACHINE_ENV_VAR) && v.contains("=")) - .map(v -> v.split("=", 2)[1]) - .findFirst() - .orElse("false")); - } - - private void createOpenShiftService( - String deploymentName, - String serviceName, - Set exposedPorts, - Map portsToRefName, - Map additionalLabels, - String[] endpointAliases) { - Map selector = - Collections.singletonMap(OPENSHIFT_DEPLOYMENT_LABEL, deploymentName); - List ports = KubernetesService.getServicePortsFrom(exposedPorts, portsToRefName); - - try (OpenShiftClient openShiftClient = new DefaultOpenShiftClient()) { - Service service = - openShiftClient - .services() - .inNamespace(this.openShiftCheProjectName) - .createNew() - .withNewMetadata() - .withName(serviceName) - .withAnnotations(KubernetesLabelConverter.labelsToNames(additionalLabels)) - .endMetadata() - .withNewSpec() - .withSelector(selector) - .withPorts(ports) - .endSpec() - .done(); - - LOG.info("OpenShift service {} created", service.getMetadata().getName()); - - for (ServicePort port : ports) { - createOpenShiftRoute(serviceName, deploymentName, port.getName()); - } - } - } - - private void createOpenShiftRoute(String serviceName, String deploymentName, String serverRef) { - String routeId = serviceName.replaceFirst(CHE_OPENSHIFT_RESOURCES_PREFIX, ""); - openShiftRouteCreator.createRoute( - openShiftCheProjectName, - cheServerExternalAddress, - serverRef, - serviceName, - deploymentName, - routeId, - secureRoutes); - } - - private void createOpenShiftDeployment( - String deploymentName, - String imageName, - String sanitizedContainerName, - Set exposedPorts, - Map portsToRefName, - String[] envVariables, - String[] volumes, - Map resourceLimits, - Map resourceRequests) - throws OpenShiftException { - - LOG.info("Creating OpenShift deployment {}", deploymentName); - - Map selector = - Collections.singletonMap(OPENSHIFT_DEPLOYMENT_LABEL, deploymentName); - - LOG.info( - "Adding container {} to OpenShift deployment {}", sanitizedContainerName, deploymentName); - - if (createWorkspaceDirs) { - createWorkspaceDir(volumes); - } - - Container container = - new ContainerBuilder() - .withName(sanitizedContainerName) - .withImage(imageName) - .withEnv(KubernetesEnvVar.getEnvFrom(envVariables)) - .withPorts(KubernetesContainer.getContainerPortsFrom(exposedPorts, portsToRefName)) - .withImagePullPolicy(OPENSHIFT_IMAGE_PULL_POLICY_IFNOTPRESENT) - .withNewSecurityContext() - .withPrivileged(false) - .endSecurityContext() - .withLivenessProbe(getLivenessProbeFrom(exposedPorts)) - .withVolumeMounts(getVolumeMountsFrom(volumes)) - .withNewResources() - .withLimits(resourceLimits) - .withRequests(resourceRequests) - .endResources() - .build(); - - PodSpec podSpec = - new PodSpecBuilder() - .withContainers(container) - .withVolumes(getVolumesFrom(volumes)) - .withTerminationGracePeriodSeconds(OPENSHIFT_POD_TERMINATION_GRACE_PERIOD) - .build(); - - Deployment deployment = - new DeploymentBuilder() - .withNewMetadata() - .withName(deploymentName) - .withNamespace(this.openShiftCheProjectName) - .endMetadata() - .withNewSpec() - .withReplicas(1) - .withNewSelector() - .withMatchLabels(selector) - .endSelector() - .withNewTemplate() - .withNewMetadata() - .withLabels(selector) - .endMetadata() - .withSpec(podSpec) - .endTemplate() - .endSpec() - .build(); - - try (OpenShiftClient openShiftClient = new DefaultOpenShiftClient()) { - deployment = - openShiftClient - .extensions() - .deployments() - .inNamespace(this.openShiftCheProjectName) - .create(deployment); - } - - LOG.info("OpenShift deployment {} created", deploymentName); - } - - /** - * Creates a new ImageStreamTag - * - * @param sourceImageWithTag the image that the ImageStreamTag will track - * @param imageStreamTagName the name of the imageStream tag (e.g. {@code :}) - * @return the created ImageStreamTag - * @throws IOException When {@code sourceImageWithTag} metadata cannot be found - */ - private ImageStreamTag createImageStreamTag(String sourceImageWithTag, String imageStreamTagName) - throws IOException { - - try (OpenShiftClient openShiftClient = new DefaultOpenShiftClient()) { - openShiftClient - .imageStreamTags() - .inNamespace(openShiftCheProjectName) - .createOrReplaceWithNew() - .withNewMetadata() - .withName(imageStreamTagName) - .endMetadata() - .withNewTag() - .withNewFrom() - .withKind("DockerImage") - .withName(sourceImageWithTag) - .endFrom() - .endTag() - .done(); - - // Wait for image metadata to be pulled - for (int waitCount = 0; waitCount < OPENSHIFT_IMAGESTREAM_MAX_WAIT_COUNT; waitCount++) { - Thread.sleep(OPENSHIFT_IMAGESTREAM_WAIT_DELAY); - ImageStreamTag createdTag = - openShiftClient - .imageStreamTags() - .inNamespace(openShiftCheProjectName) - .withName(imageStreamTagName) - .get(); - if (createdTag != null) { - LOG.info( - String.format( - "Created ImageStreamTag %s in namespace %s", - createdTag.getMetadata().getName(), openShiftCheProjectName)); - return createdTag; - } - } - - throw new ImageNotFoundException(String.format("Image %s not found.", sourceImageWithTag)); - - } catch (InterruptedException e) { - Thread.currentThread().interrupt(); - throw new IOException(e.getLocalizedMessage(), e); - } - } - - /** - * Collects the relevant information from a Service, an ImageInfo, and a Pod into a docker - * ContainerInfo JSON object. The returned object is what would be returned by executing {@code - * docker inspect }, with fields filled as available. - * - * @param svc - * @param imageInfo - * @param pod - * @param containerId - * @return - * @throws OpenShiftException - */ - private ContainerInfo createContainerInfo( - Service svc, ImageInfo imageInfo, Pod pod, String containerId) throws OpenShiftException { - - // In Che on OpenShift, we only have one container per pod. - Container container = pod.getSpec().getContainers().get(0); - ContainerConfig imageContainerConfig = imageInfo.getContainerConfig(); - - // HostConfig - HostConfig hostConfig = new HostConfig(); - hostConfig.setBinds(new String[0]); - - // Env vars - List imageEnv = Arrays.asList(imageContainerConfig.getEnv()); - List containerEnv = - container - .getEnv() - .stream() - .map(e -> String.format("%s=%s", e.getName(), e.getValue())) - .collect(Collectors.toList()); - String[] env = Stream.concat(imageEnv.stream(), containerEnv.stream()).toArray(String[]::new); - - // Exposed Ports - Map> ports = getCheServicePorts(svc); - Map> exposedPorts = new HashMap<>(); - for (String key : ports.keySet()) { - exposedPorts.put(key, Collections.emptyMap()); - } - - // Labels - Map annotations = - KubernetesLabelConverter.namesToLabels(svc.getMetadata().getAnnotations()); - Map containerLabels = imageInfo.getConfig().getLabels(); - Map labels = - Stream.concat(annotations.entrySet().stream(), containerLabels.entrySet().stream()) - .filter(e -> e.getKey().startsWith(KubernetesLabelConverter.getCheServerLabelPrefix())) - .collect(Collectors.toMap(e -> e.getKey(), e -> e.getValue())); - - // ContainerConfig - ContainerConfig config = imageContainerConfig; - config.setHostname(svc.getMetadata().getName()); - config.setEnv(env); - config.setExposedPorts(exposedPorts); - config.setLabels(labels); - config.setImage(container.getImage()); - - // NetworkSettings - NetworkSettings networkSettings = new NetworkSettings(); - networkSettings.setIpAddress(svc.getSpec().getClusterIP()); - networkSettings.setGateway(svc.getSpec().getClusterIP()); - networkSettings.setPorts(ports); - - // Make final ContainerInfo - ContainerInfo info = new ContainerInfo(); - info.setId(containerId); - info.setConfig(config); - info.setNetworkSettings(networkSettings); - info.setHostConfig(hostConfig); - info.setImage(imageInfo.getConfig().getImage()); - - // In Che on OpenShift, we only have one container per pod. - info.setState(getContainerStates(pod).get(0)); - return info; - } - - private List getContainerStates(final Pod pod) throws OpenShiftException { - List containerStates = new ArrayList<>(); - List containerStatuses = pod.getStatus().getContainerStatuses(); - for (ContainerStatus status : containerStatuses) { - io.fabric8.kubernetes.api.model.ContainerState state = status.getState(); - - ContainerStateTerminated terminated = state.getTerminated(); - ContainerStateWaiting waiting = state.getWaiting(); - ContainerStateRunning running = state.getRunning(); - - ContainerState containerState = new ContainerState(); - - if (terminated != null) { - containerState.setStatus("exited"); - } else if (waiting != null) { - containerState.setStatus("paused"); - } else if (running != null) { - containerState.setStatus("running"); - } else { - throw new OpenShiftException( - "Fail to detect the state of container with id " + status.getContainerID()); - } - containerStates.add(containerState); - } - return containerStates; - } - - private void createWorkspaceDir(String[] volumes) throws OpenShiftException { - PersistentVolumeClaim pvc = getClaimCheWorkspace(); - String workspaceSubpath = getWorkspaceSubpath(volumes); - if (pvc != null && !isNullOrEmpty(workspaceSubpath)) { - LOG.info("Making sure directory exists for workspace {}", workspaceSubpath); - boolean succeeded = - openShiftPvcHelper.createJobPod( - workspacesPersistentVolumeClaim, - openShiftCheProjectName, - "create-", - OpenShiftPvcHelper.Command.MAKE, - workspaceSubpath); - if (!succeeded) { - LOG.error( - "Failed to create workspace directory {} in PVC {}", - workspaceSubpath, - workspacesPersistentVolumeClaim); - throw new OpenShiftException("Failed to create workspace directory in PVC"); - } - } - } - - /** - * Gets the workspace subpath from an array of volumes. Since volumes provided are those used when - * running Che in Docker, most of the volume spec is ignored; this method returns the subpath - * within the hostpath that refers to the workspace. - * - *

E.g. for a volume {@code /data/workspaces/wksp-8z00:/projects:Z}, this method will return - * "wksp-8z00". - * - * @param volumes - * @return - */ - private String getWorkspaceSubpath(String[] volumes) { - String workspaceSubpath = null; - for (String volume : volumes) { - // Volumes are structured ::. - // We first check that matches the mount path for projects - // and then extract the hostpath directory. The first part of the volume - // String will be structured /workspaceName. - String mountPath = volume.split(":", 3)[1]; - if (cheWorkspaceProjectsStorage.equals(mountPath)) { - workspaceSubpath = volume.split(":", 3)[0].replaceAll(cheWorkspaceStorage, ""); - if (workspaceSubpath.startsWith("/")) { - workspaceSubpath = workspaceSubpath.substring(1); - } - } - } - return workspaceSubpath; - } - - private List getVolumeMountsFrom(String[] volumes) { - List vms = new ArrayList<>(); - PersistentVolumeClaim pvc = getClaimCheWorkspace(); - if (pvc != null) { - String subPath = getWorkspaceSubpath(volumes); - if (subPath != null) { - VolumeMount vm = - new VolumeMountBuilder() - .withMountPath(cheWorkspaceProjectsStorage) - .withName(workspacesPersistentVolumeClaim) - .withSubPath(subPath) - .build(); - - // add a mount from PVC for the logs - VolumeMount logsVm = - new VolumeMountBuilder() - .withMountPath(CHE_MOUNTED_WORKSPACE_FOLDER) - .withName(workspacesPersistentVolumeClaim) - .withSubPath(subPath + WORKSPACE_LOGS_FOLDER_SUFFIX) - .build(); - - vms.add(vm); - vms.add(logsVm); - } - } - return vms; - } - - private List getVolumesFrom(String[] volumes) { - List vs = new ArrayList<>(); - PersistentVolumeClaim pvc = getClaimCheWorkspace(); - if (pvc != null) { - for (String volume : volumes) { - String mountPath = volume.split(":", 3)[1]; - if (cheWorkspaceProjectsStorage.equals(mountPath)) { - PersistentVolumeClaimVolumeSource pvcs = - new PersistentVolumeClaimVolumeSourceBuilder() - .withClaimName(workspacesPersistentVolumeClaim) - .build(); - Volume v = - new VolumeBuilder() - .withPersistentVolumeClaim(pvcs) - .withName(workspacesPersistentVolumeClaim) - .build(); - vs.add(v); - } - } - } - return vs; - } - - private PersistentVolumeClaim getClaimCheWorkspace() { - try (OpenShiftClient openShiftClient = new DefaultOpenShiftClient()) { - PersistentVolumeClaimList pvcList = - openShiftClient.persistentVolumeClaims().inNamespace(openShiftCheProjectName).list(); - for (PersistentVolumeClaim pvc : pvcList.getItems()) { - if (workspacesPersistentVolumeClaim.equals(pvc.getMetadata().getName())) { - return pvc; - } - } - Map requests = new HashMap<>(); - requests.put("storage", new Quantity(workspacesPvcQuantity)); - Map annotations = - Collections.singletonMap( - OPENSHIFT_VOLUME_STORAGE_CLASS, OPENSHIFT_VOLUME_STORAGE_CLASS_NAME); - PersistentVolumeClaim pvc = - new PersistentVolumeClaimBuilder() - .withNewMetadata() - .withName(workspacesPersistentVolumeClaim) - .withAnnotations(annotations) - .endMetadata() - .withNewSpec() - .withAccessModes("ReadWriteOnce") - .withNewResources() - .withRequests(requests) - .endResources() - .endSpec() - .build(); - pvc = - openShiftClient.persistentVolumeClaims().inNamespace(openShiftCheProjectName).create(pvc); - LOG.info("Creating OpenShift PVC {}", pvc.getMetadata().getName()); - return pvc; - } - } - - private String waitAndRetrieveContainerID(String deploymentName) throws IOException { - try (OpenShiftClient openShiftClient = new DefaultOpenShiftClient()) { - for (int i = 0; i < OPENSHIFT_WAIT_POD_TIMEOUT; i++) { - try { - Thread.sleep(OPENSHIFT_WAIT_POD_DELAY); - } catch (InterruptedException ex) { - Thread.currentThread().interrupt(); - } - - List pods = - openShiftClient - .pods() - .inNamespace(this.openShiftCheProjectName) - .withLabel(OPENSHIFT_DEPLOYMENT_LABEL, deploymentName) - .list() - .getItems(); - - if (pods.size() < 1) { - throw new OpenShiftException( - String.format("Pod with deployment name %s not found", deploymentName)); - } else if (pods.size() > 1) { - throw new OpenShiftException( - String.format("Multiple pods with deployment name %s found", deploymentName)); - } - - Pod pod = pods.get(0); - String status = pod.getStatus().getPhase(); - if (OPENSHIFT_POD_STATUS_RUNNING.equals(status)) { - String containerID = pod.getStatus().getContainerStatuses().get(0).getContainerID(); - String normalizedID = KubernetesStringUtils.normalizeContainerID(containerID); - openShiftClient - .pods() - .inNamespace(openShiftCheProjectName) - .withName(pod.getMetadata().getName()) - .edit() - .editMetadata() - .addToLabels( - CHE_CONTAINER_IDENTIFIER_LABEL_KEY, - KubernetesStringUtils.getLabelFromContainerID(normalizedID)) - .endMetadata() - .done(); - return normalizedID; - } - } - return null; - } - } - - /** - * Adds OpenShift liveness probe to the container. Liveness probe is configured via TCP Socket - * Check - for dev machines by checking Workspace API agent port (4401), for non-dev by checking - * Terminal port (4411) - * - * @param exposedPorts - * @see OpenShift - * Application Health - */ - private Probe getLivenessProbeFrom(final Set exposedPorts) { - int port = 0; - - if (isDevMachine(exposedPorts)) { - port = CHE_WORKSPACE_AGENT_PORT; - } else if (isTerminalAgentInjected(exposedPorts)) { - port = CHE_TERMINAL_AGENT_PORT; - } - - if (port != 0) { - return new ProbeBuilder() - .withNewTcpSocket() - .withNewPort(port) - .endTcpSocket() - .withInitialDelaySeconds(openShiftLivenessProbeDelay) - .withTimeoutSeconds(openShiftLivenessProbeTimeout) - .build(); - } - - return null; - } - - private Map> getCheServicePorts(Service service) { - Map> networkSettingsPorts = new HashMap<>(); - List servicePorts = service.getSpec().getPorts(); - LOG.info( - "Retrieving {} ports exposed by service {}", - servicePorts.size(), - service.getMetadata().getName()); - for (ServicePort servicePort : servicePorts) { - String protocol = servicePort.getProtocol(); - String targetPort = String.valueOf(servicePort.getTargetPort().getIntVal()); - String nodePort = String.valueOf(servicePort.getNodePort()); - String portName = servicePort.getName(); - - LOG.info("Port: {}{}{} ({})", targetPort, DOCKER_PROTOCOL_PORT_DELIMITER, protocol, portName); - - networkSettingsPorts.put( - targetPort + DOCKER_PROTOCOL_PORT_DELIMITER + protocol.toLowerCase(), - Collections.singletonList( - new PortBinding().withHostIp(CHE_DEFAULT_EXTERNAL_ADDRESS).withHostPort(nodePort))); - } - return networkSettingsPorts; - } - - /** - * @param exposedPorts - * @return true if machine exposes 4411/tcp port used by Terminal agent, false otherwise - */ - private boolean isTerminalAgentInjected(final Set exposedPorts) { - return exposedPorts.contains(CHE_TERMINAL_AGENT_PORT + "/tcp"); - } - - /** - * @param exposedPorts - * @return true if machine exposes 4401/tcp port used by Worspace API agent, false otherwise - */ - private boolean isDevMachine(final Set exposedPorts) { - return exposedPorts.contains(CHE_WORKSPACE_AGENT_PORT + "/tcp"); - } - - private String getDeploymentName(final RemoveContainerParams params) throws IOException { - String containerId = params.getContainer(); - Pod pod = getChePodByContainerId(containerId); - String deploymentName = pod.getMetadata().getLabels().get(OPENSHIFT_DEPLOYMENT_LABEL); - return deploymentName; - } -} diff --git a/plugins/plugin-docker/che-plugin-openshift-client/src/main/java/org/eclipse/che/plugin/openshift/client/OpenShiftDeploymentCleaner.java b/plugins/plugin-docker/che-plugin-openshift-client/src/main/java/org/eclipse/che/plugin/openshift/client/OpenShiftDeploymentCleaner.java deleted file mode 100644 index e6a14d7c51..0000000000 --- a/plugins/plugin-docker/che-plugin-openshift-client/src/main/java/org/eclipse/che/plugin/openshift/client/OpenShiftDeploymentCleaner.java +++ /dev/null @@ -1,102 +0,0 @@ -/* - * Copyright (c) 2012-2017 Red Hat, Inc. - * All rights reserved. This program and the accompanying materials - * are made available under the terms of the Eclipse Public License v1.0 - * which accompanies this distribution, and is available at - * http://www.eclipse.org/legal/epl-v10.html - * - * Contributors: - * Red Hat, Inc. - initial API and implementation - */ -package org.eclipse.che.plugin.openshift.client; - -import io.fabric8.kubernetes.api.model.Pod; -import io.fabric8.kubernetes.api.model.Service; -import io.fabric8.kubernetes.api.model.extensions.Deployment; -import io.fabric8.kubernetes.api.model.extensions.ReplicaSet; -import io.fabric8.openshift.api.model.Route; -import io.fabric8.openshift.client.DefaultOpenShiftClient; -import io.fabric8.openshift.client.OpenShiftClient; -import java.io.IOException; -import java.util.List; -import javax.inject.Singleton; -import org.eclipse.che.plugin.openshift.client.exception.OpenShiftException; -import org.eclipse.che.plugin.openshift.client.kubernetes.KubernetesResourceUtil; -import org.slf4j.Logger; -import org.slf4j.LoggerFactory; - -@Singleton -public class OpenShiftDeploymentCleaner { - private static final Logger LOG = LoggerFactory.getLogger(OpenShiftDeploymentCleaner.class); - private static final int OPENSHIFT_POD_DELETION_TIMEOUT = 120; - private static final int OPENSHIFT_WAIT_POD_DELAY = 1000; - - public void cleanDeploymentResources(final String deploymentName, final String namespace) - throws IOException { - cleanUpWorkspaceResources(deploymentName, namespace); - waitUntilWorkspacePodIsDeleted(deploymentName, namespace); - } - - private void cleanUpWorkspaceResources(final String deploymentName, final String namespace) - throws IOException { - Deployment deployment = KubernetesResourceUtil.getDeploymentByName(deploymentName, namespace); - Service service = - KubernetesResourceUtil.getServiceBySelector( - OpenShiftConnector.OPENSHIFT_DEPLOYMENT_LABEL, deploymentName, namespace); - List routes = - KubernetesResourceUtil.getRoutesByLabel( - OpenShiftConnector.OPENSHIFT_DEPLOYMENT_LABEL, deploymentName, namespace); - List replicaSets = - KubernetesResourceUtil.getReplicaSetByLabel( - OpenShiftConnector.OPENSHIFT_DEPLOYMENT_LABEL, deploymentName, namespace); - - try (OpenShiftClient openShiftClient = new DefaultOpenShiftClient()) { - if (routes != null) { - for (Route route : routes) { - LOG.info("Removing OpenShift Route {}", route.getMetadata().getName()); - openShiftClient.resource(route).delete(); - } - } - - if (service != null) { - LOG.info("Removing OpenShift Service {}", service.getMetadata().getName()); - openShiftClient.resource(service).delete(); - } - - if (deployment != null) { - LOG.info("Removing OpenShift Deployment {}", deployment.getMetadata().getName()); - openShiftClient.resource(deployment).delete(); - } - - if (replicaSets != null && replicaSets.size() > 0) { - LOG.info("Removing OpenShift ReplicaSets for deployment {}", deploymentName); - replicaSets.forEach(rs -> openShiftClient.resource(rs).delete()); - } - } - } - - private void waitUntilWorkspacePodIsDeleted(final String deploymentName, final String namespace) - throws OpenShiftException { - try (OpenShiftClient client = new DefaultOpenShiftClient()) { - for (int waitCount = 0; waitCount < OPENSHIFT_POD_DELETION_TIMEOUT; waitCount++) { - List pods = - client - .pods() - .inNamespace(namespace) - .withLabel(OpenShiftConnector.OPENSHIFT_DEPLOYMENT_LABEL, deploymentName) - .list() - .getItems(); - - if (pods.size() == 0) { - return; - } - Thread.sleep(OPENSHIFT_WAIT_POD_DELAY); - } - } catch (InterruptedException e) { - Thread.currentThread().interrupt(); - LOG.info("Thread interrupted while cleaning up workspace"); - } - - throw new OpenShiftException("Timeout while waiting for pods to terminate"); - } -} diff --git a/plugins/plugin-docker/che-plugin-openshift-client/src/main/java/org/eclipse/che/plugin/openshift/client/OpenShiftPvcHelper.java b/plugins/plugin-docker/che-plugin-openshift-client/src/main/java/org/eclipse/che/plugin/openshift/client/OpenShiftPvcHelper.java deleted file mode 100644 index 0bbc89b48e..0000000000 --- a/plugins/plugin-docker/che-plugin-openshift-client/src/main/java/org/eclipse/che/plugin/openshift/client/OpenShiftPvcHelper.java +++ /dev/null @@ -1,247 +0,0 @@ -/* - * Copyright (c) 2012-2017 Red Hat, Inc. - * All rights reserved. This program and the accompanying materials - * are made available under the terms of the Eclipse Public License v1.0 - * which accompanies this distribution, and is available at - * http://www.eclipse.org/legal/epl-v10.html - * - * Contributors: - * Red Hat, Inc. - initial API and implementation - */ -package org.eclipse.che.plugin.openshift.client; - -import static org.eclipse.che.plugin.openshift.client.OpenShiftConnector.WORKSPACE_LOGS_FOLDER_SUFFIX; - -import io.fabric8.kubernetes.api.model.Container; -import io.fabric8.kubernetes.api.model.ContainerBuilder; -import io.fabric8.kubernetes.api.model.PersistentVolumeClaimVolumeSource; -import io.fabric8.kubernetes.api.model.PersistentVolumeClaimVolumeSourceBuilder; -import io.fabric8.kubernetes.api.model.Pod; -import io.fabric8.kubernetes.api.model.PodBuilder; -import io.fabric8.kubernetes.api.model.Quantity; -import io.fabric8.kubernetes.api.model.Volume; -import io.fabric8.kubernetes.api.model.VolumeBuilder; -import io.fabric8.kubernetes.api.model.VolumeMount; -import io.fabric8.kubernetes.api.model.VolumeMountBuilder; -import io.fabric8.openshift.client.DefaultOpenShiftClient; -import io.fabric8.openshift.client.OpenShiftClient; -import java.util.ArrayList; -import java.util.Arrays; -import java.util.Collections; -import java.util.List; -import java.util.Map; -import java.util.Set; -import java.util.concurrent.ConcurrentHashMap; -import java.util.stream.Collectors; -import javax.inject.Inject; -import javax.inject.Named; -import javax.inject.Singleton; -import org.slf4j.Logger; -import org.slf4j.LoggerFactory; - -/** - * Helper class for executing simple commands in a Persistent Volume on Openshift. - * - *

Creates a short-lived Pod using a CentOS image which mounts a specified PVC and executes a - * command (either {@code mkdir -p } or {@code rm -rf For mkdir commands, an in-memory list of created workspaces is stored and used to avoid - * calling mkdir unnecessarily. However, this list is not persisted, so dir creation is not tracked - * between restarts. - * - * @author amisevsk - */ -@Singleton -public class OpenShiftPvcHelper { - - private static final Logger LOG = LoggerFactory.getLogger(OpenShiftPvcHelper.class); - - private static final String POD_PHASE_SUCCEEDED = "Succeeded"; - private static final String POD_PHASE_FAILED = "Failed"; - private static final String[] MKDIR_WORKSPACE_COMMAND = new String[] {"mkdir", "-p"}; - private static final String[] RMDIR_WORKSPACE_COMMAND = new String[] {"rm", "-rf"}; - - private static final Set createdWorkspaces = ConcurrentHashMap.newKeySet(); - - private final String jobImage; - private final String jobMemoryLimit; - - protected enum Command { - REMOVE, - MAKE - } - - @Inject - protected OpenShiftPvcHelper( - @Named("che.openshift.jobs.image") String jobImage, - @Named("che.openshift.jobs.memorylimit") String jobMemoryLimit) { - this.jobImage = jobImage; - this.jobMemoryLimit = jobMemoryLimit; - } - - /** - * Creates a pod with {@code command} and reports whether it succeeded - * - * @param workspacesPvcName name of the PVC to mount - * @param projectNamespace OpenShift namespace - * @param jobNamePrefix prefix used for pod metadata name. Name structure will normally be {@code - * } if only one path is passed, or {@code batch} if multiple - * paths are provided - * @param command command to execute in PVC. - * @param workspaceDirs list of arguments attached to command. A list of directories to - * create/delete. - * @return true if Pod terminates with phase "Succeeded" or mkdir command issued for already - * created worksapce, false otherwise. - * @see Command - */ - protected boolean createJobPod( - String workspacesPvcName, - String projectNamespace, - String jobNamePrefix, - Command command, - String... workspaceDirs) { - - if (workspaceDirs.length == 0) { - return true; - } - - List logsDirs = Arrays.asList(workspaceDirs); - logsDirs = - logsDirs - .stream() - .map(dir -> dir + WORKSPACE_LOGS_FOLDER_SUFFIX) - .collect(Collectors.toList()); - - List allDirs = new ArrayList<>(); - allDirs.addAll(Arrays.asList(workspaceDirs)); - allDirs.addAll(logsDirs); - String[] allDirsArray = allDirs.toArray(new String[allDirs.size()]); - - if (Command.MAKE.equals(command)) { - String[] dirsToCreate = filterDirsToCreate(allDirsArray); - if (dirsToCreate.length == 0) { - return true; - } - allDirsArray = dirsToCreate; - } - - VolumeMount vm = - new VolumeMountBuilder().withMountPath("/projects").withName(workspacesPvcName).build(); - - PersistentVolumeClaimVolumeSource pvcs = - new PersistentVolumeClaimVolumeSourceBuilder().withClaimName(workspacesPvcName).build(); - - Volume volume = - new VolumeBuilder().withPersistentVolumeClaim(pvcs).withName(workspacesPvcName).build(); - - String[] jobCommand = getCommand(command, "/projects/", allDirsArray); - LOG.info( - "Executing command {} in PVC {} for {} dirs", - jobCommand[0], - workspacesPvcName, - allDirs.size()); - - Map limit = Collections.singletonMap("memory", new Quantity(jobMemoryLimit)); - - String podName = - workspaceDirs.length > 1 ? jobNamePrefix + "batch" : jobNamePrefix + workspaceDirs[0]; - - Container container = - new ContainerBuilder() - .withName(podName) - .withImage(jobImage) - .withImagePullPolicy("IfNotPresent") - .withNewSecurityContext() - .withPrivileged(false) - .endSecurityContext() - .withCommand(jobCommand) - .withVolumeMounts(vm) - .withNewResources() - .withLimits(limit) - .endResources() - .build(); - - Pod podSpec = - new PodBuilder() - .withNewMetadata() - .withName(podName) - .endMetadata() - .withNewSpec() - .withContainers(container) - .withVolumes(volume) - .withRestartPolicy("Never") - .endSpec() - .build(); - - try (OpenShiftClient openShiftClient = new DefaultOpenShiftClient()) { - openShiftClient.pods().inNamespace(projectNamespace).create(podSpec); - boolean completed = false; - while (!completed) { - Pod pod = openShiftClient.pods().inNamespace(projectNamespace).withName(podName).get(); - String phase = pod.getStatus().getPhase(); - switch (phase) { - case POD_PHASE_FAILED: - LOG.info("Pod command {} failed", Arrays.toString(jobCommand)); - // fall through - case POD_PHASE_SUCCEEDED: - openShiftClient.resource(pod).delete(); - updateCreatedDirs(command, phase, allDirsArray); - return POD_PHASE_SUCCEEDED.equals(phase); - default: - Thread.sleep(1000); - } - } - } catch (InterruptedException e) { - Thread.currentThread().interrupt(); - } - return false; - } - - private String[] getCommand(Command commandType, String mountPath, String... dirs) { - String[] command = new String[0]; - switch (commandType) { - case MAKE: - command = MKDIR_WORKSPACE_COMMAND; - break; - case REMOVE: - command = RMDIR_WORKSPACE_COMMAND; - break; - } - - String[] dirsWithPath = - Arrays.asList(dirs).stream().map(dir -> mountPath + dir).toArray(String[]::new); - - String[] fullCommand = new String[command.length + dirsWithPath.length]; - - System.arraycopy(command, 0, fullCommand, 0, command.length); - System.arraycopy(dirsWithPath, 0, fullCommand, command.length, dirsWithPath.length); - return fullCommand; - } - - private void updateCreatedDirs(Command command, String phase, String... workspaceDirs) { - if (!POD_PHASE_SUCCEEDED.equals(phase)) { - return; - } - List dirs = Arrays.asList(workspaceDirs); - switch (command) { - case MAKE: - createdWorkspaces.addAll(dirs); - break; - case REMOVE: - createdWorkspaces.removeAll(dirs); - break; - } - } - - private String[] filterDirsToCreate(String[] allDirs) { - List dirs = Arrays.asList(allDirs); - List dirsToCreate = new ArrayList<>(); - for (String dir : dirs) { - if (!createdWorkspaces.contains(dir)) { - dirsToCreate.add(dir); - } - } - return dirsToCreate.toArray(new String[dirsToCreate.size()]); - } -} diff --git a/plugins/plugin-docker/che-plugin-openshift-client/src/main/java/org/eclipse/che/plugin/openshift/client/OpenShiftRouteCreator.java b/plugins/plugin-docker/che-plugin-openshift-client/src/main/java/org/eclipse/che/plugin/openshift/client/OpenShiftRouteCreator.java deleted file mode 100644 index 30de1efe08..0000000000 --- a/plugins/plugin-docker/che-plugin-openshift-client/src/main/java/org/eclipse/che/plugin/openshift/client/OpenShiftRouteCreator.java +++ /dev/null @@ -1,89 +0,0 @@ -/* - * Copyright (c) 2012-2017 Red Hat, Inc. - * All rights reserved. This program and the accompanying materials - * are made available under the terms of the Eclipse Public License v1.0 - * which accompanies this distribution, and is available at - * http://www.eclipse.org/legal/epl-v10.html - * - * Contributors: - * Red Hat, Inc. - initial API and implementation - */ -package org.eclipse.che.plugin.openshift.client; - -import io.fabric8.openshift.api.model.DoneableRoute; -import io.fabric8.openshift.api.model.Route; -import io.fabric8.openshift.api.model.RouteFluent.SpecNested; -import io.fabric8.openshift.client.DefaultOpenShiftClient; -import io.fabric8.openshift.client.OpenShiftClient; -import javax.inject.Singleton; -import org.slf4j.Logger; -import org.slf4j.LoggerFactory; - -@Singleton -public class OpenShiftRouteCreator { - private static final Logger LOG = LoggerFactory.getLogger(OpenShiftRouteCreator.class); - private static final String TLS_TERMINATION_EDGE = "edge"; - private static final String REDIRECT_INSECURE_EDGE_TERMINATION_POLICY = "Redirect"; - - public void createRoute( - final String namespace, - final String openShiftNamespaceExternalAddress, - final String serverRef, - final String serviceName, - final String deploymentName, - final String routeId, - final boolean enableTls) { - - if (openShiftNamespaceExternalAddress == null) { - throw new IllegalArgumentException( - "Property che.docker.ip.external must be set when using openshift."); - } - - try (OpenShiftClient openShiftClient = new DefaultOpenShiftClient()) { - String routeName = generateRouteName(routeId, serverRef); - String serviceHost = generateRouteHost(routeName, openShiftNamespaceExternalAddress); - - SpecNested routeSpec = - openShiftClient - .routes() - .inNamespace(namespace) - .createNew() - .withNewMetadata() - .withName(routeName) - .addToLabels(OpenShiftConnector.OPENSHIFT_DEPLOYMENT_LABEL, deploymentName) - .endMetadata() - .withNewSpec() - .withHost(serviceHost) - .withNewTo() - .withKind("Service") - .withName(serviceName) - .endTo() - .withNewPort() - .withNewTargetPort() - .withStrVal(serverRef) - .endTargetPort() - .endPort(); - - if (enableTls) { - routeSpec - .withNewTls() - .withTermination(TLS_TERMINATION_EDGE) - .withInsecureEdgeTerminationPolicy(REDIRECT_INSECURE_EDGE_TERMINATION_POLICY) - .endTls(); - } - - Route route = routeSpec.endSpec().done(); - - LOG.info("OpenShift route {} created", route.getMetadata().getName()); - } - } - - private String generateRouteName(final String serviceName, final String serverRef) { - return serverRef + "-" + serviceName; - } - - private String generateRouteHost( - final String routeName, final String openShiftNamespaceExternalAddress) { - return routeName + "-" + openShiftNamespaceExternalAddress; - } -} diff --git a/plugins/plugin-docker/che-plugin-openshift-client/src/main/java/org/eclipse/che/plugin/openshift/client/OpenShiftVersion.java b/plugins/plugin-docker/che-plugin-openshift-client/src/main/java/org/eclipse/che/plugin/openshift/client/OpenShiftVersion.java deleted file mode 100644 index db0d8bfd15..0000000000 --- a/plugins/plugin-docker/che-plugin-openshift-client/src/main/java/org/eclipse/che/plugin/openshift/client/OpenShiftVersion.java +++ /dev/null @@ -1,113 +0,0 @@ -/* - * Copyright (c) 2012-2017 Red Hat, Inc. - * All rights reserved. This program and the accompanying materials - * are made available under the terms of the Eclipse Public License v1.0 - * which accompanies this distribution, and is available at - * http://www.eclipse.org/legal/epl-v10.html - * - * Contributors: - * Red Hat, Inc. - initial API and implementation - */ -package org.eclipse.che.plugin.openshift.client; - -import java.util.Date; -import org.eclipse.che.plugin.docker.client.json.Version; - -public class OpenShiftVersion { - private String major; - private String minor; - private String gitVersion; - private String gitTreeState; - private Date buildDate; - private String goVersion; - private String gitCommit; - private String compiler; - private String platform; - - public String getMajor() { - return major; - } - - public void setMajor(String major) { - this.major = major; - } - - public String getMinor() { - return minor; - } - - public void setMinor(String minor) { - this.minor = minor; - } - - public String getGitVersion() { - return gitVersion; - } - - public void setGitVersion(String gitVersion) { - this.gitVersion = gitVersion; - } - - public String getGitTreeState() { - return gitTreeState; - } - - public void setGitTreeState(String gitTreeState) { - this.gitTreeState = gitTreeState; - } - - public Date getBuildDate() { - return buildDate; - } - - public void setBuildDate(Date buildDate) { - this.buildDate = buildDate; - } - - public String getGoVersion() { - return goVersion; - } - - public void setGoVersion(String goVersion) { - this.goVersion = goVersion; - } - - public String getGitCommit() { - return gitCommit; - } - - public void setGitCommit(String gitCommit) { - this.gitCommit = gitCommit; - } - - public String getCompiler() { - return compiler; - } - - public void setCompiler(String compiler) { - this.compiler = compiler; - } - - public String getPlatform() { - return platform; - } - - public void setPlatform(String platform) { - this.platform = platform; - } - - public Version getVersion() { - Version version = new Version(); - version.setVersion(major + "." + minor); - version.setGitCommit(getGitCommit()); - version.setGoVersion(getGoVersion()); - if (getPlatform() != null) { - String[] elements = getPlatform().split("/"); - if (elements.length == 2) { - version.setOs(elements[0]); - version.setArch(elements[1]); - } - } - return version; - } -} diff --git a/plugins/plugin-docker/che-plugin-openshift-client/src/main/java/org/eclipse/che/plugin/openshift/client/OpenShiftWorkspaceFilesCleaner.java b/plugins/plugin-docker/che-plugin-openshift-client/src/main/java/org/eclipse/che/plugin/openshift/client/OpenShiftWorkspaceFilesCleaner.java deleted file mode 100644 index f808b84df2..0000000000 --- a/plugins/plugin-docker/che-plugin-openshift-client/src/main/java/org/eclipse/che/plugin/openshift/client/OpenShiftWorkspaceFilesCleaner.java +++ /dev/null @@ -1,98 +0,0 @@ -/* - * Copyright (c) 2012-2017 Red Hat, Inc. - * All rights reserved. This program and the accompanying materials - * are made available under the terms of the Eclipse Public License v1.0 - * which accompanies this distribution, and is available at - * http://www.eclipse.org/legal/epl-v10.html - * - * Contributors: - * Red Hat, Inc. - initial API and implementation - */ -package org.eclipse.che.plugin.openshift.client; - -import static com.google.common.base.Strings.isNullOrEmpty; - -import com.google.common.annotations.VisibleForTesting; -import java.util.ArrayList; -import java.util.List; -import java.util.Set; -import java.util.concurrent.ConcurrentHashMap; -import javax.inject.Inject; -import javax.inject.Named; -import javax.inject.Singleton; -import org.eclipse.che.api.core.model.workspace.Workspace; -import org.eclipse.che.api.core.notification.EventService; -import org.eclipse.che.api.core.notification.EventSubscriber; -import org.eclipse.che.api.workspace.server.event.ServerIdleEvent; -import org.eclipse.che.api.workspace.shared.event.WorkspaceRemovedEvent; -import org.slf4j.Logger; -import org.slf4j.LoggerFactory; - -/** - * Class used to remove workspace directories in Persistent Volume when a workspace is delete while - * running on OpenShift. Deleted workspace directories are stored in a list. Upon Che server idling, - * all of these workspaces are deleted simultaneously from the PVC using a {@link - * OpenShiftPvcHelper} job. - * - *

Since deleting a workspace does not immediately remove its files, re-creating a workspace with - * a previously used name can result in files from the previous workspace still being present. - * - * @author amisevsk - * @author Sergii Leshchenko - */ -@Singleton -public class OpenShiftWorkspaceFilesCleaner implements EventSubscriber { - - private static final Logger LOG = LoggerFactory.getLogger(OpenShiftConnector.class); - - private final Set deleteQueue; - private final String projectNamespace; - private final String workspacesPvcName; - private final OpenShiftPvcHelper openShiftPvcHelper; - - @Inject - public OpenShiftWorkspaceFilesCleaner( - OpenShiftPvcHelper openShiftPvcHelper, - @Named("che.openshift.project") String projectNamespace, - @Named("che.openshift.workspaces.pvc.name") String workspacesPvcName) { - this.projectNamespace = projectNamespace; - this.workspacesPvcName = workspacesPvcName; - this.openShiftPvcHelper = openShiftPvcHelper; - this.deleteQueue = ConcurrentHashMap.newKeySet(); - } - - @Inject - public void subscribe(EventService eventService) { - eventService.subscribe(this); - eventService.subscribe(event -> deleteWorkspacesInQueue(), ServerIdleEvent.class); - } - - @Override - public void onEvent(WorkspaceRemovedEvent event) { - Workspace workspace = event.getWorkspace(); - String workspaceName = workspace.getConfig().getName(); - if (isNullOrEmpty(workspaceName)) { - LOG.error("Could not get workspace name for files removal."); - return; - } - deleteQueue.add(workspaceName); - } - - @VisibleForTesting - void deleteWorkspacesInQueue() { - List deleteQueueCopy = new ArrayList<>(deleteQueue); - String[] dirsToDelete = deleteQueueCopy.toArray(new String[deleteQueueCopy.size()]); - - LOG.info("Deleting {} workspaces on PVC {}", deleteQueueCopy.size(), workspacesPvcName); - boolean successful = - openShiftPvcHelper.createJobPod( - workspacesPvcName, - projectNamespace, - "delete-", - OpenShiftPvcHelper.Command.REMOVE, - dirsToDelete); - if (successful) { - deleteQueue.removeAll(deleteQueueCopy); - } - } -} diff --git a/plugins/plugin-docker/che-plugin-openshift-client/src/main/java/org/eclipse/che/plugin/openshift/client/exception/OpenShiftException.java b/plugins/plugin-docker/che-plugin-openshift-client/src/main/java/org/eclipse/che/plugin/openshift/client/exception/OpenShiftException.java deleted file mode 100644 index ce1fe1b4e1..0000000000 --- a/plugins/plugin-docker/che-plugin-openshift-client/src/main/java/org/eclipse/che/plugin/openshift/client/exception/OpenShiftException.java +++ /dev/null @@ -1,28 +0,0 @@ -/* - * Copyright (c) 2012-2017 Red Hat, Inc. - * All rights reserved. This program and the accompanying materials - * are made available under the terms of the Eclipse Public License v1.0 - * which accompanies this distribution, and is available at - * http://www.eclipse.org/legal/epl-v10.html - * - * Contributors: - * Red Hat, Inc. - initial API and implementation - */ -package org.eclipse.che.plugin.openshift.client.exception; - -import java.io.IOException; - -public class OpenShiftException extends IOException { - - public OpenShiftException(String message) { - super(message); - } - - public OpenShiftException(Throwable cause) { - super(cause); - } - - public OpenShiftException(String message, Throwable cause) { - super(message, cause); - } -} diff --git a/plugins/plugin-docker/che-plugin-openshift-client/src/main/java/org/eclipse/che/plugin/openshift/client/kubernetes/KubernetesContainer.java b/plugins/plugin-docker/che-plugin-openshift-client/src/main/java/org/eclipse/che/plugin/openshift/client/kubernetes/KubernetesContainer.java deleted file mode 100644 index f14e5b5422..0000000000 --- a/plugins/plugin-docker/che-plugin-openshift-client/src/main/java/org/eclipse/che/plugin/openshift/client/kubernetes/KubernetesContainer.java +++ /dev/null @@ -1,58 +0,0 @@ -/* - * Copyright (c) 2012-2017 Red Hat, Inc. - * All rights reserved. This program and the accompanying materials - * are made available under the terms of the Eclipse Public License v1.0 - * which accompanies this distribution, and is available at - * http://www.eclipse.org/legal/epl-v10.html - * - * Contributors: - * Red Hat, Inc. - initial API and implementation - */ -package org.eclipse.che.plugin.openshift.client.kubernetes; - -import static com.google.common.base.Strings.isNullOrEmpty; - -import io.fabric8.kubernetes.api.model.ContainerPort; -import io.fabric8.kubernetes.api.model.ContainerPortBuilder; -import java.util.ArrayList; -import java.util.List; -import java.util.Map; -import java.util.Set; -import org.eclipse.che.plugin.docker.client.json.ContainerConfig; -import org.eclipse.che.plugin.docker.client.json.ImageConfig; - -/** Provides API for managing Kubernetes {@link ContainerPort} */ -public final class KubernetesContainer { - - private KubernetesContainer() {} - - /** - * Retrieves list of ({@link ContainerPort} based on ports defined in {@link ContainerConfig} and - * {@link ImageConfig} - * - * @param exposedPorts - * @return list of {@link ContainerPort} - */ - public static List getContainerPortsFrom( - Set exposedPorts, Map portsToRefName) { - List containerPorts = new ArrayList<>(exposedPorts.size()); - for (String exposedPort : exposedPorts) { - String[] portAndProtocol = exposedPort.split("/", 2); - String port = portAndProtocol[0]; - String protocol = portAndProtocol[1].toUpperCase(); - - int portNumber = Integer.parseInt(port); - String portName = portsToRefName.get(exposedPort); - portName = isNullOrEmpty(portName) ? "server-" + exposedPort.replace("/", "-") : portName; - - ContainerPort containerPort = - new ContainerPortBuilder() - .withName(portName) - .withProtocol(protocol) - .withContainerPort(portNumber) - .build(); - containerPorts.add(containerPort); - } - return containerPorts; - } -} diff --git a/plugins/plugin-docker/che-plugin-openshift-client/src/main/java/org/eclipse/che/plugin/openshift/client/kubernetes/KubernetesEnvVar.java b/plugins/plugin-docker/che-plugin-openshift-client/src/main/java/org/eclipse/che/plugin/openshift/client/kubernetes/KubernetesEnvVar.java deleted file mode 100644 index 0fa7109009..0000000000 --- a/plugins/plugin-docker/che-plugin-openshift-client/src/main/java/org/eclipse/che/plugin/openshift/client/kubernetes/KubernetesEnvVar.java +++ /dev/null @@ -1,47 +0,0 @@ -/* - * Copyright (c) 2012-2017 Red Hat, Inc. - * All rights reserved. This program and the accompanying materials - * are made available under the terms of the Eclipse Public License v1.0 - * which accompanies this distribution, and is available at - * http://www.eclipse.org/legal/epl-v10.html - * - * Contributors: - * Red Hat, Inc. - initial API and implementation - */ -package org.eclipse.che.plugin.openshift.client.kubernetes; - -import io.fabric8.kubernetes.api.model.EnvVar; -import io.fabric8.kubernetes.api.model.EnvVarBuilder; -import java.util.ArrayList; -import java.util.List; -import org.eclipse.che.plugin.docker.client.json.ContainerConfig; -import org.slf4j.Logger; -import org.slf4j.LoggerFactory; - -/** Provides API for managing Kubernetes {@link EnvVar} */ -public final class KubernetesEnvVar { - private static final Logger LOG = LoggerFactory.getLogger(KubernetesEnvVar.class); - - private KubernetesEnvVar() {} - - /** - * Retrieves list of {@link EnvVar} based on environment variables specified in {@link - * ContainerConfig} - * - * @param envVariables - * @return list of {@link EnvVar} - */ - public static List getEnvFrom(String[] envVariables) { - LOG.info("Container environment variables:"); - List env = new ArrayList<>(); - for (String envVariable : envVariables) { - String[] nameAndValue = envVariable.split("=", 2); - String varName = nameAndValue[0]; - String varValue = nameAndValue[1]; - EnvVar envVar = new EnvVarBuilder().withName(varName).withValue(varValue).build(); - env.add(envVar); - LOG.info("- {}={}", varName, varValue); - } - return env; - } -} diff --git a/plugins/plugin-docker/che-plugin-openshift-client/src/main/java/org/eclipse/che/plugin/openshift/client/kubernetes/KubernetesExecHolder.java b/plugins/plugin-docker/che-plugin-openshift-client/src/main/java/org/eclipse/che/plugin/openshift/client/kubernetes/KubernetesExecHolder.java deleted file mode 100644 index 47fb9a2bc4..0000000000 --- a/plugins/plugin-docker/che-plugin-openshift-client/src/main/java/org/eclipse/che/plugin/openshift/client/kubernetes/KubernetesExecHolder.java +++ /dev/null @@ -1,54 +0,0 @@ -/* - * Copyright (c) 2012-2017 Red Hat, Inc. - * All rights reserved. This program and the accompanying materials - * are made available under the terms of the Eclipse Public License v1.0 - * which accompanies this distribution, and is available at - * http://www.eclipse.org/legal/epl-v10.html - * - * Contributors: - * Red Hat, Inc. - initial API and implementation - */ -package org.eclipse.che.plugin.openshift.client.kubernetes; - -import java.util.Arrays; -import org.eclipse.che.plugin.openshift.client.OpenShiftConnector; - -/** - * Holder class for metadata about an exec, to be used with {@link OpenShiftConnector}. - * - *

In OpenShift, {@code createExec()} is not separate from {@code startExec()}, so this class has - * to be used to pass data between {@code createExec()} and {@code startExec()} calls. - * - * @see OpenShiftConnector#createExec(org.eclipse.che.plugin.docker.client.params.CreateExecParams) - * @see OpenShiftConnector#startExec(org.eclipse.che.plugin.docker.client.params.StartExecParams, - * org.eclipse.che.plugin.docker.client.MessageProcessor) - */ -public class KubernetesExecHolder { - - private String[] command; - private String podName; - - public KubernetesExecHolder withCommand(String[] command) { - this.command = command; - return this; - } - - public KubernetesExecHolder withPod(String podName) { - this.podName = podName; - return this; - } - - public String[] getCommand() { - return command; - } - - public String getPod() { - return podName; - } - - public String toString() { - return String.format( - "KubernetesExecHolder {command=%s, podName=%s}", - Arrays.asList(command).toString(), podName); - } -} diff --git a/plugins/plugin-docker/che-plugin-openshift-client/src/main/java/org/eclipse/che/plugin/openshift/client/kubernetes/KubernetesLabelConverter.java b/plugins/plugin-docker/che-plugin-openshift-client/src/main/java/org/eclipse/che/plugin/openshift/client/kubernetes/KubernetesLabelConverter.java deleted file mode 100644 index f2325d4f7a..0000000000 --- a/plugins/plugin-docker/che-plugin-openshift-client/src/main/java/org/eclipse/che/plugin/openshift/client/kubernetes/KubernetesLabelConverter.java +++ /dev/null @@ -1,181 +0,0 @@ -/* - * Copyright (c) 2012-2017 Red Hat, Inc. - * All rights reserved. This program and the accompanying materials - * are made available under the terms of the Eclipse Public License v1.0 - * which accompanies this distribution, and is available at - * http://www.eclipse.org/legal/epl-v10.html - * - * Contributors: - * Red Hat, Inc. - initial API and implementation - */ -package org.eclipse.che.plugin.openshift.client.kubernetes; - -import java.util.HashMap; -import java.util.Map; -import java.util.regex.Matcher; -import java.util.regex.Pattern; -import org.apache.commons.lang.StringUtils; -import org.eclipse.che.plugin.docker.client.json.ContainerConfig; -import org.slf4j.Logger; -import org.slf4j.LoggerFactory; - -/** - * Converter of labels defined in {@link ContainerConfig} for matching to Kubernetes annotation - * requirements - */ -public final class KubernetesLabelConverter { - private static final Logger LOG = LoggerFactory.getLogger(KubernetesLabelConverter.class); - /** Prefix used for che server labels */ - private static final String CHE_SERVER_LABEL_PREFIX = "che:server"; - /** Padding to use when converting server label to DNS name */ - private static final String CHE_SERVER_LABEL_PADDING = "0%s0"; - /** - * Regex to use when matching converted labels -- should match {@link CHE_SERVER_LABEL_PADDING} - */ - private static final Pattern CHE_SERVER_LABEL_KEY = Pattern.compile("^0(.*)0$"); - - private static final String KUBERNETES_ANNOTATION_REGEX = - "([A-Za-z0-9][-A-Za-z0-9_\\.]*)?[A-Za-z0-9]"; - - private KubernetesLabelConverter() {} - - /** @return prefix that is used for Che server labels */ - public static String getCheServerLabelPrefix() { - return CHE_SERVER_LABEL_PREFIX; - } - - /** - * Converts a map of labels to match Kubernetes annotation requirements. Annotations are limited - * to alphanumeric characters, {@code '.'}, {@code '_'} and {@code '-'}, and must start and end - * with an alphanumeric character, i.e. they must match the regex {@code - * ([A-Za-z0-9][-A-Za-z0-9_.]*)?[A-Za-z0-9]} - * - *

Note that entry keys should begin with {@link - * KubernetesLabelConverter#CHE_SERVER_LABEL_PREFIX} and entries should not contain {@code '.'} or - * {@code '_'} before conversion; otherwise label will not be converted and included in output. - * - *

This implementation is relatively fragile -- changes to how Che generates labels may cause - * this method to stop working. In general, it will only be possible to convert labels that are - * alphanumeric plus up to 3 special characters (by converting the special characters to {@code - * '_'}, {@code '-'}, and {@code '.'} as necessary). - * - * @param labels Map of labels to convert - * @return Map of labels converted to DNS Names - */ - public static Map labelsToNames(Map labels) { - Map names = new HashMap<>(); - if (labels == null) { - return names; - } - for (Map.Entry label : labels.entrySet()) { - - if (!hasConversionProblems(label)) { - - String key = label.getKey(); - String value = label.getValue(); - - // Convert keys: e.g. "che:server:4401/tcp:ref" -> - // "che.server.4401-tcp.ref" - key = convertLabelKey(key); - // Convert values: e.g. "/api" -> ".api" -- note values may - // include '-' e.g. "tomcat-debug" - value = convertLabelValue(value); - - // Add padding since DNS names must start and end with - // alphanumeric characters - key = addPadding(key); - value = addPadding(value); - - if (matchesKubernetesLabelRegex(key) && matchesKubernetesLabelRegex(value)) { - names.put(key, value); - } else { - LOG.error( - "Could not convert label {} into Kubernetes annotation: labels must be alphanumeric with ':' and '/'", - label.toString()); - } - } - } - return names; - } - - /** - * Undoes the label conversion done by {@link KubernetesLabelConverter#labelsToNames(Map)} - * - * @param labels Map of DNS names - * @return Map of unconverted labels - */ - public static Map namesToLabels(Map names) { - Map labels = new HashMap<>(); - if (names == null) { - return labels; - } - for (Map.Entry entry : names.entrySet()) { - String key = entry.getKey(); - String value = entry.getValue(); - - // Remove padding - Matcher keyMatcher = CHE_SERVER_LABEL_KEY.matcher(key); - Matcher valueMatcher = CHE_SERVER_LABEL_KEY.matcher(value); - if (!keyMatcher.matches() || !valueMatcher.matches()) { - continue; - } - key = keyMatcher.group(1); - value = valueMatcher.group(1); - - // Convert key: e.g. "che.server.4401_tcp.ref" -> "che:server:4401/tcp:ref" - key = key.replaceAll("\\.", ":").replaceAll("_", "/"); - // Convert value: e.g. Convert values: e.g. "_api" -> "/api" - value = value.replaceAll("_", "/"); - - labels.put(key, value); - } - return labels; - } - - /** - * Checks if there are any potential problems coupled with label conversion - * - * @param label - * @return true if label has no conversion issues, false otherwise - */ - private static boolean hasConversionProblems(final Map.Entry label) { - boolean hasProblems = false; - String key = label.getKey(); - String value = label.getValue(); - - if (StringUtils.isBlank(value)) { - LOG.error("The label {} is blank", label.toString()); - hasProblems = true; - } else if (key.contains(".") || key.contains("_") || value.contains("_")) { - LOG.error( - "Cannot convert label {} to DNS Name: '-' and '.' are used as escape characters", - label.toString()); - hasProblems = true; - } else if (!key.startsWith(CHE_SERVER_LABEL_PREFIX)) { - LOG.warn( - "Expected CreateContainerParams label key {} to start with {}", - key, - CHE_SERVER_LABEL_PREFIX); - } - return hasProblems; - } - - /** Convert keys: e.g. "che:server:4401/tcp:ref" -> "che.server.4401-tcp.ref" */ - private static String convertLabelKey(final String key) { - return key.replaceAll(":", ".").replaceAll("/", "_"); - } - - /** Convert values: e.g. "/api" -> ".api" Note: values may include '-' e.g. "tomcat-debug" */ - private static String convertLabelValue(final String value) { - return value.replaceAll("/", "_"); - } - - /** Adds padding since DNS names must start and end with alphanumeric characters */ - private static String addPadding(final String label) { - return String.format(CHE_SERVER_LABEL_PADDING, label); - } - - private static boolean matchesKubernetesLabelRegex(final String label) { - return label.matches(KUBERNETES_ANNOTATION_REGEX); - } -} diff --git a/plugins/plugin-docker/che-plugin-openshift-client/src/main/java/org/eclipse/che/plugin/openshift/client/kubernetes/KubernetesOutputAdapter.java b/plugins/plugin-docker/che-plugin-openshift-client/src/main/java/org/eclipse/che/plugin/openshift/client/kubernetes/KubernetesOutputAdapter.java deleted file mode 100644 index 0d297c65bc..0000000000 --- a/plugins/plugin-docker/che-plugin-openshift-client/src/main/java/org/eclipse/che/plugin/openshift/client/kubernetes/KubernetesOutputAdapter.java +++ /dev/null @@ -1,72 +0,0 @@ -/* - * Copyright (c) 2012-2017 Red Hat, Inc. - * All rights reserved. This program and the accompanying materials - * are made available under the terms of the Eclipse Public License v1.0 - * which accompanies this distribution, and is available at - * http://www.eclipse.org/legal/epl-v10.html - * - * Contributors: - * Red Hat, Inc. - initial API and implementation - */ -package org.eclipse.che.plugin.openshift.client.kubernetes; - -import io.fabric8.kubernetes.client.Callback; -import io.fabric8.kubernetes.client.utils.InputStreamPumper; -import org.eclipse.che.commons.annotation.Nullable; -import org.eclipse.che.plugin.docker.client.LogMessage; -import org.eclipse.che.plugin.docker.client.MessageProcessor; - -/** - * Adapter class for passing data from a {@code kubernetes-client} output stream (e.g. for an exec - * call) to {@link MessageProcessor}. This class should be passed to a {@link InputStreamPumper} - * along with the output of the exec call. - * - *

Output passed in via the {@link #call(byte[])} method is parsed into lines, (respecting {@code - * '\n'} and {@code CRLF} as line separators), and passed to the {@link MessageProcessor} as {@link - * LogMessage}s. - */ -public class KubernetesOutputAdapter implements Callback { - - private LogMessage.Type type; - private MessageProcessor execOutputProcessor; - private StringBuilder lineBuffer; - - /** - * Create a new KubernetesOutputAdapter - * - * @param type the type of LogMessages being passed to the MessageProcessor - * @param processor the processor receiving LogMessages. If null, calling {@link #call(byte[])} - * will return immediately. - */ - public KubernetesOutputAdapter( - LogMessage.Type type, @Nullable MessageProcessor processor) { - this.type = type; - this.execOutputProcessor = processor; - this.lineBuffer = new StringBuilder(); - } - - @Override - public void call(byte[] data) { - if (data == null || data.length == 0 || execOutputProcessor == null) { - return; - } - int start = 0; - int offset = 0; - - for (int pos = 0; pos < data.length; pos++) { - if (data[pos] == '\n' || data[pos] == '\r') { - offset = pos - start; - String line = new String(data, start, offset); - lineBuffer.append(line); - execOutputProcessor.process(new LogMessage(type, lineBuffer.toString())); - lineBuffer.setLength(0); - if (data[pos] == '\r') { - pos += 1; - } - start = pos + 1; - } - } - String trailingChars = new String(data, start, data.length - start); - lineBuffer.append(trailingChars); - } -} diff --git a/plugins/plugin-docker/che-plugin-openshift-client/src/main/java/org/eclipse/che/plugin/openshift/client/kubernetes/KubernetesResourceUtil.java b/plugins/plugin-docker/che-plugin-openshift-client/src/main/java/org/eclipse/che/plugin/openshift/client/kubernetes/KubernetesResourceUtil.java deleted file mode 100644 index 72a530bddf..0000000000 --- a/plugins/plugin-docker/che-plugin-openshift-client/src/main/java/org/eclipse/che/plugin/openshift/client/kubernetes/KubernetesResourceUtil.java +++ /dev/null @@ -1,100 +0,0 @@ -/* - * Copyright (c) 2012-2017 Red Hat, Inc. - * All rights reserved. This program and the accompanying materials - * are made available under the terms of the Eclipse Public License v1.0 - * which accompanies this distribution, and is available at - * http://www.eclipse.org/legal/epl-v10.html - * - * Contributors: - * Red Hat, Inc. - initial API and implementation - */ -package org.eclipse.che.plugin.openshift.client.kubernetes; - -import io.fabric8.kubernetes.api.model.Service; -import io.fabric8.kubernetes.api.model.ServiceList; -import io.fabric8.kubernetes.api.model.extensions.Deployment; -import io.fabric8.kubernetes.api.model.extensions.ReplicaSet; -import io.fabric8.openshift.api.model.Route; -import io.fabric8.openshift.api.model.RouteList; -import io.fabric8.openshift.client.DefaultOpenShiftClient; -import io.fabric8.openshift.client.OpenShiftClient; -import java.io.IOException; -import java.util.List; -import org.slf4j.Logger; -import org.slf4j.LoggerFactory; - -public final class KubernetesResourceUtil { - private static final Logger LOG = LoggerFactory.getLogger(KubernetesResourceUtil.class); - - private KubernetesResourceUtil() {} - - public static Deployment getDeploymentByName(String deploymentName, String namespace) - throws IOException { - try (OpenShiftClient openShiftClient = new DefaultOpenShiftClient()) { - Deployment deployment = - openShiftClient - .extensions() - .deployments() - .inNamespace(namespace) - .withName(deploymentName) - .get(); - if (deployment == null) { - LOG.warn("No Deployment with name {} could be found", deploymentName); - } - return deployment; - } - } - - public static Service getServiceBySelector( - final String selectorKey, final String selectorValue, final String namespace) { - try (OpenShiftClient openShiftClient = new DefaultOpenShiftClient()) { - ServiceList svcs = openShiftClient.services().inNamespace(namespace).list(); - - Service svc = - svcs.getItems() - .stream() - .filter(s -> s.getSpec().getSelector().containsKey(selectorKey)) - .filter(s -> s.getSpec().getSelector().get(selectorKey).equals(selectorValue)) - .findAny() - .orElse(null); - - if (svc == null) { - LOG.warn("No Service with selector {}={} could be found", selectorKey, selectorValue); - } - return svc; - } - } - - public static List getRoutesByLabel( - final String labelKey, final String labelValue, final String namespace) throws IOException { - try (OpenShiftClient openShiftClient = new DefaultOpenShiftClient()) { - RouteList routeList = - openShiftClient.routes().inNamespace(namespace).withLabel(labelKey, labelValue).list(); - - List items = routeList.getItems(); - - if (items.isEmpty()) { - LOG.warn("No Route with label {}={} could be found", labelKey, labelValue); - throw new IOException( - "No Route with label " + labelKey + "=" + labelValue + " could be found"); - } - - return items; - } - } - - public static List getReplicaSetByLabel( - final String key, final String value, final String namespace) { - try (OpenShiftClient openShiftClient = new DefaultOpenShiftClient()) { - List replicaSets = - openShiftClient - .extensions() - .replicaSets() - .inNamespace(namespace) - .withLabel(key, value) - .list() - .getItems(); - return replicaSets; - } - } -} diff --git a/plugins/plugin-docker/che-plugin-openshift-client/src/main/java/org/eclipse/che/plugin/openshift/client/kubernetes/KubernetesService.java b/plugins/plugin-docker/che-plugin-openshift-client/src/main/java/org/eclipse/che/plugin/openshift/client/kubernetes/KubernetesService.java deleted file mode 100644 index 6d0727844d..0000000000 --- a/plugins/plugin-docker/che-plugin-openshift-client/src/main/java/org/eclipse/che/plugin/openshift/client/kubernetes/KubernetesService.java +++ /dev/null @@ -1,58 +0,0 @@ -/* - * Copyright (c) 2012-2017 Red Hat, Inc. - * All rights reserved. This program and the accompanying materials - * are made available under the terms of the Eclipse Public License v1.0 - * which accompanies this distribution, and is available at - * http://www.eclipse.org/legal/epl-v10.html - * - * Contributors: - * Red Hat, Inc. - initial API and implementation - */ -package org.eclipse.che.plugin.openshift.client.kubernetes; - -import static com.google.common.base.Strings.isNullOrEmpty; - -import io.fabric8.kubernetes.api.model.IntOrString; -import io.fabric8.kubernetes.api.model.ServicePort; -import java.util.ArrayList; -import java.util.List; -import java.util.Map; -import java.util.Set; -import org.eclipse.che.plugin.docker.client.json.ContainerConfig; -import org.eclipse.che.plugin.docker.client.json.ImageConfig; - -/** Provides API for managing Kubernetes {@link ServicePort} */ -public final class KubernetesService { - - private KubernetesService() {} - - /** - * Retrieves list of {@link ServicePort} based on ports defined in {@link ContainerConfig} and - * {@link ImageConfig} - * - * @param exposedPorts - * @return list of {@link ServicePort} - */ - public static List getServicePortsFrom( - Set exposedPorts, Map portsToRefName) { - List servicePorts = new ArrayList<>(exposedPorts.size()); - for (String exposedPort : exposedPorts) { - String[] portAndProtocol = exposedPort.split("/", 2); - String port = portAndProtocol[0]; - String protocol = portAndProtocol[1]; - - int portNumber = Integer.parseInt(port); - String portName = portsToRefName.get(exposedPort); - portName = isNullOrEmpty(portName) ? "server-" + exposedPort.replace("/", "-") : portName; - - int targetPortNumber = portNumber; - ServicePort servicePort = new ServicePort(); - servicePort.setName(portName); - servicePort.setProtocol(protocol.toUpperCase()); - servicePort.setPort(portNumber); - servicePort.setTargetPort(new IntOrString(targetPortNumber)); - servicePorts.add(servicePort); - } - return servicePorts; - } -} diff --git a/plugins/plugin-docker/che-plugin-openshift-client/src/main/java/org/eclipse/che/plugin/openshift/client/kubernetes/KubernetesStringUtils.java b/plugins/plugin-docker/che-plugin-openshift-client/src/main/java/org/eclipse/che/plugin/openshift/client/kubernetes/KubernetesStringUtils.java deleted file mode 100644 index 1e2009720e..0000000000 --- a/plugins/plugin-docker/che-plugin-openshift-client/src/main/java/org/eclipse/che/plugin/openshift/client/kubernetes/KubernetesStringUtils.java +++ /dev/null @@ -1,176 +0,0 @@ -/* - * Copyright (c) 2012-2017 Red Hat, Inc. - * All rights reserved. This program and the accompanying materials - * are made available under the terms of the Eclipse Public License v1.0 - * which accompanies this distribution, and is available at - * http://www.eclipse.org/legal/epl-v10.html - * - * Contributors: - * Red Hat, Inc. - initial API and implementation - */ -package org.eclipse.che.plugin.openshift.client.kubernetes; - -import org.apache.commons.lang.RandomStringUtils; -import org.apache.commons.lang.StringUtils; - -public final class KubernetesStringUtils { - - /** Max length of a Kubernetes name or label; */ - private static final int MAX_CHARS = 63; - - private static final String DOCKER_PREFIX = "docker://"; - - private KubernetesStringUtils() {} - - /** - * Converts strings to fit requirements of Kubernetes names and labels. Names in Kubernetes are - * limited to 63 characters. - * - * @param input the string to normalize - * @return the normalized string. - */ - public static String getNormalizedString(String input) { - int end = Math.min(input.length(), MAX_CHARS - 1); - return input.substring(0, end); - } - - /** - * @param containerID - * @return normalized version of 'ContainerID' without 'docker://' prefix and double quotes - */ - public static String normalizeContainerID(final String containerID) { - return StringUtils.replaceOnce(containerID, DOCKER_PREFIX, "").replace("\"", ""); - } - - /** - * @param containerID - * @return label based on 'ContainerID' (first 12 chars of ID) - */ - public static String getLabelFromContainerID(final String containerID) { - return StringUtils.substring(containerID, 0, 12); - } - - /** - * Che workspace id is used as OpenShift service / deployment config name and must match the regex - * [a-z]([-a-z0-9]*[a-z0-9]) e.g. "q5iuhkwjvw1w9emg" - * - * @return randomly generated workspace id - */ - public static String generateWorkspaceID() { - return RandomStringUtils.random(16, true, true).toLowerCase(); - } - - /** - * Converts a String into a suitable name for an openshift container. Kubernetes names are limited - * to 63 chars and must match the regex {@code [a-z0-9]([-a-z0-9]*[a-z0-9])?} - * - * @param input the string to convert - */ - public static String convertToContainerName(String input) { - if (input.startsWith("workspace")) { - input = input.replaceFirst("workspace", ""); - } - return getNormalizedString(input.replaceAll("_", "-")); - } - - /** - * Converts image stream name (e.g. eclipse/ubuntu_jdk8 to eclipse_ubuntu_jdk8). This has to be - * done because for OpenShift ImageStream names, the organization component of a docker repository - * is the namespace of the ImageStream, and so '/' is not supported in ImageStream names. - * - * @param repository the original docker repository String. - * @return - */ - public static String convertPullSpecToImageStreamName(String repository) { - repository = stripTagFromPullSpec(repository); - return getNormalizedString(repository.replaceAll("/", "_")); - } - - /** - * Generates a name to be used as a tag from a docker repository. In OpenShift, tagging - * functionality is limited, so while in Docker we may want to - * - *

{@code docker tag eclipse/ubuntu_jdk8 eclipse-che/}, - * - *

this is not possible in OpenShift. This method returns a trimmed version of {@code - * } - * - * @param repository the target repository spec in a {@code docker tag} command. - * @return an appropriate tag name - */ - public static String convertPullSpecToTagName(String repository) { - String name; - if (repository.contains("/")) { - String[] nameSegments = repository.split("/"); - name = nameSegments[nameSegments.length - 1]; - } else { - name = repository; - } - name = stripTagFromPullSpec(name); - name = - name.replaceAll("workspace", "") - .replaceAll("machine", "") - .replaceAll("che_.*", "") - .replaceAll("_", ""); - - return getNormalizedString(name); - } - - /** - * Gets an ImageStreamTag name from docker pull specs by converting repository strings to suit the - * convention used in {@link KubernetesStringUtils#convertPullSpecToImageStreamName(String)} and - * {@link KubernetesStringUtils#convertPullSpecToTagName(String)}. - * - *

e.g. will convert {@code eclipse/ubuntu_jdk8} and {@code eclipse-che/} into - * {@code eclipse_ubuntu_jdk8:} - * - * @param oldRepository The docker image repository that is tracked by the ImageStream - * @param newRepository The docker repository that has been tagged to follow oldRepository - * @return A string that can be used to refer to the ImageStreamTag formed from these - * repositories. - */ - public static String createImageStreamTagName(String oldRepository, String newRepository) { - String tag = convertPullSpecToTagName(newRepository); - String repo = convertPullSpecToImageStreamName(oldRepository); - return getNormalizedString(String.format("%s:%s", repo, tag)); - } - - /** - * Gets the ImageStreamName fromm a docker pull spec. For example, provided {@code - * []/[]/:[]}, will return just {@code } - * - *

In the case where the pull spec does not contain optional components, this method simply - * returns the pull spec provided. - * - * @param pullSpec - * @return - */ - public static String getImageStreamNameFromPullSpec(String pullSpec) { - return pullSpec.replaceAll(".*/", "").replaceAll(":.*", ""); - } - - /** - * Remove the tag from a pull spec, if applicable. If pull spec does not include a tag, returns - * the pull spec unchanged. - * - * @param pullSpec - * @return - */ - public static String stripTagFromPullSpec(String pullSpec) { - return pullSpec.replaceAll(":.*", ""); - } - - /** - * Gets the tag fromm a docker pull spec. For example, provided {@code - * []/[]/:[]}, will return just {@code } - * - * @param pullSpec - * @return the tag on the pull spec, or null if pull spec does not contain a tag - */ - public static String getTagNameFromPullSpec(String pullSpec) { - if (!pullSpec.contains(":")) { - return null; - } - return pullSpec.replaceAll(".*:", ""); - } -} diff --git a/plugins/plugin-docker/che-plugin-openshift-client/src/test/java/org/eclipse/che/plugin/openshift/client/OpenShiftConnectorTest.java b/plugins/plugin-docker/che-plugin-openshift-client/src/test/java/org/eclipse/che/plugin/openshift/client/OpenShiftConnectorTest.java deleted file mode 100644 index 3242dfcf34..0000000000 --- a/plugins/plugin-docker/che-plugin-openshift-client/src/test/java/org/eclipse/che/plugin/openshift/client/OpenShiftConnectorTest.java +++ /dev/null @@ -1,135 +0,0 @@ -/* - * Copyright (c) 2012-2017 Red Hat, Inc. - * All rights reserved. This program and the accompanying materials - * are made available under the terms of the Eclipse Public License v1.0 - * which accompanies this distribution, and is available at - * http://www.eclipse.org/legal/epl-v10.html - * - * Contributors: - * Red Hat, Inc. - initial API and implementation - */ -package org.eclipse.che.plugin.openshift.client; - -import static org.mockito.Mockito.mock; -import static org.mockito.Mockito.when; -import static org.testng.Assert.assertEquals; -import static org.testng.Assert.assertNotNull; - -import java.io.IOException; -import java.util.Map; -import java.util.Set; -import org.eclipse.che.api.core.notification.EventService; -import org.eclipse.che.plugin.docker.client.DockerApiVersionPathPrefixProvider; -import org.eclipse.che.plugin.docker.client.DockerConnectorConfiguration; -import org.eclipse.che.plugin.docker.client.DockerRegistryAuthResolver; -import org.eclipse.che.plugin.docker.client.connection.DockerConnectionFactory; -import org.eclipse.che.plugin.docker.client.json.ContainerConfig; -import org.eclipse.che.plugin.docker.client.json.ImageConfig; -import org.eclipse.che.plugin.docker.client.params.CreateContainerParams; -import org.mockito.Mock; -import org.mockito.Mockito; -import org.mockito.testng.MockitoTestNGListener; -import org.testng.annotations.BeforeMethod; -import org.testng.annotations.Listeners; -import org.testng.annotations.Test; - -@Listeners(MockitoTestNGListener.class) -public class OpenShiftConnectorTest { - private static final String[] CONTAINER_ENV_VARIABLES = {"CHE_WORKSPACE_ID=abcd1234"}; - private static final String CHE_DEFAULT_OPENSHIFT_PROJECT_NAME = "eclipse-che"; - private static final int OPENSHIFT_LIVENESS_PROBE_DELAY = 300; - private static final int OPENSHIFT_LIVENESS_PROBE_TIMEOUT = 1; - private static final String OPENSHIFT_DEFAULT_WORKSPACE_PERSISTENT_VOLUME_CLAIM = - "che_claim_data"; - private static final String OPENSHIFT_DEFAULT_WORKSPACE_QUANTITY = "10Gi"; - private static final String OPENSHIFT_DEFAULT_WORKSPACE_STORAGE = "/data/workspaces"; - private static final String OPENSHIFT_DEFAULT_WORKSPACE_PROJECTS_STORAGE = "/projects"; - private static final String CHE_DEFAULT_SERVER_EXTERNAL_ADDRESS = "che.openshift.mini"; - private static final String CHE_WORKSPACE_CPU_LIMIT = "1"; - private static final boolean SECURE_ROUTES = false; - private static final boolean CREATE_WORKSPACE_DIRS = true; - - @Mock private DockerConnectorConfiguration dockerConnectorConfiguration; - @Mock private DockerConnectionFactory dockerConnectionFactory; - @Mock private DockerRegistryAuthResolver authManager; - @Mock private DockerApiVersionPathPrefixProvider dockerApiVersionPathPrefixProvider; - @Mock private CreateContainerParams createContainerParams; - @Mock private EventService eventService; - @Mock private OpenShiftPvcHelper openShiftPvcHelper; - @Mock private OpenShiftRouteCreator openShiftRouteCreator; - @Mock private OpenShiftDeploymentCleaner openShiftDeploymentCleaner; - - private OpenShiftConnector openShiftConnector; - - @BeforeMethod - private void setup() { - - //When - openShiftConnector = - new OpenShiftConnector( - dockerConnectorConfiguration, - dockerConnectionFactory, - authManager, - dockerApiVersionPathPrefixProvider, - openShiftPvcHelper, - openShiftRouteCreator, - openShiftDeploymentCleaner, - eventService, - CHE_DEFAULT_SERVER_EXTERNAL_ADDRESS, - CHE_DEFAULT_OPENSHIFT_PROJECT_NAME, - OPENSHIFT_LIVENESS_PROBE_DELAY, - OPENSHIFT_LIVENESS_PROBE_TIMEOUT, - OPENSHIFT_DEFAULT_WORKSPACE_PERSISTENT_VOLUME_CLAIM, - OPENSHIFT_DEFAULT_WORKSPACE_QUANTITY, - OPENSHIFT_DEFAULT_WORKSPACE_STORAGE, - OPENSHIFT_DEFAULT_WORKSPACE_PROJECTS_STORAGE, - CHE_WORKSPACE_CPU_LIMIT, - null, - SECURE_ROUTES, - CREATE_WORKSPACE_DIRS); - } - - @Test - public void shouldGetWorkspaceIDWhenAValidOneIsProvidedInCreateContainerParams() - throws IOException { - //Given - String expectedWorkspaceID = "abcd1234"; - ContainerConfig containerConfig = mock(ContainerConfig.class); - CreateContainerParams createContainerParams = CreateContainerParams.create(containerConfig); - - when(containerConfig.getEnv()).thenReturn(CONTAINER_ENV_VARIABLES); - - String workspaceID = openShiftConnector.getCheWorkspaceId(createContainerParams); - - //Then - assertEquals(workspaceID, expectedWorkspaceID); - } - - /** Check that we return empty map if no labels and not a NPE */ - @Test - public void checkWithNoLabels() { - ContainerConfig containerConfig = Mockito.mock(ContainerConfig.class); - when(containerConfig.getLabels()).thenReturn(null); - - ImageConfig imageConfig = Mockito.mock(ImageConfig.class); - when(imageConfig.getLabels()).thenReturn(null); - - Map map = openShiftConnector.getLabels(containerConfig, imageConfig); - assertNotNull(map); - assertEquals(map.size(), 0); - } - - /** Check that we return empty ports if no export ports and not a NPE */ - @Test - public void checkWithNoExposedPorts() { - ContainerConfig containerConfig = Mockito.mock(ContainerConfig.class); - when(containerConfig.getExposedPorts()).thenReturn(null); - - ImageConfig imageConfig = Mockito.mock(ImageConfig.class); - when(imageConfig.getExposedPorts()).thenReturn(null); - - Set mapPorts = openShiftConnector.getExposedPorts(containerConfig, imageConfig); - assertNotNull(mapPorts); - assertEquals(mapPorts.size(), 0); - } -} diff --git a/plugins/plugin-docker/che-plugin-openshift-client/src/test/java/org/eclipse/che/plugin/openshift/client/OpenShiftWorkspaceFilesCleanerTest.java b/plugins/plugin-docker/che-plugin-openshift-client/src/test/java/org/eclipse/che/plugin/openshift/client/OpenShiftWorkspaceFilesCleanerTest.java deleted file mode 100644 index 93c1c2c990..0000000000 --- a/plugins/plugin-docker/che-plugin-openshift-client/src/test/java/org/eclipse/che/plugin/openshift/client/OpenShiftWorkspaceFilesCleanerTest.java +++ /dev/null @@ -1,218 +0,0 @@ -/* - * Copyright (c) 2012-2017 Red Hat, Inc. - * All rights reserved. This program and the accompanying materials - * are made available under the terms of the Eclipse Public License v1.0 - * which accompanies this distribution, and is available at - * http://www.eclipse.org/legal/epl-v10.html - * - * Contributors: - * Red Hat, Inc. - initial API and implementation - */ -package org.eclipse.che.plugin.openshift.client; - -import static org.mockito.Matchers.anyString; -import static org.mockito.Mockito.any; -import static org.mockito.Mockito.doNothing; -import static org.mockito.Mockito.eq; -import static org.mockito.Mockito.mock; -import static org.mockito.Mockito.never; -import static org.mockito.Mockito.spy; -import static org.mockito.Mockito.times; -import static org.mockito.Mockito.verify; -import static org.mockito.Mockito.when; -import static org.testng.Assert.assertEquals; - -import java.io.IOException; -import java.util.Arrays; -import java.util.List; -import org.eclipse.che.api.core.ServerException; -import org.eclipse.che.api.core.model.workspace.Workspace; -import org.eclipse.che.api.core.notification.EventService; -import org.eclipse.che.api.core.notification.EventSubscriber; -import org.eclipse.che.api.workspace.server.event.ServerIdleEvent; -import org.eclipse.che.api.workspace.server.model.impl.WorkspaceConfigImpl; -import org.eclipse.che.api.workspace.server.model.impl.WorkspaceImpl; -import org.eclipse.che.api.workspace.shared.event.WorkspaceRemovedEvent; -import org.mockito.ArgumentCaptor; -import org.mockito.Captor; -import org.mockito.Mock; -import org.mockito.MockitoAnnotations; -import org.testng.annotations.BeforeMethod; -import org.testng.annotations.Test; - -public class OpenShiftWorkspaceFilesCleanerTest { - - private static final String CHE_OPENSHIFT_PROJECT = "eclipse-che"; - private static final String WORKSPACES_PVC_NAME = "che-data-volume"; - private static final String WORKSPACE_ONE = "testworkspaceone"; - private static final String WORKSPACE_TWO = "testworkspacetwo"; - - @Mock private OpenShiftPvcHelper pvcHelper; - @Captor private ArgumentCaptor> subscriberCaptor; - - private OpenShiftWorkspaceFilesCleaner cleaner; - - @BeforeMethod - public void setup() { - MockitoAnnotations.initMocks(this); - cleaner = - new OpenShiftWorkspaceFilesCleaner(pvcHelper, CHE_OPENSHIFT_PROJECT, WORKSPACES_PVC_NAME); - } - - @Test - public void shouldSubscribeToEventService() { - //given - EventService eventService = mock(EventService.class); - - //when - cleaner.subscribe(eventService); - - //then - verify(eventService).subscribe(cleaner); - verify(eventService).subscribe(any(), eq(ServerIdleEvent.class)); - } - - @Test - public void shouldDeleteWorkspaceInQueueOnServerIdleEvent() { - //given - OpenShiftWorkspaceFilesCleaner spyCleaner = spy(cleaner); - doNothing().when(spyCleaner).deleteWorkspacesInQueue(); - - EventService eventService = mock(EventService.class); - spyCleaner.subscribe(eventService); - verify(eventService).subscribe(subscriberCaptor.capture(), eq(ServerIdleEvent.class)); - EventSubscriber subscriber = subscriberCaptor.getValue(); - - //when - subscriber.onEvent(new ServerIdleEvent(1000)); - - //then - verify(spyCleaner).deleteWorkspacesInQueue(); - } - - @Test - public void shouldDoNothingWithoutIdleEvent() throws ServerException, IOException { - // Given - Workspace workspace = generateWorkspace(WORKSPACE_ONE); - - // When - cleaner.onEvent(new WorkspaceRemovedEvent(workspace)); - - // Then - verify(pvcHelper, never()) - .createJobPod( - anyString(), - anyString(), - anyString(), - any(OpenShiftPvcHelper.Command.class), - any(String[].class)); - } - - @Test - public void shouldDeleteWorkspaceOnIdleEvent() throws ServerException, IOException { - // Given - Workspace workspace = generateWorkspace(WORKSPACE_ONE); - - // When - cleaner.onEvent(new WorkspaceRemovedEvent(workspace)); - cleaner.deleteWorkspacesInQueue(); - - // Then - verify(pvcHelper, times(1)) - .createJobPod( - anyString(), - anyString(), - anyString(), - eq(OpenShiftPvcHelper.Command.REMOVE), - eq(WORKSPACE_ONE)); - } - - @Test - public void shouldDeleteMultipleQueuedWorkspacesAtOnce() throws ServerException, IOException { - // Given - Workspace workspaceOne = generateWorkspace(WORKSPACE_ONE); - Workspace workspaceTwo = generateWorkspace(WORKSPACE_TWO); - String[] expectedDirs = new String[] {WORKSPACE_ONE, WORKSPACE_TWO}; - ArgumentCaptor dirCaptor = ArgumentCaptor.forClass(String.class); - - // When - cleaner.onEvent(new WorkspaceRemovedEvent(workspaceOne)); - cleaner.onEvent(new WorkspaceRemovedEvent(workspaceTwo)); - cleaner.deleteWorkspacesInQueue(); - - // Then - verify(pvcHelper, times(1)) - .createJobPod( - anyString(), - anyString(), - anyString(), - eq(OpenShiftPvcHelper.Command.REMOVE), - dirCaptor.capture(), // Varargs capture doesn't seem to work. - dirCaptor.capture()); - - List dirs = dirCaptor.getAllValues(); - String[] actualDirs = dirs.toArray(new String[dirs.size()]); - // Sort arrays to ignore order - Arrays.sort(actualDirs); - Arrays.sort(expectedDirs); - assertEquals(actualDirs, expectedDirs, "Expected all dirs to be deleted when server is idled."); - } - - @Test - public void shouldRetainQueueIfDeletionFails() throws ServerException, IOException { - // Given - Workspace workspaceOne = generateWorkspace(WORKSPACE_ONE); - when(pvcHelper.createJobPod(any(), any(), any(), any(), any())).thenReturn(false); - - // When - cleaner.onEvent(new WorkspaceRemovedEvent(workspaceOne)); - cleaner.deleteWorkspacesInQueue(); - - // Then - verify(pvcHelper, times(1)) - .createJobPod( - anyString(), - anyString(), - anyString(), - eq(OpenShiftPvcHelper.Command.REMOVE), - eq(WORKSPACE_ONE)); - - // When - cleaner.deleteWorkspacesInQueue(); - - // Then - verify(pvcHelper, times(2)) - .createJobPod( - anyString(), - anyString(), - anyString(), - eq(OpenShiftPvcHelper.Command.REMOVE), - eq(WORKSPACE_ONE)); - } - - @Test - public void shouldUseProjectNamespaceAndPvcNameAsParameters() - throws ServerException, IOException { - // Given - Workspace workspaceOne = generateWorkspace(WORKSPACE_ONE); - - // When - cleaner.onEvent(new WorkspaceRemovedEvent(workspaceOne)); - cleaner.deleteWorkspacesInQueue(); - - // Then - verify(pvcHelper, times(1)) - .createJobPod( - eq(WORKSPACES_PVC_NAME), - eq(CHE_OPENSHIFT_PROJECT), - anyString(), - eq(OpenShiftPvcHelper.Command.REMOVE), - eq(WORKSPACE_ONE)); - } - - private Workspace generateWorkspace(String id) { - WorkspaceConfigImpl config = new WorkspaceConfigImpl(); - config.setName(id); - return new WorkspaceImpl(id, null, config); - } -} diff --git a/plugins/plugin-docker/che-plugin-openshift-client/src/test/java/org/eclipse/che/plugin/openshift/client/kubernetes/KubernetesContainerTest.java b/plugins/plugin-docker/che-plugin-openshift-client/src/test/java/org/eclipse/che/plugin/openshift/client/kubernetes/KubernetesContainerTest.java deleted file mode 100644 index be4622a701..0000000000 --- a/plugins/plugin-docker/che-plugin-openshift-client/src/test/java/org/eclipse/che/plugin/openshift/client/kubernetes/KubernetesContainerTest.java +++ /dev/null @@ -1,71 +0,0 @@ -/* - * Copyright (c) 2012-2017 Red Hat, Inc. - * All rights reserved. This program and the accompanying materials - * are made available under the terms of the Eclipse Public License v1.0 - * which accompanies this distribution, and is available at - * http://www.eclipse.org/legal/epl-v10.html - * - * Contributors: - * Red Hat, Inc. - initial API and implementation - */ -package org.eclipse.che.plugin.openshift.client.kubernetes; - -import static org.testng.Assert.assertTrue; - -import io.fabric8.kubernetes.api.model.ContainerPort; -import java.util.HashMap; -import java.util.HashSet; -import java.util.List; -import java.util.Map; -import java.util.Set; -import java.util.stream.Collectors; -import org.eclipse.che.plugin.docker.client.json.ExposedPort; -import org.testng.annotations.Test; - -public class KubernetesContainerTest { - - @Test - public void shouldReturnContainerPortFromExposedPortList() { - // Given - Set exposedPorts = new HashSet<>(); - exposedPorts.add("8080/tcp"); - exposedPorts.add("22/tcp"); - exposedPorts.add("4401/tcp"); - exposedPorts.add("4403/tcp"); - Map portsToRefName = new HashMap<>(); - portsToRefName.put("8080/tcp", "tomcat"); - - // When - List containerPorts = - KubernetesContainer.getContainerPortsFrom(exposedPorts, portsToRefName); - - // Then - List portsAndProtocols = - containerPorts - .stream() - .map(p -> Integer.toString(p.getContainerPort()) + "/" + p.getProtocol().toLowerCase()) - .collect(Collectors.toList()); - assertTrue(exposedPorts.stream().allMatch(portsAndProtocols::contains)); - } - - @Test - public void shouldReturnContainerPortListFromImageExposedPortList() { - // Given - Map imageExposedPorts = new HashMap<>(); - imageExposedPorts.put("8080/tcp", new ExposedPort()); - Map portsToRefName = new HashMap<>(); - portsToRefName.put("8080/tcp", "tomcat"); - - // When - List containerPorts = - KubernetesContainer.getContainerPortsFrom(imageExposedPorts.keySet(), portsToRefName); - - // Then - List portsAndProtocols = - containerPorts - .stream() - .map(p -> Integer.toString(p.getContainerPort()) + "/" + p.getProtocol().toLowerCase()) - .collect(Collectors.toList()); - assertTrue(imageExposedPorts.keySet().stream().allMatch(portsAndProtocols::contains)); - } -} diff --git a/plugins/plugin-docker/che-plugin-openshift-client/src/test/java/org/eclipse/che/plugin/openshift/client/kubernetes/KubernetesEnvVarTest.java b/plugins/plugin-docker/che-plugin-openshift-client/src/test/java/org/eclipse/che/plugin/openshift/client/kubernetes/KubernetesEnvVarTest.java deleted file mode 100644 index 9c09b7fb26..0000000000 --- a/plugins/plugin-docker/che-plugin-openshift-client/src/test/java/org/eclipse/che/plugin/openshift/client/kubernetes/KubernetesEnvVarTest.java +++ /dev/null @@ -1,47 +0,0 @@ -/* - * Copyright (c) 2012-2017 Red Hat, Inc. - * All rights reserved. This program and the accompanying materials - * are made available under the terms of the Eclipse Public License v1.0 - * which accompanies this distribution, and is available at - * http://www.eclipse.org/legal/epl-v10.html - * - * Contributors: - * Red Hat, Inc. - initial API and implementation - */ -package org.eclipse.che.plugin.openshift.client.kubernetes; - -import static org.testng.Assert.assertTrue; - -import io.fabric8.kubernetes.api.model.EnvVar; -import java.util.Arrays; -import java.util.List; -import java.util.stream.Collectors; -import org.testng.annotations.Test; - -public class KubernetesEnvVarTest { - - @Test - public void shouldReturnContainerEnvFromEnvVariableArray() { - // Given - String[] envVariables = { - "CHE_LOCAL_CONF_DIR=/mnt/che/conf", - "USER_TOKEN=dummy_token", - "CHE_API_ENDPOINT=http://172.17.0.4:8080/wsmaster/api", - "JAVA_OPTS=-Xms256m -Xmx2048m -Djava.security.egd=file:/dev/./urandom", - "CHE_WORKSPACE_ID=workspaceID", - "CHE_PROJECTS_ROOT=/projects", - "TOMCAT_HOME=/home/user/tomcat8", - "M2_HOME=/home/user/apache-maven-3.3.9", - "TERM=xterm", - "LANG=en_US.UTF-8" - }; - - // When - List env = KubernetesEnvVar.getEnvFrom(envVariables); - - // Then - List keysAndValues = - env.stream().map(k -> k.getName() + "=" + k.getValue()).collect(Collectors.toList()); - assertTrue(Arrays.stream(envVariables).allMatch(keysAndValues::contains)); - } -} diff --git a/plugins/plugin-docker/che-plugin-openshift-client/src/test/java/org/eclipse/che/plugin/openshift/client/kubernetes/KubernetesLabelConverterTest.java b/plugins/plugin-docker/che-plugin-openshift-client/src/test/java/org/eclipse/che/plugin/openshift/client/kubernetes/KubernetesLabelConverterTest.java deleted file mode 100644 index 598fefab02..0000000000 --- a/plugins/plugin-docker/che-plugin-openshift-client/src/test/java/org/eclipse/che/plugin/openshift/client/kubernetes/KubernetesLabelConverterTest.java +++ /dev/null @@ -1,120 +0,0 @@ -/* - * Copyright (c) 2012-2017 Red Hat, Inc. - * All rights reserved. This program and the accompanying materials - * are made available under the terms of the Eclipse Public License v1.0 - * which accompanies this distribution, and is available at - * http://www.eclipse.org/legal/epl-v10.html - * - * Contributors: - * Red Hat, Inc. - initial API and implementation - */ -package org.eclipse.che.plugin.openshift.client.kubernetes; - -import static org.testng.Assert.assertEquals; -import static org.testng.Assert.assertTrue; - -import java.util.HashMap; -import java.util.Map; -import org.testng.annotations.Test; - -public class KubernetesLabelConverterTest { - - private final String prefix = KubernetesLabelConverter.getCheServerLabelPrefix(); - - @Test - public void shouldConvertLabelsToValidKubernetesLabelNames() { - String validLabelRegex = "([A-Za-z0-9][-A-Za-z0-9_\\.]*)?[A-Za-z0-9]"; - - // Given - Map labels = new HashMap<>(); - labels.put(prefix + "4401/tcp:path:", "/api"); - labels.put(prefix + "8000/tcp:ref:", "tomcat-debug"); - - // When - Map converted = KubernetesLabelConverter.labelsToNames(labels); - - // Then - for (Map.Entry entry : converted.entrySet()) { - assertTrue( - entry.getKey().matches(validLabelRegex), - String.format("Converted Key %s should be valid Kubernetes label name", entry.getKey())); - assertTrue( - entry.getValue().matches(validLabelRegex), - String.format( - "Converted Value %s should be valid Kubernetes label name", entry.getValue())); - } - } - - @Test - public void shouldBeAbleToRecoverOriginalLabelsAfterConversion() { - // Given - Map originalLabels = new HashMap<>(); - originalLabels.put(prefix + "4401/tcp:path:", "/api"); - originalLabels.put(prefix + "8000/tcp:ref:", "tomcat-debug"); - - // When - Map converted = KubernetesLabelConverter.labelsToNames(originalLabels); - Map unconverted = KubernetesLabelConverter.namesToLabels(converted); - - // Then - assertEquals(originalLabels, unconverted); - } - - @Test - public void shouldIgnoreAndLogProblemLabels() { - // Given - Map originalLabels = new HashMap<>(); - Map validLabels = new HashMap<>(); - validLabels.put(prefix + "4401/tcp:path:", "/api"); - validLabels.put(prefix + "8000/tcp:ref:", "tomcat-debug"); - Map invalidLabels = new HashMap<>(); - invalidLabels.put(prefix + "9999/t.cp:path:", "/api"); - invalidLabels.put(prefix + "1111/tcp:path:", "/a_pi"); - - originalLabels.putAll(validLabels); - originalLabels.putAll(invalidLabels); - - // When - Map converted = KubernetesLabelConverter.labelsToNames(originalLabels); - Map unconverted = KubernetesLabelConverter.namesToLabels(converted); - - // Then - assertTrue( - validLabels.entrySet().stream().allMatch(unconverted.entrySet()::contains), - "Valid labels should be there when converting + unconverting"); - assertTrue( - invalidLabels.entrySet().stream().noneMatch(unconverted.entrySet()::contains), - "Labels with invalid characters should be ignored"); - } - - @Test - public void shouldIgnoreEmptyValues() { - // Given - Map originalLabels = new HashMap<>(); - originalLabels.put(prefix + "4401/tcp:path:", null); - originalLabels.put(prefix + "4402/tcp:path:", ""); - originalLabels.put(prefix + "4403/tcp:path:", " "); - - // When - Map converted = KubernetesLabelConverter.labelsToNames(originalLabels); - - // Then - assertTrue( - converted.isEmpty(), "Labels with null, empty, or whitespace values should be ignored"); - } - - @Test - public void shouldNotIgnoreValuesWithoutPrefix() { - // Given - Map originalLabels = new HashMap<>(); - originalLabels.put("4401/tcp:path:", "/api"); - originalLabels.put(prefix + "8000/tcp:ref:", "tomcat-debug"); - - // When - Map converted = KubernetesLabelConverter.labelsToNames(originalLabels); - - // Then - // Currently we put a warning in the logs but convert these labels anyways. - assertTrue(converted.size() == 2, "Should convert labels even without prefix"); - } -} diff --git a/plugins/plugin-docker/che-plugin-openshift-client/src/test/java/org/eclipse/che/plugin/openshift/client/kubernetes/KubernetesOutputAdapterTest.java b/plugins/plugin-docker/che-plugin-openshift-client/src/test/java/org/eclipse/che/plugin/openshift/client/kubernetes/KubernetesOutputAdapterTest.java deleted file mode 100644 index 3f2985fa17..0000000000 --- a/plugins/plugin-docker/che-plugin-openshift-client/src/test/java/org/eclipse/che/plugin/openshift/client/kubernetes/KubernetesOutputAdapterTest.java +++ /dev/null @@ -1,240 +0,0 @@ -/* - * Copyright (c) 2012-2017 Red Hat, Inc. - * All rights reserved. This program and the accompanying materials - * are made available under the terms of the Eclipse Public License v1.0 - * which accompanies this distribution, and is available at - * http://www.eclipse.org/legal/epl-v10.html - * - * Contributors: - * Red Hat, Inc. - initial API and implementation - */ -package org.eclipse.che.plugin.openshift.client.kubernetes; - -import static org.testng.Assert.assertEquals; -import static org.testng.Assert.assertTrue; - -import java.util.ArrayList; -import java.util.List; -import org.eclipse.che.plugin.docker.client.LogMessage; -import org.eclipse.che.plugin.docker.client.MessageProcessor; -import org.testng.annotations.BeforeMethod; -import org.testng.annotations.Test; - -public class KubernetesOutputAdapterTest { - - private static LogMessage.Type LOG_TYPE = LogMessage.Type.DOCKER; - private testMessageProcessor processor; - private KubernetesOutputAdapter adapter; - - private class testMessageProcessor implements MessageProcessor { - - private List messages; - private LogMessage.Type type = null; - - public testMessageProcessor() { - this.messages = new ArrayList<>(); - } - - @Override - public void process(LogMessage message) { - LogMessage.Type messageType = message.getType(); - if (type == null) { - type = messageType; - } - messages.add(message.getContent()); - } - - public List getMessages() { - return new ArrayList<>(messages); - } - - public LogMessage.Type getType() { - return type; - } - }; - - @BeforeMethod - public void setUp() { - processor = new testMessageProcessor(); - adapter = new KubernetesOutputAdapter(LOG_TYPE, processor); - } - - @Test - public void shouldBreakLinesCorrectly() { - // Given - byte[] input = "line1\nline2\n".getBytes(); - List expected = generateExpected("line1", "line2"); - - // When - adapter.call(input); - - // Then - List actual = processor.getMessages(); - assertEquals(actual, expected, "Should break lines on \\n char"); - } - - @Test - public void shouldCacheUnfinishedLinesBetweenCalls() { - // Given - byte[] firstInput = "line1\nlin".getBytes(); - byte[] secondInput = "e2\nline3\n".getBytes(); - List expected = generateExpected("line1", "line2", "line3"); - - // When - adapter.call(firstInput); - adapter.call(secondInput); - - // Then - List actual = processor.getMessages(); - assertEquals(actual, expected, "Should store unfinished lines between calls"); - } - - @Test - public void shouldUseProvidedLogMessageType() { - for (LogMessage.Type type : LogMessage.Type.values()) { - // Given - byte[] input = "line1\n".getBytes(); - LogMessage.Type expected = type; - processor = new testMessageProcessor(); - adapter = new KubernetesOutputAdapter(type, processor); - - // When - adapter.call(input); - - // Then - LogMessage.Type actual = processor.getType(); - assertEquals(actual, expected, "Should call MessageProcessor with provided type"); - } - } - - @Test - public void shouldBreakLinesNormallyWithCarriageReturn() { - // Given - byte[] input = "line1\r\nline2\n".getBytes(); - List expected = generateExpected("line1", "line2"); - - // When - adapter.call(input); - - // Then - List actual = processor.getMessages(); - assertEquals(actual, expected, "Should break lines normally on \\r\\n characters"); - } - - @Test - public void shouldNotIgnoreEmptyLines() { - // Given - byte[] input = "line1\n\nline2\n".getBytes(); - List expected = generateExpected("line1", "", "line2"); - - // When - adapter.call(input); - - // Then - List actual = processor.getMessages(); - assertEquals(actual, expected, "Should call processor.process() with empty Strings"); - } - - @Test - public void shouldNotCallWithoutFinalNewline() { - // Given - byte[] input = "line1\nline2".getBytes(); // No trailing \n - List firstExpected = generateExpected("line1"); - List secondExpected = generateExpected("line1", "line2"); - - // When - adapter.call(input); - - // Then - List firstActual = processor.getMessages(); - assertEquals( - firstActual, - firstExpected, - "Should only process lines when they are terminated by \\n or \\r\\n"); - - // When - adapter.call("\n".getBytes()); - - // Then - List secondActual = processor.getMessages(); - assertEquals(secondActual, secondExpected, "Should buffer lines until newline is encountered."); - } - - @Test - public void shouldIgnoreNullCalls() { - // Given - byte[] firstInput = "line1\n".getBytes(); - byte[] secondInput = "line2\n".getBytes(); - List expected = generateExpected("line1", "line2"); - - // When - adapter.call(firstInput); - adapter.call(null); - adapter.call(secondInput); - - // Then - List actual = processor.getMessages(); - assertEquals(actual, expected, "Should ignore calls with null arguments"); - } - - @Test - public void shouldKeepBufferPastNullCalls() { - // Given - byte[] firstInput = "lin".getBytes(); - byte[] secondInput = "e1\nline2\n".getBytes(); - List expected = generateExpected("line1", "line2"); - - // When - adapter.call(firstInput); - adapter.call(null); - adapter.call(secondInput); - - // Then - List actual = processor.getMessages(); - assertEquals(actual, expected, "Should ignore calls with null arguments"); - } - - @Test - public void shouldDoNothingWhenExecOutputProcessorIsNull() { - // Given - byte[] firstInput = "line1\n".getBytes(); - byte[] secondInput = "line2\n".getBytes(); - adapter = new KubernetesOutputAdapter(LOG_TYPE, null); - - // When - adapter.call(firstInput); - adapter.call(secondInput); - - // Then - List actual = processor.getMessages(); - assertTrue(actual.isEmpty(), "Should do nothing when ExecOutputProcessor is null"); - } - - @Test - public void shouldIgnoreCallsWhenDataIsEmpty() { - // Given - byte[] emptyInput = "".getBytes(); - byte[] firstInput = "line1\n".getBytes(); - byte[] secondInput = "line2\n".getBytes(); - List expected = generateExpected("line1", "line2"); - - // When - adapter.call(emptyInput); - adapter.call(firstInput); - adapter.call(emptyInput); - adapter.call(secondInput); - adapter.call(emptyInput); - - // Then - List actual = processor.getMessages(); - assertEquals(actual, expected, "KubernetesOutputAdapter ignore empty data calls"); - } - - private List generateExpected(String... strings) { - List expected = new ArrayList<>(); - for (String string : strings) { - expected.add(string); - } - return expected; - } -} diff --git a/plugins/plugin-docker/che-plugin-openshift-client/src/test/java/org/eclipse/che/plugin/openshift/client/kubernetes/KubernetesServiceTest.java b/plugins/plugin-docker/che-plugin-openshift-client/src/test/java/org/eclipse/che/plugin/openshift/client/kubernetes/KubernetesServiceTest.java deleted file mode 100644 index 891e4000b6..0000000000 --- a/plugins/plugin-docker/che-plugin-openshift-client/src/test/java/org/eclipse/che/plugin/openshift/client/kubernetes/KubernetesServiceTest.java +++ /dev/null @@ -1,134 +0,0 @@ -/* - * Copyright (c) 2012-2017 Red Hat, Inc. - * All rights reserved. This program and the accompanying materials - * are made available under the terms of the Eclipse Public License v1.0 - * which accompanies this distribution, and is available at - * http://www.eclipse.org/legal/epl-v10.html - * - * Contributors: - * Red Hat, Inc. - initial API and implementation - */ -package org.eclipse.che.plugin.openshift.client.kubernetes; - -import static org.testng.Assert.assertTrue; - -import io.fabric8.kubernetes.api.model.ServicePort; -import java.util.HashMap; -import java.util.HashSet; -import java.util.List; -import java.util.Map; -import java.util.Set; -import java.util.stream.Collectors; -import org.eclipse.che.plugin.docker.client.json.ExposedPort; -import org.testng.annotations.Test; - -public class KubernetesServiceTest { - - @Test - public void shouldReturnServicePortListFromImageExposedPortList() { - // Given - Map imageExposedPorts = new HashMap<>(); - imageExposedPorts.put("8080/TCP", new ExposedPort()); - Map portsToRefName = new HashMap<>(); - portsToRefName.put("8080/tcp", "tomcat"); - - // When - List servicePorts = - KubernetesService.getServicePortsFrom(imageExposedPorts.keySet(), portsToRefName); - - // Then - List portsAndProtocols = - servicePorts - .stream() - .map(p -> Integer.toString(p.getPort()) + "/" + p.getProtocol()) - .collect(Collectors.toList()); - assertTrue(imageExposedPorts.keySet().stream().allMatch(portsAndProtocols::contains)); - } - - @Test - public void shouldReturnServicePortListFromExposedPortList() { - // Given - Map> exposedPorts = new HashMap<>(); - exposedPorts.put("8080/TCP", null); - exposedPorts.put("22/TCP", null); - exposedPorts.put("4401/TCP", null); - exposedPorts.put("4403/TCP", null); - Map portsToRefName = new HashMap<>(); - portsToRefName.put("8080/tcp", "tomcat"); - - // When - List servicePorts = - KubernetesService.getServicePortsFrom(exposedPorts.keySet(), portsToRefName); - - // Then - List portsAndProtocols = - servicePorts - .stream() - .map(p -> Integer.toString(p.getPort()) + "/" + p.getProtocol()) - .collect(Collectors.toList()); - assertTrue(exposedPorts.keySet().stream().allMatch(portsAndProtocols::contains)); - } - - @Test - public void shouldReturnServicePortNameWhenKnownPortNumberIsProvided() { - // Given - Map> exposedPorts = new HashMap<>(); - exposedPorts.put("22/tcp", null); - exposedPorts.put("4401/tcp", null); - exposedPorts.put("4403/tcp", null); - exposedPorts.put("4411/tcp", null); - exposedPorts.put("4412/tcp", null); - exposedPorts.put("8080/tcp", null); - exposedPorts.put("8000/tcp", null); - exposedPorts.put("9876/tcp", null); - Map portsToRefName = new HashMap<>(); - portsToRefName.put("22/tcp", "sshd"); - portsToRefName.put("4401/tcp", "wsagent"); - portsToRefName.put("4403/tcp", "wsagent-jpda"); - portsToRefName.put("4411/tcp", "terminal"); - portsToRefName.put("4412/tcp", "exec-agent"); - portsToRefName.put("8080/tcp", "tomcat"); - portsToRefName.put("8000/tcp", "tomcat-jpda"); - portsToRefName.put("9876/tcp", "codeserver"); - - Set expectedPortNames = new HashSet<>(); - expectedPortNames.add("sshd"); - expectedPortNames.add("wsagent"); - expectedPortNames.add("wsagent-jpda"); - expectedPortNames.add("terminal"); - expectedPortNames.add("exec-agent"); - expectedPortNames.add("tomcat"); - expectedPortNames.add("tomcat-jpda"); - expectedPortNames.add("codeserver"); - - // When - List servicePorts = - KubernetesService.getServicePortsFrom(exposedPorts.keySet(), portsToRefName); - List actualPortNames = - servicePorts.stream().map(p -> p.getName()).collect(Collectors.toList()); - - // Then - assertTrue(actualPortNames.stream().allMatch(expectedPortNames::contains)); - } - - @Test - public void shouldReturnServicePortNameWhenUnknownPortNumberIsProvided() { - // Given - Map> exposedPorts = new HashMap<>(); - exposedPorts.put("55/tcp", null); - Map portsToRefName = new HashMap<>(); - portsToRefName.put("8080/tcp", "tomcat"); - - Set expectedPortNames = new HashSet<>(); - expectedPortNames.add("server-55-tcp"); - - // When - List servicePorts = - KubernetesService.getServicePortsFrom(exposedPorts.keySet(), portsToRefName); - List actualPortNames = - servicePorts.stream().map(p -> p.getName()).collect(Collectors.toList()); - - // Then - assertTrue(actualPortNames.stream().allMatch(expectedPortNames::contains)); - } -} diff --git a/plugins/plugin-docker/che-plugin-openshift-client/src/test/java/org/eclipse/che/plugin/openshift/client/kubernetes/KubernetesStringUtilsTest.java b/plugins/plugin-docker/che-plugin-openshift-client/src/test/java/org/eclipse/che/plugin/openshift/client/kubernetes/KubernetesStringUtilsTest.java deleted file mode 100644 index c00587c1a3..0000000000 --- a/plugins/plugin-docker/che-plugin-openshift-client/src/test/java/org/eclipse/che/plugin/openshift/client/kubernetes/KubernetesStringUtilsTest.java +++ /dev/null @@ -1,228 +0,0 @@ -/* - * Copyright (c) 2012-2017 Red Hat, Inc. - * All rights reserved. This program and the accompanying materials - * are made available under the terms of the Eclipse Public License v1.0 - * which accompanies this distribution, and is available at - * http://www.eclipse.org/legal/epl-v10.html - * - * Contributors: - * Red Hat, Inc. - initial API and implementation - */ -package org.eclipse.che.plugin.openshift.client.kubernetes; - -import static org.testng.Assert.assertEquals; -import static org.testng.Assert.assertTrue; - -import org.apache.commons.lang.RandomStringUtils; -import org.testng.annotations.Test; - -public class KubernetesStringUtilsTest { - - @Test - public void getNormalizedStringShouldTrimLongStrings() { - // Given - String input = RandomStringUtils.random(70, true, true); - String expected = input.substring(0, 62); - - // When - String output = KubernetesStringUtils.getNormalizedString(input); - - // Then - assertEquals(output, expected, "getNormalizedString should limit string length"); - } - - @Test - public void getNormalizedStringShouldDoNothingWithShortStrings() { - // Given - String input = RandomStringUtils.random(24, true, true); - String expected = input; - - // When - String output = KubernetesStringUtils.getNormalizedString(input); - - // Then - assertEquals(output, expected, "getNormalizedString should do nothing to short strings"); - } - - @Test - public void convertPullSpecToImageStreamNameShouldTrimTag() { - // Given - String input = "testImage:testTag"; - String expected = "testImage"; - - // When - String output = KubernetesStringUtils.convertPullSpecToImageStreamName(input); - - // Then - assertEquals(output, expected, "Should trim tag off pull spec"); - } - - @Test - public void convertPullSpecToImageStreamNameShouldBeValidOpenShiftName() { - // Given - String input = "eclipse/ubuntu_jdk8"; - - // When - String output = KubernetesStringUtils.convertPullSpecToImageStreamName(input); - - // Then - assertTrue(!output.contains("/"), "Should remove invalid chars from ImageStream name"); - } - - @Test - public void converPullSpecToImageStreamNameShouldLimitLength() { - // Given - String input = RandomStringUtils.random(100, true, false); - - // When - String output = KubernetesStringUtils.convertPullSpecToImageStreamName(input); - - // Then - assertTrue(output.length() < 64, "ImageStream name cannot be over 63 chars"); - } - - @Test - public void convertPullSpecToTagNameShouldIgnoreRegistryAndTag() { - // Given - String inputWithRegistry = "registry/organisation/image:tag"; - String inputWithoutRegistry = "image"; - - // When - String outputWithRegistry = KubernetesStringUtils.convertPullSpecToTagName(inputWithRegistry); - String outputWithoutRegistry = - KubernetesStringUtils.convertPullSpecToTagName(inputWithoutRegistry); - - // Then - assertEquals( - outputWithoutRegistry, - outputWithRegistry, - "Converting pull spec to tag name should only use image name"); - } - - @Test - public void convertPullSpecToTagNameShouldLimitLength() { - // Given - String input = RandomStringUtils.random(100, true, false); - - // When - String output = KubernetesStringUtils.convertPullSpecToTagName(input); - - // Then - assertTrue(output.length() < 63, "ImageStream tag cannot be over 63 chars"); - } - - @Test - public void createImageStreamTagNameShouldConvertNameInSameWayAsConvertPullSpec() { - // Given - String inputOldRepo = "eclipse/ubuntu_jdk8"; - String inputNewRepo = "eclipse-che/che-workspace_" + RandomStringUtils.random(20); - String expectedImageStreamName = - KubernetesStringUtils.convertPullSpecToImageStreamName(inputOldRepo); - - // When - String rawOutput = KubernetesStringUtils.createImageStreamTagName(inputOldRepo, inputNewRepo); - - // Then - assertTrue(rawOutput.contains(":"), "ImageStreamTag name is invalid: must contain ':'"); - String outputImageStreamName = rawOutput.split(":")[0]; - assertEquals( - outputImageStreamName, - expectedImageStreamName, - "ImageStreamName should match output of convertPullSpecToImageStreamName"); - } - - @Test - public void createImageStreamTagNameShouldConvertTagInSameWayAsConvertPullSpec() { - // Given - String inputOldRepo = "eclipse/ubuntu_jdk8"; - String inputNewRepo = "eclipse-che/che-workspace_" + RandomStringUtils.random(20); - String expectedTagName = KubernetesStringUtils.convertPullSpecToTagName(inputNewRepo); - - // When - String rawOutput = KubernetesStringUtils.createImageStreamTagName(inputOldRepo, inputNewRepo); - - // Then - assertTrue(rawOutput.contains(":"), "ImageStreamTag name is invalid: must contain ':'"); - String outputImageStreamName = rawOutput.split(":")[1]; - assertEquals( - outputImageStreamName, - expectedTagName, - "ImageStream Tag should match output of convertPullSpecToTagName"); - } - - @Test - public void createImageStreamTagNameShouldLimitLengthOfCreatedTag() { - // Given - String inputOldRepo = RandomStringUtils.random(50, true, false); - String inputNewRepo = RandomStringUtils.random(50, true, false); - - // When - String output = KubernetesStringUtils.createImageStreamTagName(inputOldRepo, inputNewRepo); - - // Then - assertTrue(output.length() < 63, "ImageStreamTags must be shorter than 63 characters"); - } - - @Test - public void getImageStreamNameFromPullSpecShouldReturnOnlyImageName() { - // Given - String input = "registry/organisation/imagename:tagname"; - String expected = "imagename"; - - // When - String output = KubernetesStringUtils.getImageStreamNameFromPullSpec(input); - - // Then - assertEquals(output, expected); - } - - @Test - public void stripTagFromPullSpecShouldRemoveTag() { - // Given - String input = "registry/organisation/imagename:tagname"; - String expected = "registry/organisation/imagename"; - - // When - String output = KubernetesStringUtils.stripTagFromPullSpec(input); - - // Then - assertEquals(output, expected); - } - - @Test - public void stripTagFromPullSpecShouldDoNothingIfNoTag() { - // Given - String input = "registry/organisation/imagename"; - - // When - String output = KubernetesStringUtils.stripTagFromPullSpec(input); - - // Then - assertEquals(output, input); - } - - @Test - public void getTagNameFromPullSpecShouldReturnTag() { - // Given - String input = "registry/organisation/imagename:tagname"; - String expected = "tagname"; - - // When - String output = KubernetesStringUtils.getTagNameFromPullSpec(input); - - // Then - assertEquals(output, expected); - } - - @Test - public void getTagNameFromPullSpecShouldReturnNullWhenPullSpecDoesNotHaveTag() { - // Given - String input = "registry/organisation/imagename"; - - // When - String output = KubernetesStringUtils.getTagNameFromPullSpec(input); - - // Then - assertEquals(output, null); - } -} diff --git a/plugins/plugin-docker/pom.xml b/plugins/plugin-docker/pom.xml deleted file mode 100644 index c9b4b86a66..0000000000 --- a/plugins/plugin-docker/pom.xml +++ /dev/null @@ -1,45 +0,0 @@ - - - - 4.0.0 - - che-plugin-parent - org.eclipse.che.plugin - 5.20.0-SNAPSHOT - ../pom.xml - - che-plugin-docker-parent - pom - Che Plugin :: Docker :: Parent - - che-plugin-docker-client - che-plugin-openshift-client - - - ${project.build.directory}/generated-sources/dto/ - true - - - - - - org.eclipse.che.core - che-core-api-dto-maven-plugin - ${project.version} - - - - - - diff --git a/plugins/plugin-machine/che-plugin-machine-ext-server/pom.xml b/plugins/plugin-machine/che-plugin-machine-ext-server/pom.xml index a3afea4748..a2eef0aae2 100644 --- a/plugins/plugin-machine/che-plugin-machine-ext-server/pom.xml +++ b/plugins/plugin-machine/che-plugin-machine-ext-server/pom.xml @@ -53,8 +53,8 @@ che-core-api-workspace-shared - org.eclipse.che.plugin - che-plugin-docker-client + org.eclipse.che.infrastructure.docker + docker-client org.slf4j diff --git a/plugins/plugin-machine/che-plugin-machine-ext-server/src/main/java/org/eclipse/che/ide/ext/machine/server/ssh/KeysInjector.java b/plugins/plugin-machine/che-plugin-machine-ext-server/src/main/java/org/eclipse/che/ide/ext/machine/server/ssh/KeysInjector.java index f5c27a21c5..ca58094d1d 100644 --- a/plugins/plugin-machine/che-plugin-machine-ext-server/src/main/java/org/eclipse/che/ide/ext/machine/server/ssh/KeysInjector.java +++ b/plugins/plugin-machine/che-plugin-machine-ext-server/src/main/java/org/eclipse/che/ide/ext/machine/server/ssh/KeysInjector.java @@ -18,7 +18,7 @@ import org.eclipse.che.api.core.notification.EventService; import org.eclipse.che.api.core.notification.EventSubscriber; import org.eclipse.che.api.ssh.server.SshManager; import org.eclipse.che.api.workspace.shared.dto.event.MachineStatusEvent; -import org.eclipse.che.plugin.docker.client.DockerConnector; +import org.eclipse.che.infrastructure.docker.client.DockerConnector; import org.slf4j.Logger; import org.slf4j.LoggerFactory; diff --git a/plugins/plugin-sdk/che-plugin-sdk-ext-plugins/src/main/resources/org/eclipse/che/ide/ext/plugins/client/cheClassPath.txt b/plugins/plugin-sdk/che-plugin-sdk-ext-plugins/src/main/resources/org/eclipse/che/ide/ext/plugins/client/cheClassPath.txt index 4623c35c81..80bd2070d1 100644 --- a/plugins/plugin-sdk/che-plugin-sdk-ext-plugins/src/main/resources/org/eclipse/che/ide/ext/plugins/client/cheClassPath.txt +++ b/plugins/plugin-sdk/che-plugin-sdk-ext-plugins/src/main/resources/org/eclipse/che/ide/ext/plugins/client/cheClassPath.txt @@ -87,9 +87,6 @@ /projects/che-core/ide/che-core-ide-jseditor/target/requirejs-2.1.15:\ /projects/che-core/che-core-vfs-impl/src/main/java:\ /projects/che-core/che-core-vfs-impl/src/main/resources:\ -/projects/che-plugins/plugin-docker/che-plugin-docker-client/src/main/java:\ -/projects/che-plugins/plugin-docker/che-plugin-docker-client/src/main/resources:\ -/projects/che-plugins/plugin-docker/che-plugin-docker-client/target/generated-sources/dto:\ /projects/che-plugins/plugin-dashboard/che-plugin-ext-dashboard/src/main/java:\ /projects/che-plugins/plugin-dashboard/che-plugin-ext-dashboard/src/main/resources:\ /projects/che-plugins/plugin-git/che-plugin-git-ext-git/src/main/java:\ @@ -222,7 +219,6 @@ /projects/che-core/ide/che-core-ide-jseditor/target/classes:\ /projects/che-core/che-core-vfs-impl/target/classes:\ /home/user/.m2/repository/commons-codec/commons-codec/1.10/commons-codec-1.10.jar:\ -/projects/che-plugins/plugin-docker/che-plugin-docker-client/target/classes:\ /home/user/.m2/repository/org/bouncycastle/bcpkix-jdk15on/1.51/bcpkix-jdk15on-1.51.jar:\ /home/user/.m2/repository/org/bouncycastle/bcprov-jdk15on/1.51/bcprov-jdk15on-1.51.jar:\ /projects/che-plugins/plugin-dashboard/che-plugin-ext-dashboard/target/classes:\ diff --git a/plugins/plugin-traefik/plugin-traefik-docker/pom.xml b/plugins/plugin-traefik/plugin-traefik-docker/pom.xml index 193ecf4d55..78d6910231 100644 --- a/plugins/plugin-traefik/plugin-traefik-docker/pom.xml +++ b/plugins/plugin-traefik/plugin-traefik-docker/pom.xml @@ -46,10 +46,6 @@ org.eclipse.che.core che-core-commons-inject - - org.eclipse.che.plugin - che-plugin-docker-client - org.mockito mockito-core diff --git a/plugins/plugin-traefik/plugin-traefik-docker/src/main/java/org/eclipse/che/plugin/traefik/TraefikCreateContainerInterceptor.java b/plugins/plugin-traefik/plugin-traefik-docker/src/main/java/org/eclipse/che/plugin/traefik/TraefikCreateContainerInterceptor.java index 90d70a7be1..5063ee891c 100644 --- a/plugins/plugin-traefik/plugin-traefik-docker/src/main/java/org/eclipse/che/plugin/traefik/TraefikCreateContainerInterceptor.java +++ b/plugins/plugin-traefik/plugin-traefik-docker/src/main/java/org/eclipse/che/plugin/traefik/TraefikCreateContainerInterceptor.java @@ -17,10 +17,10 @@ import org.aopalliance.intercept.MethodInterceptor; import org.aopalliance.intercept.MethodInvocation; import org.eclipse.che.commons.annotation.Nullable; import org.eclipse.che.plugin.docker.client.DockerConnector; -import org.eclipse.che.plugin.docker.client.json.ContainerConfig; -import org.eclipse.che.plugin.docker.client.json.ImageInfo; -import org.eclipse.che.plugin.docker.client.params.CreateContainerParams; -import org.eclipse.che.plugin.docker.client.params.InspectImageParams; +import org.eclipse.che.infrastructure.docker.client.json.ContainerConfig; +import org.eclipse.che.infrastructure.docker.client.json.ImageInfo; +import org.eclipse.che.infrastructure.docker.client.params.CreateContainerParams; +import org.eclipse.che.infrastructure.docker.client.params.InspectImageParams; import org.eclipse.che.plugin.docker.machine.CustomServerEvaluationStrategy; import org.eclipse.che.plugin.docker.machine.ServerEvaluationStrategy; import org.eclipse.che.plugin.docker.machine.ServerEvaluationStrategyProvider; diff --git a/plugins/plugin-traefik/plugin-traefik-docker/src/test/java/org/eclipse/che/plugin/traefik/TraefikCreateContainerInterceptorTest.java b/plugins/plugin-traefik/plugin-traefik-docker/src/test/java/org/eclipse/che/plugin/traefik/TraefikCreateContainerInterceptorTest.java index bbe6894d06..2f6b6a6f2f 100644 --- a/plugins/plugin-traefik/plugin-traefik-docker/src/test/java/org/eclipse/che/plugin/traefik/TraefikCreateContainerInterceptorTest.java +++ b/plugins/plugin-traefik/plugin-traefik-docker/src/test/java/org/eclipse/che/plugin/traefik/TraefikCreateContainerInterceptorTest.java @@ -12,12 +12,12 @@ package org.eclipse.che.plugin.traefik; import org.aopalliance.intercept.MethodInvocation; import org.eclipse.che.plugin.docker.client.DockerConnector; -import org.eclipse.che.plugin.docker.client.json.ContainerConfig; -import org.eclipse.che.plugin.docker.client.json.ExposedPort; -import org.eclipse.che.plugin.docker.client.json.ImageConfig; -import org.eclipse.che.plugin.docker.client.json.ImageInfo; -import org.eclipse.che.plugin.docker.client.params.CreateContainerParams; -import org.eclipse.che.plugin.docker.client.params.InspectImageParams; +import org.eclipse.che.infrastructure.docker.client.json.ContainerConfig; +import org.eclipse.che.infrastructure.docker.client.json.ExposedPort; +import org.eclipse.che.infrastructure.docker.client.json.ImageConfig; +import org.eclipse.che.infrastructure.docker.client.json.ImageInfo; +import org.eclipse.che.infrastructure.docker.client.params.CreateContainerParams; +import org.eclipse.che.infrastructure.docker.client.params.InspectImageParams; import org.eclipse.che.plugin.docker.machine.CustomServerEvaluationStrategy; import org.eclipse.che.plugin.docker.machine.DefaultServerEvaluationStrategy; import org.eclipse.che.plugin.docker.machine.ServerEvaluationStrategyProvider; diff --git a/plugins/pom.xml b/plugins/pom.xml index c12150889e..ef41eceb47 100644 --- a/plugins/pom.xml +++ b/plugins/pom.xml @@ -28,7 +28,6 @@ plugin-activity plugin-product-info plugin-help - plugin-docker plugin-web plugin-machine plugin-debugger diff --git a/pom.xml b/pom.xml index 04d5a68aaf..f9bf67dd87 100644 --- a/pom.xml +++ b/pom.xml @@ -159,16 +159,6 @@ git-credentials-agent ${che.version} - - org.eclipse.che - infrastructure-docker - ${che.version} - - - org.eclipse.che - infrastructure-openshift - ${che.version} - org.eclipse.che ls-csharp-agent @@ -621,6 +611,21 @@ ${che.docs.version} war + + org.eclipse.che.infrastructure + infrastructure-openshift + ${che.version} + + + org.eclipse.che.infrastructure.docker + docker-client + ${che.version} + + + org.eclipse.che.infrastructure.docker + infrastructure-docker + ${che.version} + org.eclipse.che.lib antlr-java5-grammar @@ -894,11 +899,6 @@ che-plugin-debugger-ide ${che.version} - - org.eclipse.che.plugin - che-plugin-docker-client - ${che.version} - org.eclipse.che.plugin che-plugin-docker-machine @@ -1079,11 +1079,6 @@ che-plugin-maven-shared ${che.version} - - org.eclipse.che.plugin - che-plugin-maven-wsmaster - ${che.version} - org.eclipse.che.plugin che-plugin-nodejs-debugger-ide @@ -1109,11 +1104,6 @@ che-plugin-nodejs-lang-shared ${che.version} - - org.eclipse.che.plugin - che-plugin-openshift-client - ${che.version} - org.eclipse.che.plugin che-plugin-orion-compare @@ -1250,11 +1240,6 @@ che-plugin-testing-testng-server ${che.version} - - org.eclipse.che.plugin - che-plugin-traefik-docker - ${che.version} - org.eclipse.che.plugin che-plugin-url-factory