diff --git a/extensions/service-catalog/client/src/main/java/io/fabric8/servicecatalog/client/internal/ClusterServiceBrokerOperationsImpl.java b/extensions/service-catalog/client/src/main/java/io/fabric8/servicecatalog/client/internal/ClusterServiceBrokerOperationsImpl.java index ca8ab31a4c8..8214ced9b9d 100644 --- a/extensions/service-catalog/client/src/main/java/io/fabric8/servicecatalog/client/internal/ClusterServiceBrokerOperationsImpl.java +++ b/extensions/service-catalog/client/src/main/java/io/fabric8/servicecatalog/client/internal/ClusterServiceBrokerOperationsImpl.java @@ -16,10 +16,10 @@ package io.fabric8.servicecatalog.client.internal; import io.fabric8.kubernetes.client.ClientContext; -import io.fabric8.kubernetes.client.dsl.base.BaseOperation; -import io.fabric8.kubernetes.client.dsl.base.HasMetadataOperation; -import io.fabric8.kubernetes.client.dsl.base.OperationContext; +import io.fabric8.kubernetes.client.dsl.internal.BaseOperation; +import io.fabric8.kubernetes.client.dsl.internal.HasMetadataOperation; import io.fabric8.kubernetes.client.dsl.internal.HasMetadataOperationsImpl; +import io.fabric8.kubernetes.client.dsl.internal.OperationContext; import io.fabric8.servicecatalog.api.model.ClusterServiceBroker; import io.fabric8.servicecatalog.api.model.ClusterServiceBrokerList; import io.fabric8.servicecatalog.api.model.ClusterServiceClass; diff --git a/extensions/service-catalog/client/src/main/java/io/fabric8/servicecatalog/client/internal/ClusterServiceClassOperationsImpl.java b/extensions/service-catalog/client/src/main/java/io/fabric8/servicecatalog/client/internal/ClusterServiceClassOperationsImpl.java index e8186034b60..89a45c81826 100644 --- a/extensions/service-catalog/client/src/main/java/io/fabric8/servicecatalog/client/internal/ClusterServiceClassOperationsImpl.java +++ b/extensions/service-catalog/client/src/main/java/io/fabric8/servicecatalog/client/internal/ClusterServiceClassOperationsImpl.java @@ -16,10 +16,10 @@ package io.fabric8.servicecatalog.client.internal; import io.fabric8.kubernetes.client.ClientContext; -import io.fabric8.kubernetes.client.dsl.base.BaseOperation; -import io.fabric8.kubernetes.client.dsl.base.HasMetadataOperation; -import io.fabric8.kubernetes.client.dsl.base.OperationContext; +import io.fabric8.kubernetes.client.dsl.internal.BaseOperation; +import io.fabric8.kubernetes.client.dsl.internal.HasMetadataOperation; import io.fabric8.kubernetes.client.dsl.internal.HasMetadataOperationsImpl; +import io.fabric8.kubernetes.client.dsl.internal.OperationContext; import io.fabric8.servicecatalog.api.model.ClusterServiceClass; import io.fabric8.servicecatalog.api.model.ClusterServiceClassList; import io.fabric8.servicecatalog.api.model.ClusterServicePlan; diff --git a/extensions/service-catalog/client/src/main/java/io/fabric8/servicecatalog/client/internal/ClusterServicePlanOperationsImpl.java b/extensions/service-catalog/client/src/main/java/io/fabric8/servicecatalog/client/internal/ClusterServicePlanOperationsImpl.java index ba5277a78f2..47dc9f3a8da 100644 --- a/extensions/service-catalog/client/src/main/java/io/fabric8/servicecatalog/client/internal/ClusterServicePlanOperationsImpl.java +++ b/extensions/service-catalog/client/src/main/java/io/fabric8/servicecatalog/client/internal/ClusterServicePlanOperationsImpl.java @@ -16,10 +16,10 @@ package io.fabric8.servicecatalog.client.internal; import io.fabric8.kubernetes.client.ClientContext; -import io.fabric8.kubernetes.client.dsl.base.BaseOperation; -import io.fabric8.kubernetes.client.dsl.base.HasMetadataOperation; -import io.fabric8.kubernetes.client.dsl.base.OperationContext; +import io.fabric8.kubernetes.client.dsl.internal.BaseOperation; +import io.fabric8.kubernetes.client.dsl.internal.HasMetadataOperation; import io.fabric8.kubernetes.client.dsl.internal.HasMetadataOperationsImpl; +import io.fabric8.kubernetes.client.dsl.internal.OperationContext; import io.fabric8.servicecatalog.api.model.ClusterServicePlan; import io.fabric8.servicecatalog.api.model.ClusterServicePlanList; import io.fabric8.servicecatalog.api.model.ServiceInstance; diff --git a/extensions/service-catalog/client/src/main/java/io/fabric8/servicecatalog/client/internal/ServiceBindingOperationsImpl.java b/extensions/service-catalog/client/src/main/java/io/fabric8/servicecatalog/client/internal/ServiceBindingOperationsImpl.java index c81fd41f832..76121ca22a7 100644 --- a/extensions/service-catalog/client/src/main/java/io/fabric8/servicecatalog/client/internal/ServiceBindingOperationsImpl.java +++ b/extensions/service-catalog/client/src/main/java/io/fabric8/servicecatalog/client/internal/ServiceBindingOperationsImpl.java @@ -19,10 +19,10 @@ import io.fabric8.kubernetes.api.model.SecretList; import io.fabric8.kubernetes.client.ClientContext; import io.fabric8.kubernetes.client.Handlers; -import io.fabric8.kubernetes.client.dsl.base.BaseOperation; -import io.fabric8.kubernetes.client.dsl.base.HasMetadataOperation; -import io.fabric8.kubernetes.client.dsl.base.OperationContext; +import io.fabric8.kubernetes.client.dsl.internal.BaseOperation; +import io.fabric8.kubernetes.client.dsl.internal.HasMetadataOperation; import io.fabric8.kubernetes.client.dsl.internal.HasMetadataOperationsImpl; +import io.fabric8.kubernetes.client.dsl.internal.OperationContext; import io.fabric8.servicecatalog.api.model.ServiceBinding; import io.fabric8.servicecatalog.api.model.ServiceBindingList; diff --git a/extensions/service-catalog/client/src/main/java/io/fabric8/servicecatalog/client/internal/ServiceInstanceOperationsImpl.java b/extensions/service-catalog/client/src/main/java/io/fabric8/servicecatalog/client/internal/ServiceInstanceOperationsImpl.java index cdcc51bc478..d5da9769984 100644 --- a/extensions/service-catalog/client/src/main/java/io/fabric8/servicecatalog/client/internal/ServiceInstanceOperationsImpl.java +++ b/extensions/service-catalog/client/src/main/java/io/fabric8/servicecatalog/client/internal/ServiceInstanceOperationsImpl.java @@ -16,10 +16,10 @@ package io.fabric8.servicecatalog.client.internal; import io.fabric8.kubernetes.client.ClientContext; -import io.fabric8.kubernetes.client.dsl.base.BaseOperation; -import io.fabric8.kubernetes.client.dsl.base.HasMetadataOperation; -import io.fabric8.kubernetes.client.dsl.base.OperationContext; +import io.fabric8.kubernetes.client.dsl.internal.BaseOperation; +import io.fabric8.kubernetes.client.dsl.internal.HasMetadataOperation; import io.fabric8.kubernetes.client.dsl.internal.HasMetadataOperationsImpl; +import io.fabric8.kubernetes.client.dsl.internal.OperationContext; import io.fabric8.servicecatalog.api.model.ServiceBinding; import io.fabric8.servicecatalog.api.model.ServiceBindingBuilder; import io.fabric8.servicecatalog.api.model.ServiceInstance; diff --git a/extensions/volumesnapshot/client/src/main/java/io/fabric8/volumesnapshot/client/internal/VolumeSnapshotClassOperationsImpl.java b/extensions/volumesnapshot/client/src/main/java/io/fabric8/volumesnapshot/client/internal/VolumeSnapshotClassOperationsImpl.java index 6ef8a314cca..fd3a8eef27e 100644 --- a/extensions/volumesnapshot/client/src/main/java/io/fabric8/volumesnapshot/client/internal/VolumeSnapshotClassOperationsImpl.java +++ b/extensions/volumesnapshot/client/src/main/java/io/fabric8/volumesnapshot/client/internal/VolumeSnapshotClassOperationsImpl.java @@ -17,10 +17,10 @@ import io.fabric8.kubernetes.api.builder.Visitor; import io.fabric8.kubernetes.client.ClientContext; -import io.fabric8.kubernetes.client.dsl.base.BaseOperation; -import io.fabric8.kubernetes.client.dsl.base.HasMetadataOperation; -import io.fabric8.kubernetes.client.dsl.base.OperationContext; +import io.fabric8.kubernetes.client.dsl.internal.BaseOperation; +import io.fabric8.kubernetes.client.dsl.internal.HasMetadataOperation; import io.fabric8.kubernetes.client.dsl.internal.HasMetadataOperationsImpl; +import io.fabric8.kubernetes.client.dsl.internal.OperationContext; import io.fabric8.volumesnapshot.api.model.VolumeSnapshotClass; import io.fabric8.volumesnapshot.api.model.VolumeSnapshotClassBuilder; import io.fabric8.volumesnapshot.api.model.VolumeSnapshotClassList; diff --git a/extensions/volumesnapshot/client/src/main/java/io/fabric8/volumesnapshot/client/internal/VolumeSnapshotContentOperationsImpl.java b/extensions/volumesnapshot/client/src/main/java/io/fabric8/volumesnapshot/client/internal/VolumeSnapshotContentOperationsImpl.java index b878647435d..947d927974f 100644 --- a/extensions/volumesnapshot/client/src/main/java/io/fabric8/volumesnapshot/client/internal/VolumeSnapshotContentOperationsImpl.java +++ b/extensions/volumesnapshot/client/src/main/java/io/fabric8/volumesnapshot/client/internal/VolumeSnapshotContentOperationsImpl.java @@ -17,10 +17,10 @@ import io.fabric8.kubernetes.api.builder.Visitor; import io.fabric8.kubernetes.client.ClientContext; -import io.fabric8.kubernetes.client.dsl.base.BaseOperation; -import io.fabric8.kubernetes.client.dsl.base.HasMetadataOperation; -import io.fabric8.kubernetes.client.dsl.base.OperationContext; +import io.fabric8.kubernetes.client.dsl.internal.BaseOperation; +import io.fabric8.kubernetes.client.dsl.internal.HasMetadataOperation; import io.fabric8.kubernetes.client.dsl.internal.HasMetadataOperationsImpl; +import io.fabric8.kubernetes.client.dsl.internal.OperationContext; import io.fabric8.volumesnapshot.api.model.VolumeSnapshotContent; import io.fabric8.volumesnapshot.api.model.VolumeSnapshotContentBuilder; import io.fabric8.volumesnapshot.api.model.VolumeSnapshotContentList; diff --git a/extensions/volumesnapshot/client/src/main/java/io/fabric8/volumesnapshot/client/internal/VolumeSnapshotOperationsImpl.java b/extensions/volumesnapshot/client/src/main/java/io/fabric8/volumesnapshot/client/internal/VolumeSnapshotOperationsImpl.java index 22f1a355bd2..12ee403d357 100644 --- a/extensions/volumesnapshot/client/src/main/java/io/fabric8/volumesnapshot/client/internal/VolumeSnapshotOperationsImpl.java +++ b/extensions/volumesnapshot/client/src/main/java/io/fabric8/volumesnapshot/client/internal/VolumeSnapshotOperationsImpl.java @@ -16,10 +16,10 @@ package io.fabric8.volumesnapshot.client.internal; import io.fabric8.kubernetes.client.ClientContext; -import io.fabric8.kubernetes.client.dsl.base.BaseOperation; -import io.fabric8.kubernetes.client.dsl.base.HasMetadataOperation; -import io.fabric8.kubernetes.client.dsl.base.OperationContext; +import io.fabric8.kubernetes.client.dsl.internal.BaseOperation; +import io.fabric8.kubernetes.client.dsl.internal.HasMetadataOperation; import io.fabric8.kubernetes.client.dsl.internal.HasMetadataOperationsImpl; +import io.fabric8.kubernetes.client.dsl.internal.OperationContext; import io.fabric8.volumesnapshot.api.model.VolumeSnapshot; import io.fabric8.volumesnapshot.api.model.VolumeSnapshotList; diff --git a/kubernetes-client-api/src/main/java/io/fabric8/kubernetes/client/extended/run/RunOperations.java b/kubernetes-client-api/src/main/java/io/fabric8/kubernetes/client/extended/run/RunOperations.java index de8177d7097..f420a1b0ec5 100644 --- a/kubernetes-client-api/src/main/java/io/fabric8/kubernetes/client/extended/run/RunOperations.java +++ b/kubernetes-client-api/src/main/java/io/fabric8/kubernetes/client/extended/run/RunOperations.java @@ -16,8 +16,20 @@ package io.fabric8.kubernetes.client.extended.run; import io.fabric8.kubernetes.api.model.Pod; +import io.fabric8.kubernetes.api.model.PodBuilder; +import io.fabric8.kubernetes.client.KubernetesClient; -public interface RunOperations { +public class RunOperations { + + private final KubernetesClient client; + private final String namespace; + private final RunConfigBuilder runConfigBuilder; + + public RunOperations(KubernetesClient client, String namespace, RunConfigBuilder runConfigBuilder) { + this.client = client; + this.namespace = namespace; + this.runConfigBuilder = runConfigBuilder; + } /** * Specify namespace for the operation @@ -25,7 +37,9 @@ public interface RunOperations { * @param namespace namespace in which resource needs to be created * @return {@link RunOperations} with injected namespace */ - RunOperations inNamespace(String namespace); + public RunOperations inNamespace(String namespace) { + return new RunOperations(client, namespace, runConfigBuilder); + } /** * Specify image for the Pod @@ -33,7 +47,9 @@ public interface RunOperations { * @param image image as a string * @return {@link RunOperations} with image injected into {@link RunConfig} */ - RunOperations withImage(String image); + public RunOperations withImage(String image) { + return new RunOperations(client, namespace, runConfigBuilder.withImage(image)); + } /** * Specify name for the Pod @@ -41,7 +57,9 @@ public interface RunOperations { * @param name name of the pod to be created * @return {@link RunOperations} with name injected into {@link RunConfig} */ - RunOperations withName(String name); + public RunOperations withName(String name) { + return new RunOperations(client, namespace, runConfigBuilder.withName(name)); + } /** * Specify complex configuration for Pod creating using {@link RunConfig} @@ -49,13 +67,25 @@ public interface RunOperations { * @param generatorRunConfig {@link RunConfig} which allows to provide configuring environment variables, labels, resources, ports etc * @return {@link RunOperations} with specified configuration */ - RunOperations withRunConfig(RunConfig generatorRunConfig); + public RunOperations withRunConfig(RunConfig generatorRunConfig) { + return new RunOperations(client, namespace, new RunConfigBuilder(generatorRunConfig)); + } /** * Apply the {@link RunConfig} onto the cluster and create Pod * * @return Pod which got created from the operation */ - Pod done(); + public Pod done() { + return client.pods().inNamespace(namespace).create(convertRunConfigIntoPod()); + } + + Pod convertRunConfigIntoPod() { + RunConfig finalGeneratorConfig = runConfigBuilder.build(); + return new PodBuilder() + .withMetadata(RunConfigUtil.getObjectMetadataFromRunConfig(finalGeneratorConfig)) + .withSpec(RunConfigUtil.getPodSpecFromRunConfig(finalGeneratorConfig)) + .build(); + } } diff --git a/kubernetes-client/src/test/java/io/fabric8/kubernetes/client/extended/run/RunConfigUtilTest.java b/kubernetes-client-api/src/test/java/io/fabric8/kubernetes/client/extended/run/RunConfigUtilTest.java similarity index 100% rename from kubernetes-client/src/test/java/io/fabric8/kubernetes/client/extended/run/RunConfigUtilTest.java rename to kubernetes-client-api/src/test/java/io/fabric8/kubernetes/client/extended/run/RunConfigUtilTest.java diff --git a/kubernetes-client/src/test/java/io/fabric8/kubernetes/client/extended/run/RunOperationsTest.java b/kubernetes-client-api/src/test/java/io/fabric8/kubernetes/client/extended/run/RunOperationsTest.java similarity index 84% rename from kubernetes-client/src/test/java/io/fabric8/kubernetes/client/extended/run/RunOperationsTest.java rename to kubernetes-client-api/src/test/java/io/fabric8/kubernetes/client/extended/run/RunOperationsTest.java index 6de7e1f6bc6..d289e594110 100644 --- a/kubernetes-client/src/test/java/io/fabric8/kubernetes/client/extended/run/RunOperationsTest.java +++ b/kubernetes-client-api/src/test/java/io/fabric8/kubernetes/client/extended/run/RunOperationsTest.java @@ -17,11 +17,7 @@ import io.fabric8.kubernetes.api.model.Pod; import io.fabric8.kubernetes.api.model.Quantity; -import io.fabric8.kubernetes.client.Config; -import io.fabric8.kubernetes.client.ConfigBuilder; -import io.fabric8.kubernetes.client.SimpleClientContext; -import io.fabric8.kubernetes.client.http.HttpClient; -import org.junit.jupiter.api.BeforeEach; +import io.fabric8.kubernetes.client.KubernetesClient; import org.junit.jupiter.api.Test; import org.mockito.Mockito; @@ -33,14 +29,6 @@ import static org.junit.jupiter.api.Assertions.assertNotNull; class RunOperationsTest { - private HttpClient mockClient; - private Config config; - - @BeforeEach - public void init() { - this.mockClient = Mockito.mock(HttpClient.class, Mockito.RETURNS_DEEP_STUBS); - this.config = new ConfigBuilder().withMasterUrl("https://localhost:8443/").build(); - } @Test void testConvertRunConfigIntoPod() { @@ -65,7 +53,7 @@ void testConvertRunConfigIntoPod() { .withPort(5701) .withLimits(limits) .withRequests(requests); - RunOperationsImpl deploymentGenerator = new RunOperationsImpl(new SimpleClientContext(config, mockClient), "ns1", generatorRunConfig); + RunOperations deploymentGenerator = new RunOperations(Mockito.mock(KubernetesClient.class), "ns1", generatorRunConfig); // When Pod pod = deploymentGenerator.convertRunConfigIntoPod(); diff --git a/kubernetes-client/src/main/java/io/fabric8/kubernetes/client/BaseClient.java b/kubernetes-client/src/main/java/io/fabric8/kubernetes/client/BaseClient.java index 6d4dd7391db..54e698f6fc6 100644 --- a/kubernetes-client/src/main/java/io/fabric8/kubernetes/client/BaseClient.java +++ b/kubernetes-client/src/main/java/io/fabric8/kubernetes/client/BaseClient.java @@ -16,7 +16,7 @@ package io.fabric8.kubernetes.client; -import io.fabric8.kubernetes.client.dsl.base.OperationSupport; +import io.fabric8.kubernetes.client.dsl.internal.OperationSupport; import io.fabric8.kubernetes.client.http.HttpClient; import io.fabric8.kubernetes.api.model.APIGroup; import io.fabric8.kubernetes.api.model.APIGroupList; diff --git a/kubernetes-client/src/main/java/io/fabric8/kubernetes/client/BaseKubernetesClient.java b/kubernetes-client/src/main/java/io/fabric8/kubernetes/client/BaseKubernetesClient.java index e979a37f26f..9c56c1703d8 100644 --- a/kubernetes-client/src/main/java/io/fabric8/kubernetes/client/BaseKubernetesClient.java +++ b/kubernetes-client/src/main/java/io/fabric8/kubernetes/client/BaseKubernetesClient.java @@ -92,8 +92,8 @@ import io.fabric8.kubernetes.client.dsl.StorageAPIGroupDSL; import io.fabric8.kubernetes.client.dsl.V1APIGroupDSL; import io.fabric8.kubernetes.client.dsl.base.CustomResourceDefinitionContext; -import io.fabric8.kubernetes.client.dsl.base.HasMetadataOperation; import io.fabric8.kubernetes.client.dsl.base.ResourceDefinitionContext; +import io.fabric8.kubernetes.client.dsl.internal.HasMetadataOperation; import io.fabric8.kubernetes.client.dsl.internal.HasMetadataOperationsImpl; import io.fabric8.kubernetes.client.dsl.internal.apps.v1.DeploymentOperationsImpl; import io.fabric8.kubernetes.client.dsl.internal.apps.v1.ReplicaSetOperationsImpl; @@ -111,10 +111,9 @@ import io.fabric8.kubernetes.client.dsl.internal.certificates.v1.CertificateSigningRequestOperationsImpl; import io.fabric8.kubernetes.client.extended.run.RunConfigBuilder; import io.fabric8.kubernetes.client.extended.run.RunOperations; -import io.fabric8.kubernetes.client.extended.run.RunOperationsImpl; import io.fabric8.kubernetes.client.http.HttpClient; import io.fabric8.kubernetes.client.informers.SharedInformerFactory; -import io.fabric8.kubernetes.client.informers.SharedInformerFactoryImpl; +import io.fabric8.kubernetes.client.informers.impl.SharedInformerFactoryImpl; import io.fabric8.kubernetes.client.utils.Serialization; import java.io.InputStream; @@ -593,7 +592,7 @@ public MixedOperation> leases() { */ @Override public RunOperations run() { - return new RunOperationsImpl(this, getNamespace(), new RunConfigBuilder()); + return new RunOperations(this, getNamespace(), new RunConfigBuilder()); } /** diff --git a/kubernetes-client/src/main/java/io/fabric8/kubernetes/client/Handlers.java b/kubernetes-client/src/main/java/io/fabric8/kubernetes/client/Handlers.java index d7f35637c25..1497cb32a29 100644 --- a/kubernetes-client/src/main/java/io/fabric8/kubernetes/client/Handlers.java +++ b/kubernetes-client/src/main/java/io/fabric8/kubernetes/client/Handlers.java @@ -24,8 +24,8 @@ import io.fabric8.kubernetes.api.model.KubernetesResourceList; import io.fabric8.kubernetes.client.dsl.NamespacedInOutCreateable; import io.fabric8.kubernetes.client.dsl.Resource; -import io.fabric8.kubernetes.client.dsl.base.HasMetadataOperation; import io.fabric8.kubernetes.client.dsl.base.ResourceDefinitionContext; +import io.fabric8.kubernetes.client.dsl.internal.HasMetadataOperation; import io.fabric8.kubernetes.client.utils.ApiVersionUtil; import io.fabric8.kubernetes.client.utils.KubernetesResourceUtil; import io.fabric8.kubernetes.client.utils.Serialization; diff --git a/kubernetes-client/src/main/java/io/fabric8/kubernetes/client/ResourceHandler.java b/kubernetes-client/src/main/java/io/fabric8/kubernetes/client/ResourceHandler.java index 3cc2b7514ea..edd88d20b4d 100644 --- a/kubernetes-client/src/main/java/io/fabric8/kubernetes/client/ResourceHandler.java +++ b/kubernetes-client/src/main/java/io/fabric8/kubernetes/client/ResourceHandler.java @@ -20,7 +20,7 @@ import io.fabric8.kubernetes.api.model.HasMetadata; import io.fabric8.kubernetes.api.model.KubernetesResourceList; import io.fabric8.kubernetes.client.dsl.Resource; -import io.fabric8.kubernetes.client.dsl.base.HasMetadataOperation; +import io.fabric8.kubernetes.client.dsl.internal.HasMetadataOperation; public interface ResourceHandler> { diff --git a/kubernetes-client/src/main/java/io/fabric8/kubernetes/client/ResourceHandlerImpl.java b/kubernetes-client/src/main/java/io/fabric8/kubernetes/client/ResourceHandlerImpl.java index 351f8ce0957..b111e7aa525 100644 --- a/kubernetes-client/src/main/java/io/fabric8/kubernetes/client/ResourceHandlerImpl.java +++ b/kubernetes-client/src/main/java/io/fabric8/kubernetes/client/ResourceHandlerImpl.java @@ -20,8 +20,8 @@ import io.fabric8.kubernetes.api.model.HasMetadata; import io.fabric8.kubernetes.api.model.KubernetesResourceList; import io.fabric8.kubernetes.client.dsl.Resource; -import io.fabric8.kubernetes.client.dsl.base.HasMetadataOperation; import io.fabric8.kubernetes.client.dsl.base.ResourceDefinitionContext; +import io.fabric8.kubernetes.client.dsl.internal.HasMetadataOperation; import io.fabric8.kubernetes.client.dsl.internal.HasMetadataOperationsImpl; import io.fabric8.kubernetes.client.utils.KubernetesResourceUtil; import io.fabric8.kubernetes.client.utils.Utils; diff --git a/kubernetes-client/src/main/java/io/fabric8/kubernetes/client/URLFromClusterIPImpl.java b/kubernetes-client/src/main/java/io/fabric8/kubernetes/client/URLFromClusterIPImpl.java index d334634004c..689c69ad321 100644 --- a/kubernetes-client/src/main/java/io/fabric8/kubernetes/client/URLFromClusterIPImpl.java +++ b/kubernetes-client/src/main/java/io/fabric8/kubernetes/client/URLFromClusterIPImpl.java @@ -17,7 +17,7 @@ import io.fabric8.kubernetes.api.model.Service; import io.fabric8.kubernetes.api.model.ServicePort; -import io.fabric8.kubernetes.client.utils.URLFromServiceUtil; +import io.fabric8.kubernetes.client.utils.internal.URLFromServiceUtil; public class URLFromClusterIPImpl implements ServiceToURLProvider { @Override diff --git a/kubernetes-client/src/main/java/io/fabric8/kubernetes/client/URLFromEnvVarsImpl.java b/kubernetes-client/src/main/java/io/fabric8/kubernetes/client/URLFromEnvVarsImpl.java index f1c83331e73..cc37bd9617e 100644 --- a/kubernetes-client/src/main/java/io/fabric8/kubernetes/client/URLFromEnvVarsImpl.java +++ b/kubernetes-client/src/main/java/io/fabric8/kubernetes/client/URLFromEnvVarsImpl.java @@ -17,7 +17,7 @@ package io.fabric8.kubernetes.client; import io.fabric8.kubernetes.api.model.Service; -import io.fabric8.kubernetes.client.utils.URLFromServiceUtil; +import io.fabric8.kubernetes.client.utils.internal.URLFromServiceUtil; import org.slf4j.Logger; import org.slf4j.LoggerFactory; diff --git a/kubernetes-client/src/main/java/io/fabric8/kubernetes/client/URLFromIngressImpl.java b/kubernetes-client/src/main/java/io/fabric8/kubernetes/client/URLFromIngressImpl.java index 79da7f4d001..04dba46507a 100644 --- a/kubernetes-client/src/main/java/io/fabric8/kubernetes/client/URLFromIngressImpl.java +++ b/kubernetes-client/src/main/java/io/fabric8/kubernetes/client/URLFromIngressImpl.java @@ -19,7 +19,7 @@ import io.fabric8.kubernetes.api.model.Service; import io.fabric8.kubernetes.api.model.ServicePort; import io.fabric8.kubernetes.api.model.extensions.*; -import io.fabric8.kubernetes.client.utils.URLFromServiceUtil; +import io.fabric8.kubernetes.client.utils.internal.URLFromServiceUtil; public class URLFromIngressImpl implements ServiceToURLProvider { diff --git a/kubernetes-client/src/main/java/io/fabric8/kubernetes/client/URLFromNodePortImpl.java b/kubernetes-client/src/main/java/io/fabric8/kubernetes/client/URLFromNodePortImpl.java index b01788aa96a..9f2e4824cf1 100644 --- a/kubernetes-client/src/main/java/io/fabric8/kubernetes/client/URLFromNodePortImpl.java +++ b/kubernetes-client/src/main/java/io/fabric8/kubernetes/client/URLFromNodePortImpl.java @@ -17,7 +17,7 @@ package io.fabric8.kubernetes.client; import io.fabric8.kubernetes.api.model.*; -import io.fabric8.kubernetes.client.utils.URLFromServiceUtil; +import io.fabric8.kubernetes.client.utils.internal.URLFromServiceUtil; import org.slf4j.Logger; import org.slf4j.LoggerFactory; diff --git a/kubernetes-client/src/main/java/io/fabric8/kubernetes/client/dsl/internal/AbstractWatchManager.java b/kubernetes-client/src/main/java/io/fabric8/kubernetes/client/dsl/internal/AbstractWatchManager.java index 40bda2c3678..897e6896439 100644 --- a/kubernetes-client/src/main/java/io/fabric8/kubernetes/client/dsl/internal/AbstractWatchManager.java +++ b/kubernetes-client/src/main/java/io/fabric8/kubernetes/client/dsl/internal/AbstractWatchManager.java @@ -26,11 +26,10 @@ import io.fabric8.kubernetes.client.Watcher; import io.fabric8.kubernetes.client.Watcher.Action; import io.fabric8.kubernetes.client.WatcherException; -import io.fabric8.kubernetes.client.dsl.base.BaseOperation; import io.fabric8.kubernetes.client.http.HttpClient; -import io.fabric8.kubernetes.client.utils.ExponentialBackoffIntervalCalculator; import io.fabric8.kubernetes.client.utils.Serialization; import io.fabric8.kubernetes.client.utils.Utils; +import io.fabric8.kubernetes.client.utils.internal.ExponentialBackoffIntervalCalculator; import org.slf4j.Logger; import org.slf4j.LoggerFactory; diff --git a/kubernetes-client/src/main/java/io/fabric8/kubernetes/client/dsl/base/BaseOperation.java b/kubernetes-client/src/main/java/io/fabric8/kubernetes/client/dsl/internal/BaseOperation.java similarity index 98% rename from kubernetes-client/src/main/java/io/fabric8/kubernetes/client/dsl/base/BaseOperation.java rename to kubernetes-client/src/main/java/io/fabric8/kubernetes/client/dsl/internal/BaseOperation.java index 42d4e81a089..2ac2f90f7f5 100755 --- a/kubernetes-client/src/main/java/io/fabric8/kubernetes/client/dsl/base/BaseOperation.java +++ b/kubernetes-client/src/main/java/io/fabric8/kubernetes/client/dsl/internal/BaseOperation.java @@ -13,12 +13,8 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -package io.fabric8.kubernetes.client.dsl.base; +package io.fabric8.kubernetes.client.dsl.internal; -import io.fabric8.kubernetes.api.model.ObjectReference; -import io.fabric8.kubernetes.client.dsl.WritableOperation; -import io.fabric8.kubernetes.client.utils.CreateOrReplaceHelper; -import io.fabric8.kubernetes.client.utils.Serialization; import io.fabric8.kubernetes.api.builder.TypedVisitor; import io.fabric8.kubernetes.api.builder.Visitor; import io.fabric8.kubernetes.api.model.DeletionPropagation; @@ -27,6 +23,7 @@ import io.fabric8.kubernetes.api.model.LabelSelector; import io.fabric8.kubernetes.api.model.ListOptions; import io.fabric8.kubernetes.api.model.ListOptionsBuilder; +import io.fabric8.kubernetes.api.model.ObjectReference; import io.fabric8.kubernetes.api.model.Status; import io.fabric8.kubernetes.api.model.autoscaling.v1.Scale; import io.fabric8.kubernetes.api.model.extensions.DeploymentRollback; @@ -47,19 +44,20 @@ import io.fabric8.kubernetes.client.dsl.NonNamespaceOperation; import io.fabric8.kubernetes.client.dsl.ReplaceDeletable; import io.fabric8.kubernetes.client.dsl.Resource; -import io.fabric8.kubernetes.client.dsl.internal.DefaultOperationInfo; -import io.fabric8.kubernetes.client.dsl.internal.WatchConnectionManager; -import io.fabric8.kubernetes.client.dsl.internal.WatchHTTPManager; +import io.fabric8.kubernetes.client.dsl.WritableOperation; +import io.fabric8.kubernetes.client.dsl.base.PatchContext; import io.fabric8.kubernetes.client.http.HttpRequest; import io.fabric8.kubernetes.client.informers.ListerWatcher; import io.fabric8.kubernetes.client.informers.ResourceEventHandler; import io.fabric8.kubernetes.client.informers.SharedIndexInformer; import io.fabric8.kubernetes.client.informers.impl.DefaultSharedIndexInformer; import io.fabric8.kubernetes.client.readiness.Readiness; +import io.fabric8.kubernetes.client.utils.Serialization; import io.fabric8.kubernetes.client.utils.URLUtils; import io.fabric8.kubernetes.client.utils.URLUtils.URLBuilder; import io.fabric8.kubernetes.client.utils.Utils; -import io.fabric8.kubernetes.client.utils.WatcherToggle; +import io.fabric8.kubernetes.client.utils.internal.CreateOrReplaceHelper; +import io.fabric8.kubernetes.client.utils.internal.WatcherToggle; import java.io.File; import java.io.FileInputStream; @@ -849,7 +847,7 @@ public T waitUntilCondition(Predicate condition, long amount, TimeUnit timeUn } return condition.test(l.get(0)); }); - + if (!Utils.waitUntilReady(futureCondition, amount, timeUnit)) { futureCondition.cancel(true); T i = getItem(); @@ -935,7 +933,7 @@ public Informable withIndexers(Map>> indexer result.limit = this.limit; return result; } - + @Override public BaseOperation withLimit(Long limit) { BaseOperation result = newInstance(context); @@ -943,7 +941,7 @@ public BaseOperation withLimit(Long limit) { result.limit = limit; return result; } - + @Override public Long getLimit() { return this.limit; @@ -979,7 +977,7 @@ private DefaultSharedIndexInformer createInformer(long resync) { } return informer; } - + public static URL appendListOptionParams(URL base, ListOptions listOptions) { if (listOptions == null) { return base; @@ -999,7 +997,7 @@ public static URL appendListOptionParams(URL base, ListOptions listOptions) { if (listOptions.getLabelSelector() != null) { urlBuilder.addQueryParameter("labelSelector", listOptions.getLabelSelector()); } - + if (listOptions.getResourceVersion() != null) { urlBuilder.addQueryParameter("resourceVersion", listOptions.getResourceVersion()); } @@ -1017,6 +1015,6 @@ public static URL appendListOptionParams(URL base, ListOptions listOptions) { } return urlBuilder.build(); } - + } diff --git a/kubernetes-client/src/main/java/io/fabric8/kubernetes/client/dsl/base/CreateOnlyResourceOperation.java b/kubernetes-client/src/main/java/io/fabric8/kubernetes/client/dsl/internal/CreateOnlyResourceOperation.java similarity index 97% rename from kubernetes-client/src/main/java/io/fabric8/kubernetes/client/dsl/base/CreateOnlyResourceOperation.java rename to kubernetes-client/src/main/java/io/fabric8/kubernetes/client/dsl/internal/CreateOnlyResourceOperation.java index f71634d9fff..d8a5c834ee7 100644 --- a/kubernetes-client/src/main/java/io/fabric8/kubernetes/client/dsl/base/CreateOnlyResourceOperation.java +++ b/kubernetes-client/src/main/java/io/fabric8/kubernetes/client/dsl/internal/CreateOnlyResourceOperation.java @@ -13,7 +13,7 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -package io.fabric8.kubernetes.client.dsl.base; +package io.fabric8.kubernetes.client.dsl.internal; import io.fabric8.kubernetes.client.KubernetesClientException; import io.fabric8.kubernetes.client.dsl.InOutCreateable; diff --git a/kubernetes-client/src/main/java/io/fabric8/kubernetes/client/dsl/internal/CreateOnlyResourceOperationsImpl.java b/kubernetes-client/src/main/java/io/fabric8/kubernetes/client/dsl/internal/CreateOnlyResourceOperationsImpl.java index 48caccaa210..a6c29761503 100644 --- a/kubernetes-client/src/main/java/io/fabric8/kubernetes/client/dsl/internal/CreateOnlyResourceOperationsImpl.java +++ b/kubernetes-client/src/main/java/io/fabric8/kubernetes/client/dsl/internal/CreateOnlyResourceOperationsImpl.java @@ -18,8 +18,6 @@ import io.fabric8.kubernetes.api.model.KubernetesResource; import io.fabric8.kubernetes.client.ClientContext; import io.fabric8.kubernetes.client.dsl.NamespacedInOutCreateable; -import io.fabric8.kubernetes.client.dsl.base.CreateOnlyResourceOperation; -import io.fabric8.kubernetes.client.dsl.base.OperationContext; import io.fabric8.kubernetes.client.dsl.base.ResourceDefinitionContext; public class CreateOnlyResourceOperationsImpl extends CreateOnlyResourceOperation implements NamespacedInOutCreateable { diff --git a/kubernetes-client/src/main/java/io/fabric8/kubernetes/client/dsl/internal/ExecWebSocketListener.java b/kubernetes-client/src/main/java/io/fabric8/kubernetes/client/dsl/internal/ExecWebSocketListener.java index 4741d38e009..4230f7bc5c7 100644 --- a/kubernetes-client/src/main/java/io/fabric8/kubernetes/client/dsl/internal/ExecWebSocketListener.java +++ b/kubernetes-client/src/main/java/io/fabric8/kubernetes/client/dsl/internal/ExecWebSocketListener.java @@ -23,7 +23,6 @@ import io.fabric8.kubernetes.client.dsl.ExecListener; import io.fabric8.kubernetes.client.dsl.ExecWatch; import io.fabric8.kubernetes.client.dsl.ExecListener.Response; -import io.fabric8.kubernetes.client.dsl.base.OperationSupport; import io.fabric8.kubernetes.client.http.HttpResponse; import io.fabric8.kubernetes.client.http.WebSocket; import io.fabric8.kubernetes.client.http.WebSocketHandshakeException; diff --git a/kubernetes-client/src/main/java/io/fabric8/kubernetes/client/dsl/base/FilterNestedImpl.java b/kubernetes-client/src/main/java/io/fabric8/kubernetes/client/dsl/internal/FilterNestedImpl.java similarity index 99% rename from kubernetes-client/src/main/java/io/fabric8/kubernetes/client/dsl/base/FilterNestedImpl.java rename to kubernetes-client/src/main/java/io/fabric8/kubernetes/client/dsl/internal/FilterNestedImpl.java index 9aaa5fc4ecc..7f9e1c8376e 100644 --- a/kubernetes-client/src/main/java/io/fabric8/kubernetes/client/dsl/base/FilterNestedImpl.java +++ b/kubernetes-client/src/main/java/io/fabric8/kubernetes/client/dsl/internal/FilterNestedImpl.java @@ -14,7 +14,7 @@ * limitations under the License. */ -package io.fabric8.kubernetes.client.dsl.base; +package io.fabric8.kubernetes.client.dsl.internal; import io.fabric8.kubernetes.api.model.HasMetadata; import io.fabric8.kubernetes.api.model.KubernetesResourceList; diff --git a/kubernetes-client/src/main/java/io/fabric8/kubernetes/client/dsl/internal/GenericKubernetesResourceOperationsImpl.java b/kubernetes-client/src/main/java/io/fabric8/kubernetes/client/dsl/internal/GenericKubernetesResourceOperationsImpl.java index 1411f9576ec..e4a5a574b57 100644 --- a/kubernetes-client/src/main/java/io/fabric8/kubernetes/client/dsl/internal/GenericKubernetesResourceOperationsImpl.java +++ b/kubernetes-client/src/main/java/io/fabric8/kubernetes/client/dsl/internal/GenericKubernetesResourceOperationsImpl.java @@ -18,9 +18,6 @@ import io.fabric8.kubernetes.api.model.GenericKubernetesResource; import io.fabric8.kubernetes.api.model.GenericKubernetesResourceList; import io.fabric8.kubernetes.client.dsl.Resource; -import io.fabric8.kubernetes.client.dsl.base.BaseOperation; -import io.fabric8.kubernetes.client.dsl.base.HasMetadataOperation; -import io.fabric8.kubernetes.client.dsl.base.OperationContext; public class GenericKubernetesResourceOperationsImpl extends HasMetadataOperation> { diff --git a/kubernetes-client/src/main/java/io/fabric8/kubernetes/client/dsl/base/HasMetadataOperation.java b/kubernetes-client/src/main/java/io/fabric8/kubernetes/client/dsl/internal/HasMetadataOperation.java similarity index 98% rename from kubernetes-client/src/main/java/io/fabric8/kubernetes/client/dsl/base/HasMetadataOperation.java rename to kubernetes-client/src/main/java/io/fabric8/kubernetes/client/dsl/internal/HasMetadataOperation.java index f61620a44c2..a06cf7b509e 100644 --- a/kubernetes-client/src/main/java/io/fabric8/kubernetes/client/dsl/base/HasMetadataOperation.java +++ b/kubernetes-client/src/main/java/io/fabric8/kubernetes/client/dsl/internal/HasMetadataOperation.java @@ -14,7 +14,7 @@ * limitations under the License. */ -package io.fabric8.kubernetes.client.dsl.base; +package io.fabric8.kubernetes.client.dsl.internal; import io.fabric8.kubernetes.api.builder.VisitableBuilder; import io.fabric8.kubernetes.api.builder.Visitor; @@ -28,6 +28,8 @@ import io.fabric8.kubernetes.client.ResourceHandler; import io.fabric8.kubernetes.client.ResourceNotFoundException; import io.fabric8.kubernetes.client.dsl.Resource; +import io.fabric8.kubernetes.client.dsl.base.PatchContext; +import io.fabric8.kubernetes.client.dsl.base.PatchType; import io.fabric8.kubernetes.client.utils.KubernetesResourceUtil; import io.fabric8.kubernetes.client.utils.Serialization; import io.fabric8.kubernetes.client.utils.Utils; diff --git a/kubernetes-client/src/main/java/io/fabric8/kubernetes/client/dsl/internal/HasMetadataOperationsImpl.java b/kubernetes-client/src/main/java/io/fabric8/kubernetes/client/dsl/internal/HasMetadataOperationsImpl.java index 7db57dd9973..d49585a08b2 100644 --- a/kubernetes-client/src/main/java/io/fabric8/kubernetes/client/dsl/internal/HasMetadataOperationsImpl.java +++ b/kubernetes-client/src/main/java/io/fabric8/kubernetes/client/dsl/internal/HasMetadataOperationsImpl.java @@ -22,8 +22,6 @@ import io.fabric8.kubernetes.client.ClientContext; import io.fabric8.kubernetes.client.dsl.MixedOperation; import io.fabric8.kubernetes.client.dsl.Resource; -import io.fabric8.kubernetes.client.dsl.base.HasMetadataOperation; -import io.fabric8.kubernetes.client.dsl.base.OperationContext; import io.fabric8.kubernetes.client.dsl.base.ResourceDefinitionContext; import io.fabric8.kubernetes.client.utils.ApiVersionUtil; import io.fabric8.kubernetes.internal.KubernetesDeserializer; diff --git a/kubernetes-client/src/main/java/io/fabric8/kubernetes/client/dsl/internal/KubernetesListOperationsImpl.java b/kubernetes-client/src/main/java/io/fabric8/kubernetes/client/dsl/internal/KubernetesListOperationsImpl.java index 47d603ca172..901bcfa0524 100644 --- a/kubernetes-client/src/main/java/io/fabric8/kubernetes/client/dsl/internal/KubernetesListOperationsImpl.java +++ b/kubernetes-client/src/main/java/io/fabric8/kubernetes/client/dsl/internal/KubernetesListOperationsImpl.java @@ -30,7 +30,6 @@ import io.fabric8.kubernetes.client.dsl.Loadable; import io.fabric8.kubernetes.client.dsl.RecreateFromServerGettable; import io.fabric8.kubernetes.client.dsl.Resource; -import io.fabric8.kubernetes.client.dsl.base.OperationContext; import io.fabric8.kubernetes.client.utils.Serialization; import java.io.File; diff --git a/kubernetes-client/src/main/java/io/fabric8/kubernetes/client/dsl/internal/MetricOperationsImpl.java b/kubernetes-client/src/main/java/io/fabric8/kubernetes/client/dsl/internal/MetricOperationsImpl.java index 70ce9408642..36520117f8b 100644 --- a/kubernetes-client/src/main/java/io/fabric8/kubernetes/client/dsl/internal/MetricOperationsImpl.java +++ b/kubernetes-client/src/main/java/io/fabric8/kubernetes/client/dsl/internal/MetricOperationsImpl.java @@ -17,8 +17,6 @@ import io.fabric8.kubernetes.client.KubernetesClientException; import io.fabric8.kubernetes.client.dsl.MetricOperation; -import io.fabric8.kubernetes.client.dsl.base.OperationContext; -import io.fabric8.kubernetes.client.dsl.base.OperationSupport; import io.fabric8.kubernetes.client.utils.URLUtils; import io.fabric8.kubernetes.client.utils.Utils; import io.fabric8.kubernetes.client.utils.URLUtils.URLBuilder; diff --git a/kubernetes-client/src/main/java/io/fabric8/kubernetes/client/dsl/internal/NamespaceVisitFromServerGetWatchDeleteRecreateWaitApplicableImpl.java b/kubernetes-client/src/main/java/io/fabric8/kubernetes/client/dsl/internal/NamespaceVisitFromServerGetWatchDeleteRecreateWaitApplicableImpl.java index cc821ee3125..7b7dcb4f3e5 100644 --- a/kubernetes-client/src/main/java/io/fabric8/kubernetes/client/dsl/internal/NamespaceVisitFromServerGetWatchDeleteRecreateWaitApplicableImpl.java +++ b/kubernetes-client/src/main/java/io/fabric8/kubernetes/client/dsl/internal/NamespaceVisitFromServerGetWatchDeleteRecreateWaitApplicableImpl.java @@ -39,8 +39,6 @@ import io.fabric8.kubernetes.client.dsl.VisitFromServerGetWatchDeleteRecreateWaitApplicable; import io.fabric8.kubernetes.client.dsl.VisitFromServerWritable; import io.fabric8.kubernetes.client.dsl.Waitable; -import io.fabric8.kubernetes.client.dsl.base.HasMetadataOperation; -import io.fabric8.kubernetes.client.dsl.base.OperationContext; import io.fabric8.kubernetes.client.readiness.Readiness; import io.fabric8.kubernetes.client.utils.KubernetesResourceUtil; @@ -52,7 +50,7 @@ import java.util.function.Predicate; import java.util.function.UnaryOperator; -import static io.fabric8.kubernetes.client.utils.DeleteAndCreateHelper.deleteAndCreateItem; +import static io.fabric8.kubernetes.client.utils.internal.DeleteAndCreateHelper.deleteAndCreateItem; /** * Resource like operation with specific namespace rules. @@ -180,7 +178,7 @@ public Watch watch(String resourceVersion, Watcher watcher) { public Watch watch(ListOptions options, Watcher watcher) { return getResource().watch(options, watcher); } - + Resource getResource() { HasMetadata meta = (HasMetadata) context.getItem(); ResourceHandler handler = handlerOf(meta, context); @@ -214,32 +212,32 @@ public VisitFromServerWritable dryRun(boolean isDryRun) { public NamespaceVisitFromServerGetWatchDeleteRecreateWaitApplicableImpl newInstance(OperationContext context, NamespaceVisitOperationContext namespaceVisitOperationContext) { return new NamespaceVisitFromServerGetWatchDeleteRecreateWaitApplicableImpl(context, namespaceVisitOperationContext); } - + @Override public HasMetadata waitUntilCondition(Predicate condition, long amount, TimeUnit timeUnit) { return getResource().waitUntilCondition(condition, amount, timeUnit); } - + @Override public HasMetadata edit(Class visitorType, Visitor visitor) { return getResource().edit(visitorType, visitor); } - + @Override public HasMetadata edit(UnaryOperator function) { return getResource().edit(function); } - + @Override public HasMetadata edit(Visitor... visitors) { return getResource().edit(visitors); } - + @Override public HasMetadata accept(Consumer function) { return getResource().accept(function); } - + static HasMetadata acceptVisitors(HasMetadata item, List visitors, String explicitNamespace, OperationContext context) { ResourceHandler h = handlerOf(item, context); VisitableBuilder builder = h.edit(item); diff --git a/kubernetes-client/src/main/java/io/fabric8/kubernetes/client/dsl/internal/NamespaceVisitFromServerGetWatchDeleteRecreateWaitApplicableListImpl.java b/kubernetes-client/src/main/java/io/fabric8/kubernetes/client/dsl/internal/NamespaceVisitFromServerGetWatchDeleteRecreateWaitApplicableListImpl.java index b931dd2b58a..e7f4a53ee73 100644 --- a/kubernetes-client/src/main/java/io/fabric8/kubernetes/client/dsl/internal/NamespaceVisitFromServerGetWatchDeleteRecreateWaitApplicableListImpl.java +++ b/kubernetes-client/src/main/java/io/fabric8/kubernetes/client/dsl/internal/NamespaceVisitFromServerGetWatchDeleteRecreateWaitApplicableListImpl.java @@ -27,8 +27,6 @@ import io.fabric8.kubernetes.client.KubernetesClientException; import io.fabric8.kubernetes.client.KubernetesClientTimeoutException; import io.fabric8.kubernetes.client.dsl.*; -import io.fabric8.kubernetes.client.dsl.base.HasMetadataOperation; -import io.fabric8.kubernetes.client.dsl.base.OperationContext; import io.fabric8.kubernetes.client.http.HttpClient; import io.fabric8.kubernetes.client.readiness.Readiness; import io.fabric8.kubernetes.client.utils.Serialization; diff --git a/kubernetes-client/src/main/java/io/fabric8/kubernetes/client/dsl/internal/NodeMetricOperationsImpl.java b/kubernetes-client/src/main/java/io/fabric8/kubernetes/client/dsl/internal/NodeMetricOperationsImpl.java index dc63c4ac0e9..e8ed45683c9 100644 --- a/kubernetes-client/src/main/java/io/fabric8/kubernetes/client/dsl/internal/NodeMetricOperationsImpl.java +++ b/kubernetes-client/src/main/java/io/fabric8/kubernetes/client/dsl/internal/NodeMetricOperationsImpl.java @@ -19,7 +19,6 @@ import io.fabric8.kubernetes.api.model.metrics.v1beta1.NodeMetricsList; import io.fabric8.kubernetes.client.ClientContext; import io.fabric8.kubernetes.client.dsl.NodeMetricOperation; -import io.fabric8.kubernetes.client.dsl.base.OperationContext; import java.util.Map; diff --git a/kubernetes-client/src/main/java/io/fabric8/kubernetes/client/dsl/base/OperationContext.java b/kubernetes-client/src/main/java/io/fabric8/kubernetes/client/dsl/internal/OperationContext.java similarity index 99% rename from kubernetes-client/src/main/java/io/fabric8/kubernetes/client/dsl/base/OperationContext.java rename to kubernetes-client/src/main/java/io/fabric8/kubernetes/client/dsl/internal/OperationContext.java index 83a082b3a35..dee4784c0ee 100644 --- a/kubernetes-client/src/main/java/io/fabric8/kubernetes/client/dsl/base/OperationContext.java +++ b/kubernetes-client/src/main/java/io/fabric8/kubernetes/client/dsl/internal/OperationContext.java @@ -13,7 +13,7 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -package io.fabric8.kubernetes.client.dsl.base; +package io.fabric8.kubernetes.client.dsl.internal; import io.fabric8.kubernetes.api.model.DeletionPropagation; import io.fabric8.kubernetes.client.Config; diff --git a/kubernetes-client/src/main/java/io/fabric8/kubernetes/client/dsl/base/OperationSupport.java b/kubernetes-client/src/main/java/io/fabric8/kubernetes/client/dsl/internal/OperationSupport.java similarity index 99% rename from kubernetes-client/src/main/java/io/fabric8/kubernetes/client/dsl/base/OperationSupport.java rename to kubernetes-client/src/main/java/io/fabric8/kubernetes/client/dsl/internal/OperationSupport.java index 9d34fedb95d..6b2e9ac5b45 100644 --- a/kubernetes-client/src/main/java/io/fabric8/kubernetes/client/dsl/base/OperationSupport.java +++ b/kubernetes-client/src/main/java/io/fabric8/kubernetes/client/dsl/internal/OperationSupport.java @@ -13,7 +13,7 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -package io.fabric8.kubernetes.client.dsl.base; +package io.fabric8.kubernetes.client.dsl.internal; import com.fasterxml.jackson.core.type.TypeReference; import com.fasterxml.jackson.databind.ObjectMapper; @@ -28,15 +28,17 @@ import io.fabric8.kubernetes.api.model.extensions.DeploymentRollback; import io.fabric8.kubernetes.client.Config; import io.fabric8.kubernetes.client.KubernetesClientException; +import io.fabric8.kubernetes.client.dsl.base.PatchContext; +import io.fabric8.kubernetes.client.dsl.base.PatchType; import io.fabric8.kubernetes.client.http.HttpClient; import io.fabric8.kubernetes.client.http.HttpRequest; import io.fabric8.kubernetes.client.http.HttpResponse; import io.fabric8.kubernetes.client.internal.VersionUsageUtils; -import io.fabric8.kubernetes.client.utils.ExponentialBackoffIntervalCalculator; import io.fabric8.kubernetes.client.utils.KubernetesResourceUtil; import io.fabric8.kubernetes.client.utils.Serialization; import io.fabric8.kubernetes.client.utils.URLUtils; import io.fabric8.kubernetes.client.utils.Utils; +import io.fabric8.kubernetes.client.utils.internal.ExponentialBackoffIntervalCalculator; import io.fabric8.zjsonpatch.JsonDiff; import org.slf4j.Logger; import org.slf4j.LoggerFactory; diff --git a/kubernetes-client/src/main/java/io/fabric8/kubernetes/client/dsl/internal/PodMetricOperationsImpl.java b/kubernetes-client/src/main/java/io/fabric8/kubernetes/client/dsl/internal/PodMetricOperationsImpl.java index 6410bda80a8..da904e99942 100644 --- a/kubernetes-client/src/main/java/io/fabric8/kubernetes/client/dsl/internal/PodMetricOperationsImpl.java +++ b/kubernetes-client/src/main/java/io/fabric8/kubernetes/client/dsl/internal/PodMetricOperationsImpl.java @@ -20,7 +20,6 @@ import io.fabric8.kubernetes.client.ClientContext; import io.fabric8.kubernetes.client.ConfigBuilder; import io.fabric8.kubernetes.client.dsl.PodMetricOperation; -import io.fabric8.kubernetes.client.dsl.base.OperationContext; import java.util.Map; diff --git a/kubernetes-client/src/main/java/io/fabric8/kubernetes/client/dsl/internal/WatchConnectionManager.java b/kubernetes-client/src/main/java/io/fabric8/kubernetes/client/dsl/internal/WatchConnectionManager.java index 2050649ff80..e0887afe522 100644 --- a/kubernetes-client/src/main/java/io/fabric8/kubernetes/client/dsl/internal/WatchConnectionManager.java +++ b/kubernetes-client/src/main/java/io/fabric8/kubernetes/client/dsl/internal/WatchConnectionManager.java @@ -21,8 +21,6 @@ import io.fabric8.kubernetes.api.model.Status; import io.fabric8.kubernetes.client.KubernetesClientException; import io.fabric8.kubernetes.client.Watcher; -import io.fabric8.kubernetes.client.dsl.base.BaseOperation; -import io.fabric8.kubernetes.client.dsl.base.OperationSupport; import io.fabric8.kubernetes.client.http.HttpClient; import io.fabric8.kubernetes.client.http.HttpResponse; import io.fabric8.kubernetes.client.http.WebSocket; diff --git a/kubernetes-client/src/main/java/io/fabric8/kubernetes/client/dsl/internal/WatchHTTPManager.java b/kubernetes-client/src/main/java/io/fabric8/kubernetes/client/dsl/internal/WatchHTTPManager.java index 4c4e4f5beb5..e9c1199bfe2 100644 --- a/kubernetes-client/src/main/java/io/fabric8/kubernetes/client/dsl/internal/WatchHTTPManager.java +++ b/kubernetes-client/src/main/java/io/fabric8/kubernetes/client/dsl/internal/WatchHTTPManager.java @@ -29,8 +29,6 @@ import io.fabric8.kubernetes.api.model.KubernetesResourceList; import io.fabric8.kubernetes.api.model.ListOptions; import io.fabric8.kubernetes.client.Watcher; -import io.fabric8.kubernetes.client.dsl.base.BaseOperation; -import io.fabric8.kubernetes.client.dsl.base.OperationSupport; import io.fabric8.kubernetes.client.http.HttpClient; import io.fabric8.kubernetes.client.http.HttpRequest; import io.fabric8.kubernetes.client.http.HttpResponse; diff --git a/kubernetes-client/src/main/java/io/fabric8/kubernetes/client/dsl/internal/apps/v1/DeploymentOperationsImpl.java b/kubernetes-client/src/main/java/io/fabric8/kubernetes/client/dsl/internal/apps/v1/DeploymentOperationsImpl.java index 6c7930f7c60..34ad0e93a8f 100644 --- a/kubernetes-client/src/main/java/io/fabric8/kubernetes/client/dsl/internal/apps/v1/DeploymentOperationsImpl.java +++ b/kubernetes-client/src/main/java/io/fabric8/kubernetes/client/dsl/internal/apps/v1/DeploymentOperationsImpl.java @@ -29,9 +29,9 @@ import io.fabric8.kubernetes.client.dsl.LogWatch; import io.fabric8.kubernetes.client.dsl.RollableScalableResource; import io.fabric8.kubernetes.client.dsl.TimeoutImageEditReplacePatchable; -import io.fabric8.kubernetes.client.dsl.base.OperationContext; import io.fabric8.kubernetes.client.dsl.base.PatchContext; import io.fabric8.kubernetes.client.dsl.internal.HasMetadataOperationsImpl; +import io.fabric8.kubernetes.client.dsl.internal.OperationContext; import io.fabric8.kubernetes.client.dsl.internal.RollingOperationContext; import io.fabric8.kubernetes.client.utils.KubernetesResourceUtil; import org.slf4j.Logger; diff --git a/kubernetes-client/src/main/java/io/fabric8/kubernetes/client/dsl/internal/apps/v1/ReplicaSetOperationsImpl.java b/kubernetes-client/src/main/java/io/fabric8/kubernetes/client/dsl/internal/apps/v1/ReplicaSetOperationsImpl.java index 50f9f28315b..b951d21d48b 100644 --- a/kubernetes-client/src/main/java/io/fabric8/kubernetes/client/dsl/internal/apps/v1/ReplicaSetOperationsImpl.java +++ b/kubernetes-client/src/main/java/io/fabric8/kubernetes/client/dsl/internal/apps/v1/ReplicaSetOperationsImpl.java @@ -27,10 +27,10 @@ import io.fabric8.kubernetes.client.dsl.PodResource; import io.fabric8.kubernetes.client.dsl.RollableScalableResource; import io.fabric8.kubernetes.client.dsl.TimeoutImageEditReplacePatchable; -import io.fabric8.kubernetes.client.dsl.base.OperationContext; import io.fabric8.kubernetes.client.dsl.internal.HasMetadataOperationsImpl; +import io.fabric8.kubernetes.client.dsl.internal.OperationContext; import io.fabric8.kubernetes.client.dsl.internal.RollingOperationContext; -import io.fabric8.kubernetes.client.utils.PodOperationUtil; +import io.fabric8.kubernetes.client.utils.internal.PodOperationUtil; import java.io.OutputStream; import java.io.Reader; diff --git a/kubernetes-client/src/main/java/io/fabric8/kubernetes/client/dsl/internal/apps/v1/RollableScalableResourceOperation.java b/kubernetes-client/src/main/java/io/fabric8/kubernetes/client/dsl/internal/apps/v1/RollableScalableResourceOperation.java index 67a190aaccb..c0b41a112e7 100644 --- a/kubernetes-client/src/main/java/io/fabric8/kubernetes/client/dsl/internal/apps/v1/RollableScalableResourceOperation.java +++ b/kubernetes-client/src/main/java/io/fabric8/kubernetes/client/dsl/internal/apps/v1/RollableScalableResourceOperation.java @@ -26,10 +26,10 @@ import io.fabric8.kubernetes.client.dsl.Resource; import io.fabric8.kubernetes.client.dsl.RollableScalableResource; import io.fabric8.kubernetes.client.dsl.TimeoutImageEditReplacePatchable; -import io.fabric8.kubernetes.client.dsl.base.HasMetadataOperation; -import io.fabric8.kubernetes.client.dsl.base.OperationContext; import io.fabric8.kubernetes.client.dsl.base.PatchContext; import io.fabric8.kubernetes.client.dsl.base.PatchType; +import io.fabric8.kubernetes.client.dsl.internal.HasMetadataOperation; +import io.fabric8.kubernetes.client.dsl.internal.OperationContext; import io.fabric8.kubernetes.client.dsl.internal.RollingOperationContext; import io.fabric8.kubernetes.client.utils.Serialization; import org.slf4j.Logger; diff --git a/kubernetes-client/src/main/java/io/fabric8/kubernetes/client/dsl/internal/apps/v1/StatefulSetOperationsImpl.java b/kubernetes-client/src/main/java/io/fabric8/kubernetes/client/dsl/internal/apps/v1/StatefulSetOperationsImpl.java index ad60b04fd05..fb917144439 100644 --- a/kubernetes-client/src/main/java/io/fabric8/kubernetes/client/dsl/internal/apps/v1/StatefulSetOperationsImpl.java +++ b/kubernetes-client/src/main/java/io/fabric8/kubernetes/client/dsl/internal/apps/v1/StatefulSetOperationsImpl.java @@ -31,10 +31,10 @@ import io.fabric8.kubernetes.client.dsl.PodResource; import io.fabric8.kubernetes.client.dsl.RollableScalableResource; import io.fabric8.kubernetes.client.dsl.TimeoutImageEditReplacePatchable; -import io.fabric8.kubernetes.client.dsl.base.OperationContext; import io.fabric8.kubernetes.client.dsl.internal.HasMetadataOperationsImpl; +import io.fabric8.kubernetes.client.dsl.internal.OperationContext; import io.fabric8.kubernetes.client.dsl.internal.RollingOperationContext; -import io.fabric8.kubernetes.client.utils.PodOperationUtil; +import io.fabric8.kubernetes.client.utils.internal.PodOperationUtil; import java.io.IOException; import java.io.OutputStream; diff --git a/kubernetes-client/src/main/java/io/fabric8/kubernetes/client/dsl/internal/batch/v1/JobOperationsImpl.java b/kubernetes-client/src/main/java/io/fabric8/kubernetes/client/dsl/internal/batch/v1/JobOperationsImpl.java index 67e63daf427..a5924a6a924 100644 --- a/kubernetes-client/src/main/java/io/fabric8/kubernetes/client/dsl/internal/batch/v1/JobOperationsImpl.java +++ b/kubernetes-client/src/main/java/io/fabric8/kubernetes/client/dsl/internal/batch/v1/JobOperationsImpl.java @@ -25,11 +25,11 @@ import io.fabric8.kubernetes.client.dsl.Loggable; import io.fabric8.kubernetes.client.dsl.PodResource; import io.fabric8.kubernetes.client.dsl.ScalableResource; -import io.fabric8.kubernetes.client.dsl.base.HasMetadataOperation; -import io.fabric8.kubernetes.client.dsl.base.OperationContext; +import io.fabric8.kubernetes.client.dsl.internal.HasMetadataOperation; import io.fabric8.kubernetes.client.dsl.internal.HasMetadataOperationsImpl; +import io.fabric8.kubernetes.client.dsl.internal.OperationContext; import io.fabric8.kubernetes.client.dsl.internal.PodControllerOperationContext; -import io.fabric8.kubernetes.client.utils.PodOperationUtil; +import io.fabric8.kubernetes.client.utils.internal.PodOperationUtil; import org.slf4j.Logger; import org.slf4j.LoggerFactory; diff --git a/kubernetes-client/src/main/java/io/fabric8/kubernetes/client/dsl/internal/batch/v1beta1/CronJobOperationsImpl.java b/kubernetes-client/src/main/java/io/fabric8/kubernetes/client/dsl/internal/batch/v1beta1/CronJobOperationsImpl.java index b2fb8c0dc00..42a9b67cfdc 100644 --- a/kubernetes-client/src/main/java/io/fabric8/kubernetes/client/dsl/internal/batch/v1beta1/CronJobOperationsImpl.java +++ b/kubernetes-client/src/main/java/io/fabric8/kubernetes/client/dsl/internal/batch/v1beta1/CronJobOperationsImpl.java @@ -21,9 +21,9 @@ import io.fabric8.kubernetes.client.ClientContext; import io.fabric8.kubernetes.client.KubernetesClientException; import io.fabric8.kubernetes.client.dsl.Resource; -import io.fabric8.kubernetes.client.dsl.base.HasMetadataOperation; -import io.fabric8.kubernetes.client.dsl.base.OperationContext; +import io.fabric8.kubernetes.client.dsl.internal.HasMetadataOperation; import io.fabric8.kubernetes.client.dsl.internal.HasMetadataOperationsImpl; +import io.fabric8.kubernetes.client.dsl.internal.OperationContext; import java.io.InputStream; diff --git a/kubernetes-client/src/main/java/io/fabric8/kubernetes/client/dsl/internal/certificates/v1/CertificateSigningRequestOperationsImpl.java b/kubernetes-client/src/main/java/io/fabric8/kubernetes/client/dsl/internal/certificates/v1/CertificateSigningRequestOperationsImpl.java index 2b13a4c847c..cfd82985619 100644 --- a/kubernetes-client/src/main/java/io/fabric8/kubernetes/client/dsl/internal/certificates/v1/CertificateSigningRequestOperationsImpl.java +++ b/kubernetes-client/src/main/java/io/fabric8/kubernetes/client/dsl/internal/certificates/v1/CertificateSigningRequestOperationsImpl.java @@ -24,9 +24,9 @@ import io.fabric8.kubernetes.client.ClientContext; import io.fabric8.kubernetes.client.KubernetesClientException; import io.fabric8.kubernetes.client.dsl.CertificateSigningRequestResource; -import io.fabric8.kubernetes.client.dsl.base.HasMetadataOperation; -import io.fabric8.kubernetes.client.dsl.base.OperationContext; +import io.fabric8.kubernetes.client.dsl.internal.HasMetadataOperation; import io.fabric8.kubernetes.client.dsl.internal.HasMetadataOperationsImpl; +import io.fabric8.kubernetes.client.dsl.internal.OperationContext; import io.fabric8.kubernetes.client.http.HttpRequest; import io.fabric8.kubernetes.client.utils.URLUtils; diff --git a/kubernetes-client/src/main/java/io/fabric8/kubernetes/client/dsl/internal/core/v1/BindingOperationsImpl.java b/kubernetes-client/src/main/java/io/fabric8/kubernetes/client/dsl/internal/core/v1/BindingOperationsImpl.java index 46e10142f4b..080a9a0f8d3 100644 --- a/kubernetes-client/src/main/java/io/fabric8/kubernetes/client/dsl/internal/core/v1/BindingOperationsImpl.java +++ b/kubernetes-client/src/main/java/io/fabric8/kubernetes/client/dsl/internal/core/v1/BindingOperationsImpl.java @@ -21,9 +21,9 @@ import io.fabric8.kubernetes.api.model.KubernetesResourceList; import io.fabric8.kubernetes.client.ClientContext; import io.fabric8.kubernetes.client.dsl.Resource; -import io.fabric8.kubernetes.client.dsl.base.HasMetadataOperation; -import io.fabric8.kubernetes.client.dsl.base.OperationContext; +import io.fabric8.kubernetes.client.dsl.internal.HasMetadataOperation; import io.fabric8.kubernetes.client.dsl.internal.HasMetadataOperationsImpl; +import io.fabric8.kubernetes.client.dsl.internal.OperationContext; public class BindingOperationsImpl extends HasMetadataOperation, Resource> { public BindingOperationsImpl(ClientContext clientContext) { diff --git a/kubernetes-client/src/main/java/io/fabric8/kubernetes/client/dsl/internal/core/v1/ComponentStatusOperationsImpl.java b/kubernetes-client/src/main/java/io/fabric8/kubernetes/client/dsl/internal/core/v1/ComponentStatusOperationsImpl.java index 682dd1092f2..e2c28a14a55 100644 --- a/kubernetes-client/src/main/java/io/fabric8/kubernetes/client/dsl/internal/core/v1/ComponentStatusOperationsImpl.java +++ b/kubernetes-client/src/main/java/io/fabric8/kubernetes/client/dsl/internal/core/v1/ComponentStatusOperationsImpl.java @@ -19,9 +19,9 @@ import io.fabric8.kubernetes.api.model.ComponentStatusList; import io.fabric8.kubernetes.client.ClientContext; import io.fabric8.kubernetes.client.dsl.Resource; -import io.fabric8.kubernetes.client.dsl.base.HasMetadataOperation; -import io.fabric8.kubernetes.client.dsl.base.OperationContext; +import io.fabric8.kubernetes.client.dsl.internal.HasMetadataOperation; import io.fabric8.kubernetes.client.dsl.internal.HasMetadataOperationsImpl; +import io.fabric8.kubernetes.client.dsl.internal.OperationContext; public class ComponentStatusOperationsImpl extends HasMetadataOperation> { diff --git a/kubernetes-client/src/main/java/io/fabric8/kubernetes/client/dsl/internal/core/v1/PodOperationsImpl.java b/kubernetes-client/src/main/java/io/fabric8/kubernetes/client/dsl/internal/core/v1/PodOperationsImpl.java index 03091450c5b..1e0df0facef 100644 --- a/kubernetes-client/src/main/java/io/fabric8/kubernetes/client/dsl/internal/core/v1/PodOperationsImpl.java +++ b/kubernetes-client/src/main/java/io/fabric8/kubernetes/client/dsl/internal/core/v1/PodOperationsImpl.java @@ -35,6 +35,8 @@ import java.util.concurrent.CompletableFuture; import java.util.concurrent.TimeUnit; +import static io.fabric8.kubernetes.client.utils.internal.OptionalDependencyWrapper.wrapRunWithOptionalDependency; + import io.fabric8.kubernetes.api.model.DeleteOptions; import io.fabric8.kubernetes.api.model.HasMetadata; import io.fabric8.kubernetes.api.model.Pod; @@ -62,14 +64,12 @@ import io.fabric8.kubernetes.client.dsl.TtyExecErrorable; import io.fabric8.kubernetes.client.dsl.TtyExecOutputErrorable; import io.fabric8.kubernetes.client.dsl.TtyExecable; -import io.fabric8.kubernetes.client.dsl.base.HasMetadataOperation; -import io.fabric8.kubernetes.client.dsl.base.OperationContext; import io.fabric8.kubernetes.client.dsl.internal.ExecWebSocketListener; +import io.fabric8.kubernetes.client.dsl.internal.HasMetadataOperation; import io.fabric8.kubernetes.client.dsl.internal.HasMetadataOperationsImpl; import io.fabric8.kubernetes.client.dsl.internal.LogWatchCallback; +import io.fabric8.kubernetes.client.dsl.internal.OperationContext; import io.fabric8.kubernetes.client.dsl.internal.PodOperationContext; -import io.fabric8.kubernetes.client.utils.Base64; -import io.fabric8.kubernetes.client.utils.PodOperationUtil; import io.fabric8.kubernetes.client.dsl.internal.PortForwarderWebsocket; import io.fabric8.kubernetes.client.dsl.internal.uploadable.PodUpload; import io.fabric8.kubernetes.client.http.HttpClient; @@ -78,10 +78,10 @@ import io.fabric8.kubernetes.client.utils.URLUtils; import io.fabric8.kubernetes.client.utils.Utils; import io.fabric8.kubernetes.client.utils.URLUtils.URLBuilder; +import io.fabric8.kubernetes.client.utils.internal.Base64; +import io.fabric8.kubernetes.client.utils.internal.PodOperationUtil; import io.fabric8.kubernetes.client.lib.FilenameUtils; -import static io.fabric8.kubernetes.client.utils.OptionalDependencyWrapper.wrapRunWithOptionalDependency; - public class PodOperationsImpl extends HasMetadataOperation> implements PodResource,CopyOrReadable { public static final int HTTP_TOO_MANY_REQUESTS = 429; diff --git a/kubernetes-client/src/main/java/io/fabric8/kubernetes/client/dsl/internal/core/v1/ReplicationControllerOperationsImpl.java b/kubernetes-client/src/main/java/io/fabric8/kubernetes/client/dsl/internal/core/v1/ReplicationControllerOperationsImpl.java index c79f85b62d0..e2ae8bb3c35 100644 --- a/kubernetes-client/src/main/java/io/fabric8/kubernetes/client/dsl/internal/core/v1/ReplicationControllerOperationsImpl.java +++ b/kubernetes-client/src/main/java/io/fabric8/kubernetes/client/dsl/internal/core/v1/ReplicationControllerOperationsImpl.java @@ -27,12 +27,12 @@ import io.fabric8.kubernetes.client.dsl.PodResource; import io.fabric8.kubernetes.client.dsl.RollableScalableResource; import io.fabric8.kubernetes.client.dsl.TimeoutImageEditReplacePatchable; -import io.fabric8.kubernetes.client.dsl.base.OperationContext; import io.fabric8.kubernetes.client.dsl.internal.HasMetadataOperationsImpl; +import io.fabric8.kubernetes.client.dsl.internal.OperationContext; import io.fabric8.kubernetes.client.dsl.internal.RollingOperationContext; import io.fabric8.kubernetes.client.dsl.internal.apps.v1.RollableScalableResourceOperation; import io.fabric8.kubernetes.client.dsl.internal.apps.v1.RollingUpdater; -import io.fabric8.kubernetes.client.utils.PodOperationUtil; +import io.fabric8.kubernetes.client.utils.internal.PodOperationUtil; import java.io.InputStream; import java.io.OutputStream; diff --git a/kubernetes-client/src/main/java/io/fabric8/kubernetes/client/dsl/internal/core/v1/ServiceOperationsImpl.java b/kubernetes-client/src/main/java/io/fabric8/kubernetes/client/dsl/internal/core/v1/ServiceOperationsImpl.java index e103d34bd53..8bf846e3dfd 100644 --- a/kubernetes-client/src/main/java/io/fabric8/kubernetes/client/dsl/internal/core/v1/ServiceOperationsImpl.java +++ b/kubernetes-client/src/main/java/io/fabric8/kubernetes/client/dsl/internal/core/v1/ServiceOperationsImpl.java @@ -30,9 +30,9 @@ import io.fabric8.kubernetes.client.ServiceToURLProvider; import io.fabric8.kubernetes.client.dsl.Resource; import io.fabric8.kubernetes.client.dsl.ServiceResource; -import io.fabric8.kubernetes.client.dsl.base.HasMetadataOperation; -import io.fabric8.kubernetes.client.dsl.base.OperationContext; +import io.fabric8.kubernetes.client.dsl.internal.HasMetadataOperation; import io.fabric8.kubernetes.client.dsl.internal.HasMetadataOperationsImpl; +import io.fabric8.kubernetes.client.dsl.internal.OperationContext; import io.fabric8.kubernetes.client.utils.URLUtils; import java.net.InetAddress; diff --git a/kubernetes-client/src/main/java/io/fabric8/kubernetes/client/dsl/internal/extensions/v1beta1/DeploymentOperationsImpl.java b/kubernetes-client/src/main/java/io/fabric8/kubernetes/client/dsl/internal/extensions/v1beta1/DeploymentOperationsImpl.java index 354123942dd..6fb7f6fc9e3 100644 --- a/kubernetes-client/src/main/java/io/fabric8/kubernetes/client/dsl/internal/extensions/v1beta1/DeploymentOperationsImpl.java +++ b/kubernetes-client/src/main/java/io/fabric8/kubernetes/client/dsl/internal/extensions/v1beta1/DeploymentOperationsImpl.java @@ -29,9 +29,9 @@ import io.fabric8.kubernetes.client.dsl.LogWatch; import io.fabric8.kubernetes.client.dsl.RollableScalableResource; import io.fabric8.kubernetes.client.dsl.TimeoutImageEditReplacePatchable; -import io.fabric8.kubernetes.client.dsl.base.OperationContext; import io.fabric8.kubernetes.client.dsl.base.PatchContext; import io.fabric8.kubernetes.client.dsl.internal.HasMetadataOperationsImpl; +import io.fabric8.kubernetes.client.dsl.internal.OperationContext; import io.fabric8.kubernetes.client.dsl.internal.RollingOperationContext; import io.fabric8.kubernetes.client.dsl.internal.apps.v1.RollableScalableResourceOperation; import io.fabric8.kubernetes.client.dsl.internal.apps.v1.RollingUpdater; diff --git a/kubernetes-client/src/main/java/io/fabric8/kubernetes/client/dsl/internal/extensions/v1beta1/ReplicaSetOperationsImpl.java b/kubernetes-client/src/main/java/io/fabric8/kubernetes/client/dsl/internal/extensions/v1beta1/ReplicaSetOperationsImpl.java index 9a524cc56a8..640b6146943 100644 --- a/kubernetes-client/src/main/java/io/fabric8/kubernetes/client/dsl/internal/extensions/v1beta1/ReplicaSetOperationsImpl.java +++ b/kubernetes-client/src/main/java/io/fabric8/kubernetes/client/dsl/internal/extensions/v1beta1/ReplicaSetOperationsImpl.java @@ -27,12 +27,12 @@ import io.fabric8.kubernetes.client.dsl.PodResource; import io.fabric8.kubernetes.client.dsl.RollableScalableResource; import io.fabric8.kubernetes.client.dsl.TimeoutImageEditReplacePatchable; -import io.fabric8.kubernetes.client.dsl.base.OperationContext; import io.fabric8.kubernetes.client.dsl.internal.HasMetadataOperationsImpl; +import io.fabric8.kubernetes.client.dsl.internal.OperationContext; import io.fabric8.kubernetes.client.dsl.internal.RollingOperationContext; import io.fabric8.kubernetes.client.dsl.internal.apps.v1.RollableScalableResourceOperation; import io.fabric8.kubernetes.client.dsl.internal.apps.v1.RollingUpdater; -import io.fabric8.kubernetes.client.utils.PodOperationUtil; +import io.fabric8.kubernetes.client.utils.internal.PodOperationUtil; import java.io.OutputStream; import java.io.Reader; diff --git a/kubernetes-client/src/main/java/io/fabric8/kubernetes/client/dsl/internal/uploadable/PodUpload.java b/kubernetes-client/src/main/java/io/fabric8/kubernetes/client/dsl/internal/uploadable/PodUpload.java index ff2d4df4fb3..59f8d83c9f5 100644 --- a/kubernetes-client/src/main/java/io/fabric8/kubernetes/client/dsl/internal/uploadable/PodUpload.java +++ b/kubernetes-client/src/main/java/io/fabric8/kubernetes/client/dsl/internal/uploadable/PodUpload.java @@ -37,14 +37,14 @@ import java.util.concurrent.TimeoutException; import java.util.zip.GZIPOutputStream; -import io.fabric8.kubernetes.client.dsl.base.OperationSupport; +import io.fabric8.kubernetes.client.dsl.internal.OperationSupport; import io.fabric8.kubernetes.client.dsl.internal.PodOperationContext; import io.fabric8.kubernetes.client.http.HttpClient; import io.fabric8.kubernetes.client.http.WebSocket; -import io.fabric8.kubernetes.client.utils.Base64; import io.fabric8.kubernetes.client.utils.InputStreamPumper; import io.fabric8.kubernetes.client.utils.URLUtils; import io.fabric8.kubernetes.client.utils.Utils; +import io.fabric8.kubernetes.client.utils.internal.Base64; import org.apache.commons.compress.archivers.tar.TarArchiveEntry; import org.apache.commons.compress.archivers.tar.TarArchiveOutputStream; diff --git a/kubernetes-client/src/main/java/io/fabric8/kubernetes/client/extended/run/RunOperationsImpl.java b/kubernetes-client/src/main/java/io/fabric8/kubernetes/client/extended/run/RunOperationsImpl.java deleted file mode 100644 index 1702e268a74..00000000000 --- a/kubernetes-client/src/main/java/io/fabric8/kubernetes/client/extended/run/RunOperationsImpl.java +++ /dev/null @@ -1,95 +0,0 @@ -/** - * Copyright (C) 2015 Red Hat, Inc. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -package io.fabric8.kubernetes.client.extended.run; - -import io.fabric8.kubernetes.api.model.Pod; -import io.fabric8.kubernetes.api.model.PodBuilder; -import io.fabric8.kubernetes.client.ClientContext; -import io.fabric8.kubernetes.client.dsl.internal.core.v1.PodOperationsImpl; - -public class RunOperationsImpl implements RunOperations { - private final ClientContext clientContext; - private final String namespace; - private final RunConfigBuilder runConfigBuilder; - - public RunOperationsImpl(ClientContext clientContext, String namespace, RunConfigBuilder runConfigBuilder) { - this.clientContext = clientContext; - this.namespace = namespace; - this.runConfigBuilder = runConfigBuilder; - } - - /** - * Specify namespace for the operation - * - * @param namespace namespace in which resource needs to be created - * @return {@link RunOperations} with injected namespace - */ - @Override - public RunOperations inNamespace(String namespace) { - return new RunOperationsImpl(clientContext, namespace, runConfigBuilder); - } - - /** - * Specify image for the Pod - * - * @param image image as a string - * @return {@link RunOperations} with image injected into {@link RunConfig} - */ - @Override - public RunOperations withImage(String image) { - return new RunOperationsImpl(clientContext, namespace, runConfigBuilder.withImage(image)); - } - - /** - * Specify name for the Pod - * - * @param name name of the pod to be created - * @return {@link RunOperations} with name injected into {@link RunConfig} - */ - @Override - public RunOperations withName(String name) { - return new RunOperationsImpl(clientContext, namespace, runConfigBuilder.withName(name)); - } - - /** - * Specify complex configuration for Pod creating using {@link RunConfig} - * - * @param generatorRunConfig {@link RunConfig} which allows to provide configuring environment variables, labels, resources, ports etc - * @return {@link RunOperations} with specified configuration - */ - @Override - public RunOperations withRunConfig(RunConfig generatorRunConfig) { - return new RunOperationsImpl(clientContext, namespace, new RunConfigBuilder(generatorRunConfig)); - } - - /** - * Apply the {@link RunConfig} onto the cluster and create Pod - * - * @return Pod which got created from the operation - */ - @Override - public Pod done() { - return new PodOperationsImpl(clientContext, namespace).create(convertRunConfigIntoPod()); - } - - Pod convertRunConfigIntoPod() { - RunConfig finalGeneratorConfig = runConfigBuilder.build(); - return new PodBuilder() - .withMetadata(RunConfigUtil.getObjectMetadataFromRunConfig(finalGeneratorConfig)) - .withSpec(RunConfigUtil.getPodSpecFromRunConfig(finalGeneratorConfig)) - .build(); - } -} diff --git a/kubernetes-client/src/main/java/io/fabric8/kubernetes/client/informers/impl/DefaultSharedIndexInformer.java b/kubernetes-client/src/main/java/io/fabric8/kubernetes/client/informers/impl/DefaultSharedIndexInformer.java index 877aa4be84f..a2bb097dffc 100644 --- a/kubernetes-client/src/main/java/io/fabric8/kubernetes/client/informers/impl/DefaultSharedIndexInformer.java +++ b/kubernetes-client/src/main/java/io/fabric8/kubernetes/client/informers/impl/DefaultSharedIndexInformer.java @@ -19,16 +19,15 @@ import io.fabric8.kubernetes.api.model.KubernetesResourceList; import io.fabric8.kubernetes.client.informers.ListerWatcher; import io.fabric8.kubernetes.client.informers.ResourceEventHandler; -import io.fabric8.kubernetes.client.informers.ResyncRunnable; import io.fabric8.kubernetes.client.informers.SharedIndexInformer; -import io.fabric8.kubernetes.client.informers.cache.CacheImpl; import io.fabric8.kubernetes.client.informers.cache.Indexer; -import io.fabric8.kubernetes.client.informers.cache.ProcessorStore; -import io.fabric8.kubernetes.client.informers.cache.Reflector; -import io.fabric8.kubernetes.client.informers.cache.SharedProcessor; import io.fabric8.kubernetes.client.informers.cache.Store; -import io.fabric8.kubernetes.client.utils.SerialExecutor; +import io.fabric8.kubernetes.client.informers.impl.cache.CacheImpl; +import io.fabric8.kubernetes.client.informers.impl.cache.ProcessorStore; +import io.fabric8.kubernetes.client.informers.impl.cache.Reflector; +import io.fabric8.kubernetes.client.informers.impl.cache.SharedProcessor; import io.fabric8.kubernetes.client.utils.Utils; +import io.fabric8.kubernetes.client.utils.internal.SerialExecutor; import org.slf4j.Logger; import org.slf4j.LoggerFactory; diff --git a/kubernetes-client/src/main/java/io/fabric8/kubernetes/client/informers/ResyncRunnable.java b/kubernetes-client/src/main/java/io/fabric8/kubernetes/client/informers/impl/ResyncRunnable.java similarity index 92% rename from kubernetes-client/src/main/java/io/fabric8/kubernetes/client/informers/ResyncRunnable.java rename to kubernetes-client/src/main/java/io/fabric8/kubernetes/client/informers/impl/ResyncRunnable.java index ba4c9788a3d..f11c85ab304 100644 --- a/kubernetes-client/src/main/java/io/fabric8/kubernetes/client/informers/ResyncRunnable.java +++ b/kubernetes-client/src/main/java/io/fabric8/kubernetes/client/informers/impl/ResyncRunnable.java @@ -13,9 +13,9 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -package io.fabric8.kubernetes.client.informers; +package io.fabric8.kubernetes.client.informers.impl; -import io.fabric8.kubernetes.client.informers.cache.SyncableStore; +import io.fabric8.kubernetes.client.informers.impl.cache.SyncableStore; import org.slf4j.Logger; import org.slf4j.LoggerFactory; diff --git a/kubernetes-client/src/main/java/io/fabric8/kubernetes/client/informers/SharedInformerFactoryImpl.java b/kubernetes-client/src/main/java/io/fabric8/kubernetes/client/informers/impl/SharedInformerFactoryImpl.java similarity index 98% rename from kubernetes-client/src/main/java/io/fabric8/kubernetes/client/informers/SharedInformerFactoryImpl.java rename to kubernetes-client/src/main/java/io/fabric8/kubernetes/client/informers/impl/SharedInformerFactoryImpl.java index 3010482f97a..af148116e8d 100644 --- a/kubernetes-client/src/main/java/io/fabric8/kubernetes/client/informers/SharedInformerFactoryImpl.java +++ b/kubernetes-client/src/main/java/io/fabric8/kubernetes/client/informers/impl/SharedInformerFactoryImpl.java @@ -13,7 +13,7 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -package io.fabric8.kubernetes.client.informers; +package io.fabric8.kubernetes.client.informers.impl; import io.fabric8.kubernetes.api.model.GenericKubernetesResource; import io.fabric8.kubernetes.api.model.GenericKubernetesResourceList; @@ -23,10 +23,12 @@ import io.fabric8.kubernetes.client.CustomResource; import io.fabric8.kubernetes.client.dsl.Informable; import io.fabric8.kubernetes.client.dsl.base.CustomResourceDefinitionContext; -import io.fabric8.kubernetes.client.dsl.base.OperationContext; import io.fabric8.kubernetes.client.dsl.base.ResourceDefinitionContext; import io.fabric8.kubernetes.client.dsl.internal.HasMetadataOperationsImpl; -import io.fabric8.kubernetes.client.informers.impl.DefaultSharedIndexInformer; +import io.fabric8.kubernetes.client.dsl.internal.OperationContext; +import io.fabric8.kubernetes.client.informers.SharedIndexInformer; +import io.fabric8.kubernetes.client.informers.SharedInformerEventListener; +import io.fabric8.kubernetes.client.informers.SharedInformerFactory; import io.fabric8.kubernetes.client.utils.Utils; import org.slf4j.Logger; import org.slf4j.LoggerFactory; diff --git a/kubernetes-client/src/main/java/io/fabric8/kubernetes/client/informers/cache/CacheImpl.java b/kubernetes-client/src/main/java/io/fabric8/kubernetes/client/informers/impl/cache/CacheImpl.java similarity index 99% rename from kubernetes-client/src/main/java/io/fabric8/kubernetes/client/informers/cache/CacheImpl.java rename to kubernetes-client/src/main/java/io/fabric8/kubernetes/client/informers/impl/cache/CacheImpl.java index dcc95e7c5c2..6829ebca2cb 100644 --- a/kubernetes-client/src/main/java/io/fabric8/kubernetes/client/informers/cache/CacheImpl.java +++ b/kubernetes-client/src/main/java/io/fabric8/kubernetes/client/informers/impl/cache/CacheImpl.java @@ -13,9 +13,10 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -package io.fabric8.kubernetes.client.informers.cache; +package io.fabric8.kubernetes.client.informers.impl.cache; import io.fabric8.kubernetes.api.model.ObjectMeta; +import io.fabric8.kubernetes.client.informers.cache.Cache; import io.fabric8.kubernetes.client.utils.ReflectUtils; import io.fabric8.kubernetes.client.utils.Utils; diff --git a/kubernetes-client/src/main/java/io/fabric8/kubernetes/client/informers/cache/ProcessorListener.java b/kubernetes-client/src/main/java/io/fabric8/kubernetes/client/informers/impl/cache/ProcessorListener.java similarity index 98% rename from kubernetes-client/src/main/java/io/fabric8/kubernetes/client/informers/cache/ProcessorListener.java rename to kubernetes-client/src/main/java/io/fabric8/kubernetes/client/informers/impl/cache/ProcessorListener.java index f05bbca48a5..ef957730593 100644 --- a/kubernetes-client/src/main/java/io/fabric8/kubernetes/client/informers/cache/ProcessorListener.java +++ b/kubernetes-client/src/main/java/io/fabric8/kubernetes/client/informers/impl/cache/ProcessorListener.java @@ -13,7 +13,7 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -package io.fabric8.kubernetes.client.informers.cache; +package io.fabric8.kubernetes.client.informers.impl.cache; import io.fabric8.kubernetes.client.informers.ResourceEventHandler; diff --git a/kubernetes-client/src/main/java/io/fabric8/kubernetes/client/informers/cache/ProcessorStore.java b/kubernetes-client/src/main/java/io/fabric8/kubernetes/client/informers/impl/cache/ProcessorStore.java similarity index 96% rename from kubernetes-client/src/main/java/io/fabric8/kubernetes/client/informers/cache/ProcessorStore.java rename to kubernetes-client/src/main/java/io/fabric8/kubernetes/client/informers/impl/cache/ProcessorStore.java index a044054cd80..67793cb8805 100644 --- a/kubernetes-client/src/main/java/io/fabric8/kubernetes/client/informers/cache/ProcessorStore.java +++ b/kubernetes-client/src/main/java/io/fabric8/kubernetes/client/informers/impl/cache/ProcessorStore.java @@ -14,9 +14,10 @@ * limitations under the License. */ -package io.fabric8.kubernetes.client.informers.cache; +package io.fabric8.kubernetes.client.informers.impl.cache; import io.fabric8.kubernetes.api.model.HasMetadata; +import io.fabric8.kubernetes.client.informers.cache.Cache; import java.util.List; import java.util.Objects; diff --git a/kubernetes-client/src/main/java/io/fabric8/kubernetes/client/informers/cache/Reflector.java b/kubernetes-client/src/main/java/io/fabric8/kubernetes/client/informers/impl/cache/Reflector.java similarity index 99% rename from kubernetes-client/src/main/java/io/fabric8/kubernetes/client/informers/cache/Reflector.java rename to kubernetes-client/src/main/java/io/fabric8/kubernetes/client/informers/impl/cache/Reflector.java index d9b84152771..a466f96015d 100644 --- a/kubernetes-client/src/main/java/io/fabric8/kubernetes/client/informers/cache/Reflector.java +++ b/kubernetes-client/src/main/java/io/fabric8/kubernetes/client/informers/impl/cache/Reflector.java @@ -13,7 +13,7 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -package io.fabric8.kubernetes.client.informers.cache; +package io.fabric8.kubernetes.client.informers.impl.cache; import io.fabric8.kubernetes.api.model.HasMetadata; import io.fabric8.kubernetes.api.model.KubernetesResourceList; diff --git a/kubernetes-client/src/main/java/io/fabric8/kubernetes/client/informers/cache/SharedProcessor.java b/kubernetes-client/src/main/java/io/fabric8/kubernetes/client/informers/impl/cache/SharedProcessor.java similarity index 98% rename from kubernetes-client/src/main/java/io/fabric8/kubernetes/client/informers/cache/SharedProcessor.java rename to kubernetes-client/src/main/java/io/fabric8/kubernetes/client/informers/impl/cache/SharedProcessor.java index f5050951e30..f4e2829d183 100644 --- a/kubernetes-client/src/main/java/io/fabric8/kubernetes/client/informers/cache/SharedProcessor.java +++ b/kubernetes-client/src/main/java/io/fabric8/kubernetes/client/informers/impl/cache/SharedProcessor.java @@ -13,7 +13,7 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -package io.fabric8.kubernetes.client.informers.cache; +package io.fabric8.kubernetes.client.informers.impl.cache; import io.fabric8.kubernetes.client.informers.ResourceEventHandler; import org.slf4j.Logger; diff --git a/kubernetes-client/src/main/java/io/fabric8/kubernetes/client/informers/cache/SyncableStore.java b/kubernetes-client/src/main/java/io/fabric8/kubernetes/client/informers/impl/cache/SyncableStore.java similarity index 91% rename from kubernetes-client/src/main/java/io/fabric8/kubernetes/client/informers/cache/SyncableStore.java rename to kubernetes-client/src/main/java/io/fabric8/kubernetes/client/informers/impl/cache/SyncableStore.java index fad0b13e022..232c4729bb3 100644 --- a/kubernetes-client/src/main/java/io/fabric8/kubernetes/client/informers/cache/SyncableStore.java +++ b/kubernetes-client/src/main/java/io/fabric8/kubernetes/client/informers/impl/cache/SyncableStore.java @@ -13,7 +13,9 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -package io.fabric8.kubernetes.client.informers.cache; +package io.fabric8.kubernetes.client.informers.impl.cache; + +import io.fabric8.kubernetes.client.informers.cache.Store; import java.util.Set; diff --git a/kubernetes-client/src/main/java/io/fabric8/kubernetes/client/osgi/ManagedKubernetesClient.java b/kubernetes-client/src/main/java/io/fabric8/kubernetes/client/osgi/ManagedKubernetesClient.java index 19b4f743787..28d2371e8f4 100644 --- a/kubernetes-client/src/main/java/io/fabric8/kubernetes/client/osgi/ManagedKubernetesClient.java +++ b/kubernetes-client/src/main/java/io/fabric8/kubernetes/client/osgi/ManagedKubernetesClient.java @@ -70,7 +70,6 @@ import io.fabric8.kubernetes.client.DefaultKubernetesClient; import io.fabric8.kubernetes.client.ResourceHandler; import io.fabric8.kubernetes.client.RequestConfig; -import io.fabric8.kubernetes.client.Handlers; import io.fabric8.kubernetes.client.VersionInfo; import io.fabric8.kubernetes.client.dsl.ApiextensionsAPIGroupDSL; import io.fabric8.kubernetes.client.dsl.AppsAPIGroupDSL; @@ -101,12 +100,9 @@ import io.fabric8.kubernetes.client.dsl.ServiceResource; import io.fabric8.kubernetes.client.dsl.StorageAPIGroupDSL; import io.fabric8.kubernetes.client.dsl.V1APIGroupDSL; -import io.fabric8.kubernetes.client.dsl.base.CustomResourceDefinitionContext; import io.fabric8.kubernetes.client.dsl.base.ResourceDefinitionContext; import io.fabric8.kubernetes.client.extended.leaderelection.LeaderElectorBuilder; -import io.fabric8.kubernetes.client.extended.run.RunConfigBuilder; import io.fabric8.kubernetes.client.extended.run.RunOperations; -import io.fabric8.kubernetes.client.extended.run.RunOperationsImpl; import io.fabric8.kubernetes.client.informers.SharedInformerFactory; import org.apache.felix.scr.annotations.Activate; import org.apache.felix.scr.annotations.Component; @@ -580,7 +576,7 @@ public FunctionCallable withRequestConfig(RequestCon @Override public RunOperations run() { - return new RunOperationsImpl(this, getNamespace(), new RunConfigBuilder()); + return delegate.run(); } @Override diff --git a/kubernetes-client/src/main/java/io/fabric8/kubernetes/client/utils/Base64.java b/kubernetes-client/src/main/java/io/fabric8/kubernetes/client/utils/internal/Base64.java similarity index 99% rename from kubernetes-client/src/main/java/io/fabric8/kubernetes/client/utils/Base64.java rename to kubernetes-client/src/main/java/io/fabric8/kubernetes/client/utils/internal/Base64.java index 523a9c9d4f8..c39543e2169 100644 --- a/kubernetes-client/src/main/java/io/fabric8/kubernetes/client/utils/Base64.java +++ b/kubernetes-client/src/main/java/io/fabric8/kubernetes/client/utils/internal/Base64.java @@ -13,7 +13,7 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -package io.fabric8.kubernetes.client.utils; +package io.fabric8.kubernetes.client.utils.internal; import io.fabric8.kubernetes.client.KubernetesClientException; diff --git a/kubernetes-client/src/main/java/io/fabric8/kubernetes/client/utils/CreateOrReplaceHelper.java b/kubernetes-client/src/main/java/io/fabric8/kubernetes/client/utils/internal/CreateOrReplaceHelper.java similarity index 93% rename from kubernetes-client/src/main/java/io/fabric8/kubernetes/client/utils/CreateOrReplaceHelper.java rename to kubernetes-client/src/main/java/io/fabric8/kubernetes/client/utils/internal/CreateOrReplaceHelper.java index c533657f64a..e4c2afe135d 100644 --- a/kubernetes-client/src/main/java/io/fabric8/kubernetes/client/utils/CreateOrReplaceHelper.java +++ b/kubernetes-client/src/main/java/io/fabric8/kubernetes/client/utils/internal/CreateOrReplaceHelper.java @@ -13,10 +13,12 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -package io.fabric8.kubernetes.client.utils; +package io.fabric8.kubernetes.client.utils.internal; import io.fabric8.kubernetes.api.model.HasMetadata; import io.fabric8.kubernetes.client.KubernetesClientException; +import io.fabric8.kubernetes.client.utils.KubernetesResourceUtil; +import io.fabric8.kubernetes.client.utils.Serialization; import java.net.HttpURLConnection; import java.util.concurrent.CompletableFuture; diff --git a/kubernetes-client/src/main/java/io/fabric8/kubernetes/client/utils/DeleteAndCreateHelper.java b/kubernetes-client/src/main/java/io/fabric8/kubernetes/client/utils/internal/DeleteAndCreateHelper.java similarity index 98% rename from kubernetes-client/src/main/java/io/fabric8/kubernetes/client/utils/DeleteAndCreateHelper.java rename to kubernetes-client/src/main/java/io/fabric8/kubernetes/client/utils/internal/DeleteAndCreateHelper.java index 2f992000001..999c9d9141a 100644 --- a/kubernetes-client/src/main/java/io/fabric8/kubernetes/client/utils/DeleteAndCreateHelper.java +++ b/kubernetes-client/src/main/java/io/fabric8/kubernetes/client/utils/internal/DeleteAndCreateHelper.java @@ -13,7 +13,7 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -package io.fabric8.kubernetes.client.utils; +package io.fabric8.kubernetes.client.utils.internal; import io.fabric8.kubernetes.api.model.HasMetadata; import io.fabric8.kubernetes.client.KubernetesClientException; diff --git a/kubernetes-client/src/main/java/io/fabric8/kubernetes/client/utils/ExponentialBackoffIntervalCalculator.java b/kubernetes-client/src/main/java/io/fabric8/kubernetes/client/utils/internal/ExponentialBackoffIntervalCalculator.java similarity index 95% rename from kubernetes-client/src/main/java/io/fabric8/kubernetes/client/utils/ExponentialBackoffIntervalCalculator.java rename to kubernetes-client/src/main/java/io/fabric8/kubernetes/client/utils/internal/ExponentialBackoffIntervalCalculator.java index db91356769d..269e2528e22 100644 --- a/kubernetes-client/src/main/java/io/fabric8/kubernetes/client/utils/ExponentialBackoffIntervalCalculator.java +++ b/kubernetes-client/src/main/java/io/fabric8/kubernetes/client/utils/internal/ExponentialBackoffIntervalCalculator.java @@ -13,7 +13,7 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -package io.fabric8.kubernetes.client.utils; +package io.fabric8.kubernetes.client.utils.internal; public class ExponentialBackoffIntervalCalculator { diff --git a/kubernetes-client-api/src/main/java/io/fabric8/kubernetes/client/utils/OptionalDependencyWrapper.java b/kubernetes-client/src/main/java/io/fabric8/kubernetes/client/utils/internal/OptionalDependencyWrapper.java similarity index 96% rename from kubernetes-client-api/src/main/java/io/fabric8/kubernetes/client/utils/OptionalDependencyWrapper.java rename to kubernetes-client/src/main/java/io/fabric8/kubernetes/client/utils/internal/OptionalDependencyWrapper.java index 2e0123b368d..7c3ef464114 100644 --- a/kubernetes-client-api/src/main/java/io/fabric8/kubernetes/client/utils/OptionalDependencyWrapper.java +++ b/kubernetes-client/src/main/java/io/fabric8/kubernetes/client/utils/internal/OptionalDependencyWrapper.java @@ -13,7 +13,7 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -package io.fabric8.kubernetes.client.utils; +package io.fabric8.kubernetes.client.utils.internal; import java.util.function.Supplier; diff --git a/kubernetes-client/src/main/java/io/fabric8/kubernetes/client/utils/PodOperationUtil.java b/kubernetes-client/src/main/java/io/fabric8/kubernetes/client/utils/internal/PodOperationUtil.java similarity index 93% rename from kubernetes-client/src/main/java/io/fabric8/kubernetes/client/utils/PodOperationUtil.java rename to kubernetes-client/src/main/java/io/fabric8/kubernetes/client/utils/internal/PodOperationUtil.java index 927aed9ab22..442c82460ad 100644 --- a/kubernetes-client/src/main/java/io/fabric8/kubernetes/client/utils/PodOperationUtil.java +++ b/kubernetes-client/src/main/java/io/fabric8/kubernetes/client/utils/internal/PodOperationUtil.java @@ -13,16 +13,17 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -package io.fabric8.kubernetes.client.utils; +package io.fabric8.kubernetes.client.utils.internal; import io.fabric8.kubernetes.api.model.OwnerReference; import io.fabric8.kubernetes.api.model.Pod; import io.fabric8.kubernetes.api.model.PodList; import io.fabric8.kubernetes.client.dsl.LogWatch; import io.fabric8.kubernetes.client.dsl.PodResource; -import io.fabric8.kubernetes.client.dsl.base.OperationContext; +import io.fabric8.kubernetes.client.dsl.internal.OperationContext; import io.fabric8.kubernetes.client.dsl.internal.PodOperationContext; import io.fabric8.kubernetes.client.dsl.internal.core.v1.PodOperationsImpl; +import io.fabric8.kubernetes.client.utils.KubernetesResourceUtil; import org.slf4j.Logger; import org.slf4j.LoggerFactory; @@ -97,7 +98,7 @@ public static String getLog(List> podOperationList, Boolean isP return stringBuilder.toString(); } - static List> getPodOperationsForController(PodOperationsImpl podOperations, String controllerUid, Map selectorLabels) { + public static List> getPodOperationsForController(PodOperationsImpl podOperations, String controllerUid, Map selectorLabels) { PodList controllerPodList = podOperations.withLabels(selectorLabels).list(); return PodOperationUtil.getFilteredPodsForLogs(podOperations, controllerPodList, controllerUid); diff --git a/kubernetes-client/src/main/java/io/fabric8/kubernetes/client/utils/SerialExecutor.java b/kubernetes-client/src/main/java/io/fabric8/kubernetes/client/utils/internal/SerialExecutor.java similarity index 96% rename from kubernetes-client/src/main/java/io/fabric8/kubernetes/client/utils/SerialExecutor.java rename to kubernetes-client/src/main/java/io/fabric8/kubernetes/client/utils/internal/SerialExecutor.java index a167361f64f..29e660c4ddc 100644 --- a/kubernetes-client/src/main/java/io/fabric8/kubernetes/client/utils/SerialExecutor.java +++ b/kubernetes-client/src/main/java/io/fabric8/kubernetes/client/utils/internal/SerialExecutor.java @@ -14,7 +14,7 @@ * limitations under the License. */ -package io.fabric8.kubernetes.client.utils; +package io.fabric8.kubernetes.client.utils.internal; import java.util.ArrayDeque; import java.util.Queue; diff --git a/kubernetes-client-api/src/main/java/io/fabric8/kubernetes/client/utils/URLFromServiceUtil.java b/kubernetes-client/src/main/java/io/fabric8/kubernetes/client/utils/internal/URLFromServiceUtil.java similarity index 98% rename from kubernetes-client-api/src/main/java/io/fabric8/kubernetes/client/utils/URLFromServiceUtil.java rename to kubernetes-client/src/main/java/io/fabric8/kubernetes/client/utils/internal/URLFromServiceUtil.java index 412c9d4312c..fd70c123e9f 100644 --- a/kubernetes-client-api/src/main/java/io/fabric8/kubernetes/client/utils/URLFromServiceUtil.java +++ b/kubernetes-client/src/main/java/io/fabric8/kubernetes/client/utils/internal/URLFromServiceUtil.java @@ -14,10 +14,11 @@ * limitations under the License. */ -package io.fabric8.kubernetes.client.utils; +package io.fabric8.kubernetes.client.utils.internal; import io.fabric8.kubernetes.api.model.*; import io.fabric8.kubernetes.api.model.extensions.*; +import io.fabric8.kubernetes.client.utils.URLUtils; import org.slf4j.Logger; import org.slf4j.LoggerFactory; diff --git a/kubernetes-client/src/main/java/io/fabric8/kubernetes/client/utils/WatcherToggle.java b/kubernetes-client/src/main/java/io/fabric8/kubernetes/client/utils/internal/WatcherToggle.java similarity index 96% rename from kubernetes-client/src/main/java/io/fabric8/kubernetes/client/utils/WatcherToggle.java rename to kubernetes-client/src/main/java/io/fabric8/kubernetes/client/utils/internal/WatcherToggle.java index 20909332af7..c810241c3ee 100644 --- a/kubernetes-client/src/main/java/io/fabric8/kubernetes/client/utils/WatcherToggle.java +++ b/kubernetes-client/src/main/java/io/fabric8/kubernetes/client/utils/internal/WatcherToggle.java @@ -14,7 +14,7 @@ * limitations under the License. */ -package io.fabric8.kubernetes.client.utils; +package io.fabric8.kubernetes.client.utils.internal; import io.fabric8.kubernetes.client.Watcher; import io.fabric8.kubernetes.client.WatcherException; diff --git a/kubernetes-client/src/test/java/io/fabric8/kubernetes/client/HandlersTest.java b/kubernetes-client/src/test/java/io/fabric8/kubernetes/client/HandlersTest.java index 83bb81801a0..b2af7ed26b7 100644 --- a/kubernetes-client/src/test/java/io/fabric8/kubernetes/client/HandlersTest.java +++ b/kubernetes-client/src/test/java/io/fabric8/kubernetes/client/HandlersTest.java @@ -18,9 +18,9 @@ import io.fabric8.kubernetes.api.model.KubernetesResourceList; import io.fabric8.kubernetes.api.model.Pod; import io.fabric8.kubernetes.client.dsl.Resource; -import io.fabric8.kubernetes.client.dsl.base.HasMetadataOperation; -import io.fabric8.kubernetes.client.dsl.base.OperationContext; +import io.fabric8.kubernetes.client.dsl.internal.HasMetadataOperation; import io.fabric8.kubernetes.client.dsl.internal.HasMetadataOperationsImpl; +import io.fabric8.kubernetes.client.dsl.internal.OperationContext; import org.hamcrest.Matchers; import org.junit.jupiter.api.Test; diff --git a/kubernetes-client/src/test/java/io/fabric8/kubernetes/client/PatchTest.java b/kubernetes-client/src/test/java/io/fabric8/kubernetes/client/PatchTest.java index 78964ffff0b..cbddde755c8 100644 --- a/kubernetes-client/src/test/java/io/fabric8/kubernetes/client/PatchTest.java +++ b/kubernetes-client/src/test/java/io/fabric8/kubernetes/client/PatchTest.java @@ -17,9 +17,9 @@ import io.fabric8.kubernetes.api.model.Pod; import io.fabric8.kubernetes.client.dsl.PodResource; -import io.fabric8.kubernetes.client.dsl.base.OperationSupport; import io.fabric8.kubernetes.client.dsl.base.PatchContext; import io.fabric8.kubernetes.client.dsl.base.PatchType; +import io.fabric8.kubernetes.client.dsl.internal.OperationSupport; import io.fabric8.kubernetes.client.http.HttpClient; import io.fabric8.kubernetes.client.http.HttpRequest; import io.fabric8.kubernetes.client.http.HttpRequest.Builder; diff --git a/kubernetes-client/src/test/java/io/fabric8/kubernetes/client/dsl/internal/AbstractWatchManagerTest.java b/kubernetes-client/src/test/java/io/fabric8/kubernetes/client/dsl/internal/AbstractWatchManagerTest.java index 86a7620b6ad..5ce535aaf4a 100644 --- a/kubernetes-client/src/test/java/io/fabric8/kubernetes/client/dsl/internal/AbstractWatchManagerTest.java +++ b/kubernetes-client/src/test/java/io/fabric8/kubernetes/client/dsl/internal/AbstractWatchManagerTest.java @@ -19,7 +19,6 @@ import io.fabric8.kubernetes.api.model.ListOptions; import io.fabric8.kubernetes.client.Watcher; import io.fabric8.kubernetes.client.WatcherException; -import io.fabric8.kubernetes.client.dsl.base.BaseOperation; import io.fabric8.kubernetes.client.http.WebSocket; import io.fabric8.kubernetes.client.utils.Utils; import org.junit.jupiter.api.DisplayName; diff --git a/kubernetes-client/src/test/java/io/fabric8/kubernetes/client/dsl/base/BaseOperationTest.java b/kubernetes-client/src/test/java/io/fabric8/kubernetes/client/dsl/internal/BaseOperationTest.java similarity index 98% rename from kubernetes-client/src/test/java/io/fabric8/kubernetes/client/dsl/base/BaseOperationTest.java rename to kubernetes-client/src/test/java/io/fabric8/kubernetes/client/dsl/internal/BaseOperationTest.java index 8af105f05dd..1127f9f35ac 100644 --- a/kubernetes-client/src/test/java/io/fabric8/kubernetes/client/dsl/base/BaseOperationTest.java +++ b/kubernetes-client/src/test/java/io/fabric8/kubernetes/client/dsl/internal/BaseOperationTest.java @@ -13,7 +13,7 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -package io.fabric8.kubernetes.client.dsl.base; +package io.fabric8.kubernetes.client.dsl.internal; import io.fabric8.kubernetes.api.model.DeletionPropagation; import io.fabric8.kubernetes.api.model.ListOptionsBuilder; @@ -26,6 +26,8 @@ import io.fabric8.kubernetes.client.MockHttpClientUtils; import io.fabric8.kubernetes.client.dsl.EditReplacePatchDeletable; import io.fabric8.kubernetes.client.dsl.Resource; +import io.fabric8.kubernetes.client.dsl.internal.BaseOperation; +import io.fabric8.kubernetes.client.dsl.internal.OperationContext; import io.fabric8.kubernetes.client.dsl.internal.PodOperationContext; import io.fabric8.kubernetes.client.dsl.internal.core.v1.PodOperationsImpl; import io.fabric8.kubernetes.client.http.HttpClient; diff --git a/kubernetes-client/src/test/java/io/fabric8/kubernetes/client/dsl/base/BaseOperationWatchTest.java b/kubernetes-client/src/test/java/io/fabric8/kubernetes/client/dsl/internal/BaseOperationWatchTest.java similarity index 95% rename from kubernetes-client/src/test/java/io/fabric8/kubernetes/client/dsl/base/BaseOperationWatchTest.java rename to kubernetes-client/src/test/java/io/fabric8/kubernetes/client/dsl/internal/BaseOperationWatchTest.java index 0ae45acbd27..11c25d82ab5 100644 --- a/kubernetes-client/src/test/java/io/fabric8/kubernetes/client/dsl/base/BaseOperationWatchTest.java +++ b/kubernetes-client/src/test/java/io/fabric8/kubernetes/client/dsl/internal/BaseOperationWatchTest.java @@ -13,7 +13,7 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -package io.fabric8.kubernetes.client.dsl.base; +package io.fabric8.kubernetes.client.dsl.internal; import io.fabric8.kubernetes.api.model.Pod; import io.fabric8.kubernetes.api.model.PodList; @@ -22,6 +22,8 @@ import io.fabric8.kubernetes.client.Watch; import io.fabric8.kubernetes.client.Watcher; import io.fabric8.kubernetes.client.dsl.PodResource; +import io.fabric8.kubernetes.client.dsl.internal.BaseOperation; +import io.fabric8.kubernetes.client.dsl.internal.OperationContext; import io.fabric8.kubernetes.client.dsl.internal.WatchConnectionManager; import io.fabric8.kubernetes.client.dsl.internal.WatchHTTPManager; import org.junit.jupiter.api.BeforeEach; diff --git a/kubernetes-client/src/test/java/io/fabric8/kubernetes/client/dsl/base/OperationContextTest.java b/kubernetes-client/src/test/java/io/fabric8/kubernetes/client/dsl/internal/OperationContextTest.java similarity index 97% rename from kubernetes-client/src/test/java/io/fabric8/kubernetes/client/dsl/base/OperationContextTest.java rename to kubernetes-client/src/test/java/io/fabric8/kubernetes/client/dsl/internal/OperationContextTest.java index 758e574dfb1..04484fe2b76 100644 --- a/kubernetes-client/src/test/java/io/fabric8/kubernetes/client/dsl/base/OperationContextTest.java +++ b/kubernetes-client/src/test/java/io/fabric8/kubernetes/client/dsl/internal/OperationContextTest.java @@ -13,12 +13,13 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -package io.fabric8.kubernetes.client.dsl.base; +package io.fabric8.kubernetes.client.dsl.internal; import io.fabric8.kubernetes.api.model.DeletionPropagation; import io.fabric8.kubernetes.api.model.batch.v1.Job; import io.fabric8.kubernetes.api.model.batch.v1.JobBuilder; import io.fabric8.kubernetes.client.Config; +import io.fabric8.kubernetes.client.dsl.internal.OperationContext; import io.fabric8.kubernetes.client.http.HttpClient; import org.junit.jupiter.api.BeforeEach; import org.junit.jupiter.api.Test; diff --git a/kubernetes-client/src/test/java/io/fabric8/kubernetes/client/dsl/internal/ResourceOperationsImplTest.java b/kubernetes-client/src/test/java/io/fabric8/kubernetes/client/dsl/internal/ResourceOperationsImplTest.java index fa5fea65656..e2a9ad27743 100644 --- a/kubernetes-client/src/test/java/io/fabric8/kubernetes/client/dsl/internal/ResourceOperationsImplTest.java +++ b/kubernetes-client/src/test/java/io/fabric8/kubernetes/client/dsl/internal/ResourceOperationsImplTest.java @@ -33,7 +33,6 @@ import io.fabric8.kubernetes.client.dsl.MixedOperation; import io.fabric8.kubernetes.client.dsl.Resource; import io.fabric8.kubernetes.client.dsl.base.CustomResourceDefinitionContext; -import io.fabric8.kubernetes.client.dsl.base.OperationContext; import io.fabric8.kubernetes.client.dsl.base.ResourceDefinitionContext; import io.fabric8.kubernetes.internal.KubernetesDeserializer; import io.fabric8.kubernetes.model.annotation.Group; diff --git a/kubernetes-client/src/test/java/io/fabric8/kubernetes/client/dsl/internal/core/v1/PodOperationsImpl_CVE2021_20218_Test.java b/kubernetes-client/src/test/java/io/fabric8/kubernetes/client/dsl/internal/core/v1/PodOperationsImpl_CVE2021_20218_Test.java index f6ce62d61fc..78887ecad42 100644 --- a/kubernetes-client/src/test/java/io/fabric8/kubernetes/client/dsl/internal/core/v1/PodOperationsImpl_CVE2021_20218_Test.java +++ b/kubernetes-client/src/test/java/io/fabric8/kubernetes/client/dsl/internal/core/v1/PodOperationsImpl_CVE2021_20218_Test.java @@ -16,7 +16,7 @@ package io.fabric8.kubernetes.client.dsl.internal.core.v1; import io.fabric8.kubernetes.client.KubernetesClientException; -import io.fabric8.kubernetes.client.dsl.base.OperationContext; +import io.fabric8.kubernetes.client.dsl.internal.OperationContext; import io.fabric8.kubernetes.client.dsl.internal.PodOperationContext; import org.junit.jupiter.api.BeforeEach; import org.junit.jupiter.api.Test; diff --git a/kubernetes-client/src/test/java/io/fabric8/kubernetes/client/dsl/internal/uploadable/PodUploadTest.java b/kubernetes-client/src/test/java/io/fabric8/kubernetes/client/dsl/internal/uploadable/PodUploadTest.java index 7d2e1d47f15..283d8d7ff43 100644 --- a/kubernetes-client/src/test/java/io/fabric8/kubernetes/client/dsl/internal/uploadable/PodUploadTest.java +++ b/kubernetes-client/src/test/java/io/fabric8/kubernetes/client/dsl/internal/uploadable/PodUploadTest.java @@ -27,9 +27,8 @@ import java.util.Arrays; import java.util.concurrent.CompletableFuture; import java.util.concurrent.TimeUnit; -import java.util.function.ObjIntConsumer; -import io.fabric8.kubernetes.client.dsl.base.OperationSupport; +import io.fabric8.kubernetes.client.dsl.internal.OperationSupport; import io.fabric8.kubernetes.client.dsl.internal.PodOperationContext; import io.fabric8.kubernetes.client.http.HttpClient; import io.fabric8.kubernetes.client.http.WebSocket; diff --git a/kubernetes-client/src/test/java/io/fabric8/kubernetes/client/informers/SharedInformerFactoryTest.java b/kubernetes-client/src/test/java/io/fabric8/kubernetes/client/informers/SharedInformerFactoryTest.java index 77835bfadea..78672ac1a53 100644 --- a/kubernetes-client/src/test/java/io/fabric8/kubernetes/client/informers/SharedInformerFactoryTest.java +++ b/kubernetes-client/src/test/java/io/fabric8/kubernetes/client/informers/SharedInformerFactoryTest.java @@ -23,6 +23,7 @@ import io.fabric8.kubernetes.client.CustomResource; import io.fabric8.kubernetes.client.DefaultKubernetesClient; import io.fabric8.kubernetes.client.dsl.base.CustomResourceDefinitionContext; +import io.fabric8.kubernetes.client.informers.impl.SharedInformerFactoryImpl; import io.fabric8.kubernetes.model.annotation.Group; import io.fabric8.kubernetes.model.annotation.Kind; import io.fabric8.kubernetes.model.annotation.Plural; diff --git a/kubernetes-client/src/test/java/io/fabric8/kubernetes/client/informers/cache/CacheTest.java b/kubernetes-client/src/test/java/io/fabric8/kubernetes/client/informers/impl/cache/CacheTest.java similarity index 97% rename from kubernetes-client/src/test/java/io/fabric8/kubernetes/client/informers/cache/CacheTest.java rename to kubernetes-client/src/test/java/io/fabric8/kubernetes/client/informers/impl/cache/CacheTest.java index b5314af151a..6c7dbb7ad07 100644 --- a/kubernetes-client/src/test/java/io/fabric8/kubernetes/client/informers/cache/CacheTest.java +++ b/kubernetes-client/src/test/java/io/fabric8/kubernetes/client/informers/impl/cache/CacheTest.java @@ -13,10 +13,11 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -package io.fabric8.kubernetes.client.informers.cache; +package io.fabric8.kubernetes.client.informers.impl.cache; import io.fabric8.kubernetes.api.model.Pod; import io.fabric8.kubernetes.api.model.PodBuilder; +import io.fabric8.kubernetes.client.informers.cache.Cache; import org.junit.jupiter.api.Test; import java.util.Arrays; @@ -27,7 +28,6 @@ import java.util.function.Function; import static org.junit.jupiter.api.Assertions.assertEquals; -import static org.junit.jupiter.api.Assertions.assertNull; class CacheTest { private static CacheImpl cache = new CacheImpl("mock", CacheTest::mockIndexFunction, CacheTest::mockKeyFunction); diff --git a/kubernetes-client/src/test/java/io/fabric8/kubernetes/client/informers/cache/ListerTest.java b/kubernetes-client/src/test/java/io/fabric8/kubernetes/client/informers/impl/cache/ListerTest.java similarity index 94% rename from kubernetes-client/src/test/java/io/fabric8/kubernetes/client/informers/cache/ListerTest.java rename to kubernetes-client/src/test/java/io/fabric8/kubernetes/client/informers/impl/cache/ListerTest.java index f5c3aacb313..bd8f6945178 100644 --- a/kubernetes-client/src/test/java/io/fabric8/kubernetes/client/informers/cache/ListerTest.java +++ b/kubernetes-client/src/test/java/io/fabric8/kubernetes/client/informers/impl/cache/ListerTest.java @@ -13,10 +13,11 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -package io.fabric8.kubernetes.client.informers.cache; +package io.fabric8.kubernetes.client.informers.impl.cache; import io.fabric8.kubernetes.api.model.Pod; import io.fabric8.kubernetes.api.model.PodBuilder; +import io.fabric8.kubernetes.client.informers.cache.Lister; import org.junit.jupiter.api.Test; import java.util.Arrays; diff --git a/kubernetes-client/src/test/java/io/fabric8/kubernetes/client/informers/cache/ProcessorListenerTest.java b/kubernetes-client/src/test/java/io/fabric8/kubernetes/client/informers/impl/cache/ProcessorListenerTest.java similarity index 97% rename from kubernetes-client/src/test/java/io/fabric8/kubernetes/client/informers/cache/ProcessorListenerTest.java rename to kubernetes-client/src/test/java/io/fabric8/kubernetes/client/informers/impl/cache/ProcessorListenerTest.java index aec5bbd7392..135706f9dbf 100644 --- a/kubernetes-client/src/test/java/io/fabric8/kubernetes/client/informers/cache/ProcessorListenerTest.java +++ b/kubernetes-client/src/test/java/io/fabric8/kubernetes/client/informers/impl/cache/ProcessorListenerTest.java @@ -13,7 +13,7 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -package io.fabric8.kubernetes.client.informers.cache; +package io.fabric8.kubernetes.client.informers.impl.cache; import io.fabric8.kubernetes.api.model.Pod; import io.fabric8.kubernetes.api.model.PodBuilder; diff --git a/kubernetes-client/src/test/java/io/fabric8/kubernetes/client/informers/cache/ProcessorStoreTest.java b/kubernetes-client/src/test/java/io/fabric8/kubernetes/client/informers/impl/cache/ProcessorStoreTest.java similarity index 91% rename from kubernetes-client/src/test/java/io/fabric8/kubernetes/client/informers/cache/ProcessorStoreTest.java rename to kubernetes-client/src/test/java/io/fabric8/kubernetes/client/informers/impl/cache/ProcessorStoreTest.java index 7fa6886f8c2..3efce0ce746 100644 --- a/kubernetes-client/src/test/java/io/fabric8/kubernetes/client/informers/cache/ProcessorStoreTest.java +++ b/kubernetes-client/src/test/java/io/fabric8/kubernetes/client/informers/impl/cache/ProcessorStoreTest.java @@ -13,14 +13,14 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -package io.fabric8.kubernetes.client.informers.cache; +package io.fabric8.kubernetes.client.informers.impl.cache; import io.fabric8.kubernetes.api.model.Pod; import io.fabric8.kubernetes.api.model.PodBuilder; -import io.fabric8.kubernetes.client.informers.cache.ProcessorListener.AddNotification; -import io.fabric8.kubernetes.client.informers.cache.ProcessorListener.DeleteNotification; -import io.fabric8.kubernetes.client.informers.cache.ProcessorListener.Notification; -import io.fabric8.kubernetes.client.informers.cache.ProcessorListener.UpdateNotification; +import io.fabric8.kubernetes.client.informers.impl.cache.ProcessorListener.AddNotification; +import io.fabric8.kubernetes.client.informers.impl.cache.ProcessorListener.DeleteNotification; +import io.fabric8.kubernetes.client.informers.impl.cache.ProcessorListener.Notification; +import io.fabric8.kubernetes.client.informers.impl.cache.ProcessorListener.UpdateNotification; import org.junit.jupiter.api.Test; import org.mockito.ArgumentCaptor; import org.mockito.Mockito; diff --git a/kubernetes-client/src/test/java/io/fabric8/kubernetes/client/informers/cache/ReflectorTest.java b/kubernetes-client/src/test/java/io/fabric8/kubernetes/client/informers/impl/cache/ReflectorTest.java similarity index 98% rename from kubernetes-client/src/test/java/io/fabric8/kubernetes/client/informers/cache/ReflectorTest.java rename to kubernetes-client/src/test/java/io/fabric8/kubernetes/client/informers/impl/cache/ReflectorTest.java index 8dfbc21d77c..fcf07d21cfb 100644 --- a/kubernetes-client/src/test/java/io/fabric8/kubernetes/client/informers/cache/ReflectorTest.java +++ b/kubernetes-client/src/test/java/io/fabric8/kubernetes/client/informers/impl/cache/ReflectorTest.java @@ -14,7 +14,7 @@ * limitations under the License. */ -package io.fabric8.kubernetes.client.informers.cache; +package io.fabric8.kubernetes.client.informers.impl.cache; import io.fabric8.kubernetes.api.model.Pod; import io.fabric8.kubernetes.api.model.PodList; diff --git a/kubernetes-client/src/test/java/io/fabric8/kubernetes/client/informers/cache/SharedProcessorTest.java b/kubernetes-client/src/test/java/io/fabric8/kubernetes/client/informers/impl/cache/SharedProcessorTest.java similarity index 98% rename from kubernetes-client/src/test/java/io/fabric8/kubernetes/client/informers/cache/SharedProcessorTest.java rename to kubernetes-client/src/test/java/io/fabric8/kubernetes/client/informers/impl/cache/SharedProcessorTest.java index 8a86755c9c5..e95793057c9 100644 --- a/kubernetes-client/src/test/java/io/fabric8/kubernetes/client/informers/cache/SharedProcessorTest.java +++ b/kubernetes-client/src/test/java/io/fabric8/kubernetes/client/informers/impl/cache/SharedProcessorTest.java @@ -13,7 +13,7 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -package io.fabric8.kubernetes.client.informers.cache; +package io.fabric8.kubernetes.client.informers.impl.cache; import io.fabric8.kubernetes.api.model.Pod; import io.fabric8.kubernetes.api.model.PodBuilder; diff --git a/kubernetes-client/src/test/java/io/fabric8/kubernetes/client/utils/CreateOrReplaceHelperTest.java b/kubernetes-client/src/test/java/io/fabric8/kubernetes/client/utils/CreateOrReplaceHelperTest.java index 75e46963cfc..692892754b5 100644 --- a/kubernetes-client/src/test/java/io/fabric8/kubernetes/client/utils/CreateOrReplaceHelperTest.java +++ b/kubernetes-client/src/test/java/io/fabric8/kubernetes/client/utils/CreateOrReplaceHelperTest.java @@ -19,6 +19,7 @@ import io.fabric8.kubernetes.api.model.PodBuilder; import io.fabric8.kubernetes.api.model.StatusBuilder; import io.fabric8.kubernetes.client.KubernetesClientException; +import io.fabric8.kubernetes.client.utils.internal.CreateOrReplaceHelper; import org.junit.jupiter.api.Test; import org.mockito.Mockito; diff --git a/kubernetes-client/src/test/java/io/fabric8/kubernetes/client/utils/DeleteAndCreateHelperTest.java b/kubernetes-client/src/test/java/io/fabric8/kubernetes/client/utils/DeleteAndCreateHelperTest.java index 9a2c8cf9b0d..35902d110dd 100644 --- a/kubernetes-client/src/test/java/io/fabric8/kubernetes/client/utils/DeleteAndCreateHelperTest.java +++ b/kubernetes-client/src/test/java/io/fabric8/kubernetes/client/utils/DeleteAndCreateHelperTest.java @@ -19,6 +19,7 @@ import io.fabric8.kubernetes.api.model.PodBuilder; import io.fabric8.kubernetes.api.model.StatusBuilder; import io.fabric8.kubernetes.client.KubernetesClientException; +import io.fabric8.kubernetes.client.utils.internal.DeleteAndCreateHelper; import org.junit.jupiter.api.Test; import org.mockito.Mockito; diff --git a/kubernetes-client/src/test/java/io/fabric8/kubernetes/client/utils/OptionalDependencyWrapperTest.java b/kubernetes-client/src/test/java/io/fabric8/kubernetes/client/utils/OptionalDependencyWrapperTest.java index 6ec84488eae..b0fef28879b 100644 --- a/kubernetes-client/src/test/java/io/fabric8/kubernetes/client/utils/OptionalDependencyWrapperTest.java +++ b/kubernetes-client/src/test/java/io/fabric8/kubernetes/client/utils/OptionalDependencyWrapperTest.java @@ -18,7 +18,7 @@ import io.fabric8.kubernetes.client.KubernetesClientException; import org.junit.jupiter.api.Test; -import static io.fabric8.kubernetes.client.utils.OptionalDependencyWrapper.wrapRunWithOptionalDependency; +import static io.fabric8.kubernetes.client.utils.internal.OptionalDependencyWrapper.wrapRunWithOptionalDependency; import static org.hamcrest.core.IsEqual.equalTo; import static org.junit.Assert.assertThat; import static org.junit.jupiter.api.Assertions.assertThrows; diff --git a/kubernetes-client/src/test/java/io/fabric8/kubernetes/client/utils/PodOperationUtilTest.java b/kubernetes-client/src/test/java/io/fabric8/kubernetes/client/utils/PodOperationUtilTest.java index 861651edf4e..330a94842e2 100644 --- a/kubernetes-client/src/test/java/io/fabric8/kubernetes/client/utils/PodOperationUtilTest.java +++ b/kubernetes-client/src/test/java/io/fabric8/kubernetes/client/utils/PodOperationUtilTest.java @@ -23,8 +23,9 @@ import io.fabric8.kubernetes.client.dsl.Gettable; import io.fabric8.kubernetes.client.dsl.LogWatch; import io.fabric8.kubernetes.client.dsl.PodResource; -import io.fabric8.kubernetes.client.dsl.base.OperationContext; +import io.fabric8.kubernetes.client.dsl.internal.OperationContext; import io.fabric8.kubernetes.client.dsl.internal.core.v1.PodOperationsImpl; +import io.fabric8.kubernetes.client.utils.internal.PodOperationUtil; import org.junit.jupiter.api.BeforeEach; import org.junit.jupiter.api.Test; import org.mockito.Mockito; diff --git a/kubernetes-itests/src/test/java/io/fabric8/kubernetes/PluralizeIT.java b/kubernetes-itests/src/test/java/io/fabric8/kubernetes/PluralizeIT.java index 992867ee87d..f9e094a796b 100644 --- a/kubernetes-itests/src/test/java/io/fabric8/kubernetes/PluralizeIT.java +++ b/kubernetes-itests/src/test/java/io/fabric8/kubernetes/PluralizeIT.java @@ -24,7 +24,7 @@ import io.fabric8.kubernetes.api.model.NamespaceBuilder; import io.fabric8.kubernetes.client.DefaultKubernetesClient; import io.fabric8.kubernetes.client.KubernetesClient; -import io.fabric8.kubernetes.client.dsl.base.OperationSupport; +import io.fabric8.kubernetes.client.dsl.internal.OperationSupport; import io.fabric8.kubernetes.client.utils.Utils; import org.junit.Test; import org.junit.runner.RunWith; diff --git a/openshift-client/src/main/java/io/fabric8/openshift/client/DefaultOpenShiftClient.java b/openshift-client/src/main/java/io/fabric8/openshift/client/DefaultOpenShiftClient.java index 1458cf47380..b59a1db5289 100644 --- a/openshift-client/src/main/java/io/fabric8/openshift/client/DefaultOpenShiftClient.java +++ b/openshift-client/src/main/java/io/fabric8/openshift/client/DefaultOpenShiftClient.java @@ -45,7 +45,7 @@ import io.fabric8.kubernetes.client.dsl.ParameterMixedOperation; import io.fabric8.kubernetes.client.dsl.ParameterNamespaceListVisitFromServerGetDeleteRecreateWaitApplicable; import io.fabric8.kubernetes.client.dsl.Resource; -import io.fabric8.kubernetes.client.dsl.base.HasMetadataOperation; +import io.fabric8.kubernetes.client.dsl.internal.HasMetadataOperation; import io.fabric8.kubernetes.client.dsl.internal.core.v1.ComponentStatusOperationsImpl; import io.fabric8.kubernetes.client.extended.leaderelection.LeaderElectorBuilder; import io.fabric8.kubernetes.client.http.HttpClient; diff --git a/openshift-client/src/main/java/io/fabric8/openshift/client/OpenShiftHandlers.java b/openshift-client/src/main/java/io/fabric8/openshift/client/OpenShiftHandlers.java index 2702b7bb94a..1fc54a9ee7c 100644 --- a/openshift-client/src/main/java/io/fabric8/openshift/client/OpenShiftHandlers.java +++ b/openshift-client/src/main/java/io/fabric8/openshift/client/OpenShiftHandlers.java @@ -21,9 +21,9 @@ import io.fabric8.kubernetes.api.model.KubernetesResourceList; import io.fabric8.kubernetes.client.Handlers; import io.fabric8.kubernetes.client.dsl.Resource; -import io.fabric8.kubernetes.client.dsl.base.HasMetadataOperation; import io.fabric8.kubernetes.client.dsl.base.ResourceDefinitionContext; import io.fabric8.kubernetes.client.dsl.internal.CreateOnlyResourceOperationsImpl; +import io.fabric8.kubernetes.client.dsl.internal.HasMetadataOperation; import io.fabric8.kubernetes.client.http.HttpClient; import java.util.function.Function; diff --git a/openshift-client/src/main/java/io/fabric8/openshift/client/URLFromOpenshiftRouteImpl.java b/openshift-client/src/main/java/io/fabric8/openshift/client/URLFromOpenshiftRouteImpl.java index 32dc64681ab..72a8b1ede8e 100644 --- a/openshift-client/src/main/java/io/fabric8/openshift/client/URLFromOpenshiftRouteImpl.java +++ b/openshift-client/src/main/java/io/fabric8/openshift/client/URLFromOpenshiftRouteImpl.java @@ -21,7 +21,7 @@ import io.fabric8.kubernetes.client.KubernetesClient; import io.fabric8.kubernetes.client.KubernetesClientException; import io.fabric8.kubernetes.client.ServiceToURLProvider; -import io.fabric8.kubernetes.client.utils.URLFromServiceUtil; +import io.fabric8.kubernetes.client.utils.internal.URLFromServiceUtil; import io.fabric8.openshift.api.model.Route; import org.slf4j.Logger; import org.slf4j.LoggerFactory; diff --git a/openshift-client/src/main/java/io/fabric8/openshift/client/dsl/internal/OpenShiftOperation.java b/openshift-client/src/main/java/io/fabric8/openshift/client/dsl/internal/OpenShiftOperation.java index a679dfe8744..a2ee82327e2 100644 --- a/openshift-client/src/main/java/io/fabric8/openshift/client/dsl/internal/OpenShiftOperation.java +++ b/openshift-client/src/main/java/io/fabric8/openshift/client/dsl/internal/OpenShiftOperation.java @@ -20,8 +20,8 @@ import io.fabric8.kubernetes.client.Config; import io.fabric8.kubernetes.client.KubernetesClientException; import io.fabric8.kubernetes.client.dsl.Resource; -import io.fabric8.kubernetes.client.dsl.base.HasMetadataOperation; -import io.fabric8.kubernetes.client.dsl.base.OperationContext; +import io.fabric8.kubernetes.client.dsl.internal.HasMetadataOperation; +import io.fabric8.kubernetes.client.dsl.internal.OperationContext; import io.fabric8.kubernetes.client.utils.ApiVersionUtil; import io.fabric8.kubernetes.client.utils.URLUtils; import io.fabric8.kubernetes.client.utils.Utils; diff --git a/openshift-client/src/main/java/io/fabric8/openshift/client/dsl/internal/ProjectRequestsOperationImpl.java b/openshift-client/src/main/java/io/fabric8/openshift/client/dsl/internal/ProjectRequestsOperationImpl.java index 7ad7b072c03..80dbdbf78ec 100644 --- a/openshift-client/src/main/java/io/fabric8/openshift/client/dsl/internal/ProjectRequestsOperationImpl.java +++ b/openshift-client/src/main/java/io/fabric8/openshift/client/dsl/internal/ProjectRequestsOperationImpl.java @@ -19,9 +19,9 @@ import io.fabric8.kubernetes.api.model.ListOptionsBuilder; import io.fabric8.kubernetes.api.model.Status; import io.fabric8.kubernetes.client.KubernetesClientException; -import io.fabric8.kubernetes.client.dsl.base.OperationContext; -import io.fabric8.kubernetes.client.dsl.base.OperationSupport; import io.fabric8.kubernetes.client.dsl.internal.HasMetadataOperationsImpl; +import io.fabric8.kubernetes.client.dsl.internal.OperationContext; +import io.fabric8.kubernetes.client.dsl.internal.OperationSupport; import io.fabric8.kubernetes.client.utils.URLUtils.URLBuilder; import io.fabric8.kubernetes.client.utils.Utils; import io.fabric8.openshift.api.model.ProjectRequest; diff --git a/openshift-client/src/main/java/io/fabric8/openshift/client/dsl/internal/apps/DeploymentConfigOperationsImpl.java b/openshift-client/src/main/java/io/fabric8/openshift/client/dsl/internal/apps/DeploymentConfigOperationsImpl.java index 0d5cdbc397f..ebed65146a7 100644 --- a/openshift-client/src/main/java/io/fabric8/openshift/client/dsl/internal/apps/DeploymentConfigOperationsImpl.java +++ b/openshift-client/src/main/java/io/fabric8/openshift/client/dsl/internal/apps/DeploymentConfigOperationsImpl.java @@ -22,14 +22,14 @@ import io.fabric8.kubernetes.client.dsl.LogWatch; import io.fabric8.kubernetes.client.dsl.Loggable; import io.fabric8.kubernetes.client.dsl.PodResource; -import io.fabric8.kubernetes.client.dsl.base.OperationContext; import io.fabric8.kubernetes.client.dsl.base.PatchContext; import io.fabric8.kubernetes.client.dsl.internal.HasMetadataOperationsImpl; import io.fabric8.kubernetes.client.dsl.internal.LogWatchCallback; +import io.fabric8.kubernetes.client.dsl.internal.OperationContext; import io.fabric8.kubernetes.client.dsl.internal.RollingOperationContext; -import io.fabric8.kubernetes.client.utils.PodOperationUtil; import io.fabric8.kubernetes.client.utils.URLUtils; import io.fabric8.kubernetes.client.utils.URLUtils.URLBuilder; +import io.fabric8.kubernetes.client.utils.internal.PodOperationUtil; import io.fabric8.openshift.api.model.DeploymentConfig; import io.fabric8.openshift.api.model.DeploymentConfigList; import io.fabric8.openshift.client.OpenshiftClientContext; diff --git a/openshift-client/src/main/java/io/fabric8/openshift/client/dsl/internal/authorization/ClusterRoleBindingOperationsImpl.java b/openshift-client/src/main/java/io/fabric8/openshift/client/dsl/internal/authorization/ClusterRoleBindingOperationsImpl.java index dca6b7aa447..03dcddc7606 100644 --- a/openshift-client/src/main/java/io/fabric8/openshift/client/dsl/internal/authorization/ClusterRoleBindingOperationsImpl.java +++ b/openshift-client/src/main/java/io/fabric8/openshift/client/dsl/internal/authorization/ClusterRoleBindingOperationsImpl.java @@ -17,8 +17,8 @@ import io.fabric8.kubernetes.api.builder.VisitableBuilder; import io.fabric8.kubernetes.client.dsl.Resource; -import io.fabric8.kubernetes.client.dsl.base.OperationContext; import io.fabric8.kubernetes.client.dsl.internal.HasMetadataOperationsImpl; +import io.fabric8.kubernetes.client.dsl.internal.OperationContext; import io.fabric8.openshift.api.model.ClusterRoleBinding; import io.fabric8.openshift.api.model.ClusterRoleBindingBuilder; import io.fabric8.openshift.api.model.ClusterRoleBindingList; diff --git a/openshift-client/src/main/java/io/fabric8/openshift/client/dsl/internal/authorization/RoleBindingOperationsImpl.java b/openshift-client/src/main/java/io/fabric8/openshift/client/dsl/internal/authorization/RoleBindingOperationsImpl.java index 61065acf8f9..a55aee82e5a 100644 --- a/openshift-client/src/main/java/io/fabric8/openshift/client/dsl/internal/authorization/RoleBindingOperationsImpl.java +++ b/openshift-client/src/main/java/io/fabric8/openshift/client/dsl/internal/authorization/RoleBindingOperationsImpl.java @@ -20,8 +20,8 @@ import io.fabric8.kubernetes.api.model.ObjectReference; import io.fabric8.kubernetes.api.model.ObjectReferenceBuilder; import io.fabric8.kubernetes.client.dsl.Resource; -import io.fabric8.kubernetes.client.dsl.base.OperationContext; import io.fabric8.kubernetes.client.dsl.internal.HasMetadataOperationsImpl; +import io.fabric8.kubernetes.client.dsl.internal.OperationContext; import io.fabric8.openshift.api.model.RoleBinding; import io.fabric8.openshift.api.model.RoleBindingBuilder; import io.fabric8.openshift.api.model.RoleBindingList; diff --git a/openshift-client/src/main/java/io/fabric8/openshift/client/dsl/internal/authorization/RoleOperationsImpl.java b/openshift-client/src/main/java/io/fabric8/openshift/client/dsl/internal/authorization/RoleOperationsImpl.java index 4a9987f1eac..e478212d195 100644 --- a/openshift-client/src/main/java/io/fabric8/openshift/client/dsl/internal/authorization/RoleOperationsImpl.java +++ b/openshift-client/src/main/java/io/fabric8/openshift/client/dsl/internal/authorization/RoleOperationsImpl.java @@ -17,8 +17,8 @@ import io.fabric8.kubernetes.api.builder.VisitableBuilder; import io.fabric8.kubernetes.client.dsl.Resource; -import io.fabric8.kubernetes.client.dsl.base.OperationContext; import io.fabric8.kubernetes.client.dsl.internal.HasMetadataOperationsImpl; +import io.fabric8.kubernetes.client.dsl.internal.OperationContext; import io.fabric8.openshift.api.model.Role; import io.fabric8.openshift.api.model.RoleBuilder; import io.fabric8.openshift.api.model.RoleList; diff --git a/openshift-client/src/main/java/io/fabric8/openshift/client/dsl/internal/build/BuildConfigOperationsImpl.java b/openshift-client/src/main/java/io/fabric8/openshift/client/dsl/internal/build/BuildConfigOperationsImpl.java index 73231c3c880..dde32e3f414 100644 --- a/openshift-client/src/main/java/io/fabric8/openshift/client/dsl/internal/build/BuildConfigOperationsImpl.java +++ b/openshift-client/src/main/java/io/fabric8/openshift/client/dsl/internal/build/BuildConfigOperationsImpl.java @@ -22,9 +22,9 @@ import io.fabric8.kubernetes.client.KubernetesClientException; import io.fabric8.kubernetes.client.dsl.Triggerable; import io.fabric8.kubernetes.client.dsl.Typeable; -import io.fabric8.kubernetes.client.dsl.base.OperationContext; -import io.fabric8.kubernetes.client.dsl.base.OperationSupport; import io.fabric8.kubernetes.client.dsl.internal.HasMetadataOperationsImpl; +import io.fabric8.kubernetes.client.dsl.internal.OperationContext; +import io.fabric8.kubernetes.client.dsl.internal.OperationSupport; import io.fabric8.kubernetes.client.http.HttpClient; import io.fabric8.kubernetes.client.http.HttpRequest; import io.fabric8.kubernetes.client.utils.KubernetesResourceUtil; diff --git a/openshift-client/src/main/java/io/fabric8/openshift/client/dsl/internal/build/BuildOperationsImpl.java b/openshift-client/src/main/java/io/fabric8/openshift/client/dsl/internal/build/BuildOperationsImpl.java index 9c1473f2775..b5f1fb079b7 100644 --- a/openshift-client/src/main/java/io/fabric8/openshift/client/dsl/internal/build/BuildOperationsImpl.java +++ b/openshift-client/src/main/java/io/fabric8/openshift/client/dsl/internal/build/BuildOperationsImpl.java @@ -25,12 +25,12 @@ import io.fabric8.kubernetes.client.dsl.PrettyLoggable; import io.fabric8.kubernetes.client.dsl.TailPrettyLoggable; import io.fabric8.kubernetes.client.dsl.TimeTailPrettyLoggable; -import io.fabric8.kubernetes.client.dsl.base.OperationContext; import io.fabric8.kubernetes.client.dsl.internal.HasMetadataOperationsImpl; import io.fabric8.kubernetes.client.dsl.internal.LogWatchCallback; +import io.fabric8.kubernetes.client.dsl.internal.OperationContext; import io.fabric8.kubernetes.client.internal.PatchUtils; -import io.fabric8.kubernetes.client.utils.PodOperationUtil; import io.fabric8.kubernetes.client.utils.URLUtils; +import io.fabric8.kubernetes.client.utils.internal.PodOperationUtil; import io.fabric8.openshift.api.model.Build; import io.fabric8.openshift.api.model.BuildBuilder; import io.fabric8.openshift.api.model.BuildList; diff --git a/openshift-client/src/main/java/io/fabric8/openshift/client/dsl/internal/config/DNSOperationsImpl.java b/openshift-client/src/main/java/io/fabric8/openshift/client/dsl/internal/config/DNSOperationsImpl.java index 06f28736019..367210c2c31 100644 --- a/openshift-client/src/main/java/io/fabric8/openshift/client/dsl/internal/config/DNSOperationsImpl.java +++ b/openshift-client/src/main/java/io/fabric8/openshift/client/dsl/internal/config/DNSOperationsImpl.java @@ -17,8 +17,8 @@ import io.fabric8.kubernetes.api.builder.VisitableBuilder; import io.fabric8.kubernetes.client.dsl.Resource; -import io.fabric8.kubernetes.client.dsl.base.OperationContext; import io.fabric8.kubernetes.client.dsl.internal.HasMetadataOperationsImpl; +import io.fabric8.kubernetes.client.dsl.internal.OperationContext; import io.fabric8.openshift.api.model.DNS; import io.fabric8.openshift.api.model.DNSBuilder; import io.fabric8.openshift.api.model.DNSList; diff --git a/openshift-client/src/main/java/io/fabric8/openshift/client/dsl/internal/core/NetworkAttachmentDefinitionOperationsImpl.java b/openshift-client/src/main/java/io/fabric8/openshift/client/dsl/internal/core/NetworkAttachmentDefinitionOperationsImpl.java index 891defb7e7e..91456ccb8bd 100644 --- a/openshift-client/src/main/java/io/fabric8/openshift/client/dsl/internal/core/NetworkAttachmentDefinitionOperationsImpl.java +++ b/openshift-client/src/main/java/io/fabric8/openshift/client/dsl/internal/core/NetworkAttachmentDefinitionOperationsImpl.java @@ -16,8 +16,8 @@ package io.fabric8.openshift.client.dsl.internal.core; import io.fabric8.kubernetes.client.dsl.Resource; -import io.fabric8.kubernetes.client.dsl.base.OperationContext; import io.fabric8.kubernetes.client.dsl.internal.HasMetadataOperationsImpl; +import io.fabric8.kubernetes.client.dsl.internal.OperationContext; import io.fabric8.openshift.api.model.miscellaneous.cncf.cni.v1.NetworkAttachmentDefinition; import io.fabric8.openshift.api.model.miscellaneous.cncf.cni.v1.NetworkAttachmentDefinitionList; import io.fabric8.openshift.client.OpenshiftClientContext; diff --git a/openshift-client/src/main/java/io/fabric8/openshift/client/dsl/internal/core/TemplateOperationsImpl.java b/openshift-client/src/main/java/io/fabric8/openshift/client/dsl/internal/core/TemplateOperationsImpl.java index 189cb7cf145..ac762594fb6 100644 --- a/openshift-client/src/main/java/io/fabric8/openshift/client/dsl/internal/core/TemplateOperationsImpl.java +++ b/openshift-client/src/main/java/io/fabric8/openshift/client/dsl/internal/core/TemplateOperationsImpl.java @@ -24,8 +24,8 @@ import io.fabric8.kubernetes.api.model.KubernetesResourceList; import io.fabric8.kubernetes.client.KubernetesClientException; import io.fabric8.kubernetes.client.dsl.MixedOperation; -import io.fabric8.kubernetes.client.dsl.base.OperationContext; import io.fabric8.kubernetes.client.dsl.internal.HasMetadataOperationsImpl; +import io.fabric8.kubernetes.client.dsl.internal.OperationContext; import io.fabric8.kubernetes.client.http.HttpRequest; import io.fabric8.kubernetes.client.http.HttpRequest.Builder; import io.fabric8.kubernetes.client.utils.Serialization; diff --git a/openshift-client/src/main/java/io/fabric8/openshift/client/dsl/internal/oauth/OAuthAccessTokenOperationsImpl.java b/openshift-client/src/main/java/io/fabric8/openshift/client/dsl/internal/oauth/OAuthAccessTokenOperationsImpl.java index 5ed5734b141..6f78501f462 100644 --- a/openshift-client/src/main/java/io/fabric8/openshift/client/dsl/internal/oauth/OAuthAccessTokenOperationsImpl.java +++ b/openshift-client/src/main/java/io/fabric8/openshift/client/dsl/internal/oauth/OAuthAccessTokenOperationsImpl.java @@ -16,8 +16,8 @@ package io.fabric8.openshift.client.dsl.internal.oauth; import io.fabric8.kubernetes.client.dsl.Resource; -import io.fabric8.kubernetes.client.dsl.base.OperationContext; import io.fabric8.kubernetes.client.dsl.internal.HasMetadataOperationsImpl; +import io.fabric8.kubernetes.client.dsl.internal.OperationContext; import io.fabric8.openshift.api.model.OAuthAccessToken; import io.fabric8.openshift.api.model.OAuthAccessTokenList; import io.fabric8.openshift.client.OpenshiftClientContext; diff --git a/openshift-client/src/main/java/io/fabric8/openshift/client/dsl/internal/oauth/OAuthAuthorizeTokenOperationsImpl.java b/openshift-client/src/main/java/io/fabric8/openshift/client/dsl/internal/oauth/OAuthAuthorizeTokenOperationsImpl.java index a45680870a2..6cf93c8b0a0 100644 --- a/openshift-client/src/main/java/io/fabric8/openshift/client/dsl/internal/oauth/OAuthAuthorizeTokenOperationsImpl.java +++ b/openshift-client/src/main/java/io/fabric8/openshift/client/dsl/internal/oauth/OAuthAuthorizeTokenOperationsImpl.java @@ -17,8 +17,8 @@ import io.fabric8.kubernetes.api.builder.VisitableBuilder; import io.fabric8.kubernetes.client.dsl.Resource; -import io.fabric8.kubernetes.client.dsl.base.OperationContext; import io.fabric8.kubernetes.client.dsl.internal.HasMetadataOperationsImpl; +import io.fabric8.kubernetes.client.dsl.internal.OperationContext; import io.fabric8.openshift.api.model.OAuthAuthorizeToken; import io.fabric8.openshift.api.model.OAuthAuthorizeTokenBuilder; import io.fabric8.openshift.api.model.OAuthAuthorizeTokenList; diff --git a/openshift-client/src/main/java/io/fabric8/openshift/client/dsl/internal/oauth/OAuthClientOperationsImpl.java b/openshift-client/src/main/java/io/fabric8/openshift/client/dsl/internal/oauth/OAuthClientOperationsImpl.java index 10ee7d8fef5..eb9a7d88426 100644 --- a/openshift-client/src/main/java/io/fabric8/openshift/client/dsl/internal/oauth/OAuthClientOperationsImpl.java +++ b/openshift-client/src/main/java/io/fabric8/openshift/client/dsl/internal/oauth/OAuthClientOperationsImpl.java @@ -17,8 +17,8 @@ import io.fabric8.kubernetes.api.builder.VisitableBuilder; import io.fabric8.kubernetes.client.dsl.Resource; -import io.fabric8.kubernetes.client.dsl.base.OperationContext; import io.fabric8.kubernetes.client.dsl.internal.HasMetadataOperationsImpl; +import io.fabric8.kubernetes.client.dsl.internal.OperationContext; import io.fabric8.openshift.api.model.OAuthClient; import io.fabric8.openshift.api.model.OAuthClientBuilder; import io.fabric8.openshift.api.model.OAuthClientList; diff --git a/openshift-client/src/main/java/io/fabric8/openshift/client/dsl/internal/project/ProjectOperationsImpl.java b/openshift-client/src/main/java/io/fabric8/openshift/client/dsl/internal/project/ProjectOperationsImpl.java index bc9a54c3661..71634ca0b73 100644 --- a/openshift-client/src/main/java/io/fabric8/openshift/client/dsl/internal/project/ProjectOperationsImpl.java +++ b/openshift-client/src/main/java/io/fabric8/openshift/client/dsl/internal/project/ProjectOperationsImpl.java @@ -20,10 +20,10 @@ import io.fabric8.kubernetes.api.model.rbac.RoleBinding; import io.fabric8.kubernetes.api.model.rbac.RoleBindingBuilder; import io.fabric8.kubernetes.client.dsl.Resource; -import io.fabric8.kubernetes.client.dsl.base.OperationContext; import io.fabric8.kubernetes.client.dsl.internal.HasMetadataOperationsImpl; import io.fabric8.kubernetes.client.dsl.internal.NamespaceVisitFromServerGetWatchDeleteRecreateWaitApplicableListImpl; import io.fabric8.kubernetes.client.dsl.internal.NamespaceVisitOperationContext; +import io.fabric8.kubernetes.client.dsl.internal.OperationContext; import io.fabric8.openshift.api.model.Project; import io.fabric8.openshift.api.model.ProjectBuilder; import io.fabric8.openshift.api.model.ProjectList; diff --git a/openshift-client/src/main/java/io/fabric8/openshift/client/dsl/internal/security/SecurityContextConstraintsOperationsImpl.java b/openshift-client/src/main/java/io/fabric8/openshift/client/dsl/internal/security/SecurityContextConstraintsOperationsImpl.java index d5647661106..8945b591125 100644 --- a/openshift-client/src/main/java/io/fabric8/openshift/client/dsl/internal/security/SecurityContextConstraintsOperationsImpl.java +++ b/openshift-client/src/main/java/io/fabric8/openshift/client/dsl/internal/security/SecurityContextConstraintsOperationsImpl.java @@ -17,8 +17,8 @@ import io.fabric8.kubernetes.api.builder.VisitableBuilder; import io.fabric8.kubernetes.client.dsl.Resource; -import io.fabric8.kubernetes.client.dsl.base.OperationContext; import io.fabric8.kubernetes.client.dsl.internal.HasMetadataOperationsImpl; +import io.fabric8.kubernetes.client.dsl.internal.OperationContext; import io.fabric8.openshift.api.model.SecurityContextConstraints; import io.fabric8.openshift.api.model.SecurityContextConstraintsBuilder; import io.fabric8.openshift.api.model.SecurityContextConstraintsList; diff --git a/openshift-client/src/main/java/io/fabric8/openshift/client/dsl/internal/user/GroupOperationsImpl.java b/openshift-client/src/main/java/io/fabric8/openshift/client/dsl/internal/user/GroupOperationsImpl.java index 930b7d354e2..e1711f83b1e 100644 --- a/openshift-client/src/main/java/io/fabric8/openshift/client/dsl/internal/user/GroupOperationsImpl.java +++ b/openshift-client/src/main/java/io/fabric8/openshift/client/dsl/internal/user/GroupOperationsImpl.java @@ -17,8 +17,8 @@ import io.fabric8.kubernetes.api.builder.VisitableBuilder; import io.fabric8.kubernetes.client.dsl.Resource; -import io.fabric8.kubernetes.client.dsl.base.OperationContext; import io.fabric8.kubernetes.client.dsl.internal.HasMetadataOperationsImpl; +import io.fabric8.kubernetes.client.dsl.internal.OperationContext; import io.fabric8.openshift.api.model.Group; import io.fabric8.openshift.api.model.GroupBuilder; import io.fabric8.openshift.api.model.GroupList; diff --git a/openshift-client/src/main/java/io/fabric8/openshift/client/dsl/internal/user/UserOperationsImpl.java b/openshift-client/src/main/java/io/fabric8/openshift/client/dsl/internal/user/UserOperationsImpl.java index 174e2f90c27..002e48d3b58 100644 --- a/openshift-client/src/main/java/io/fabric8/openshift/client/dsl/internal/user/UserOperationsImpl.java +++ b/openshift-client/src/main/java/io/fabric8/openshift/client/dsl/internal/user/UserOperationsImpl.java @@ -17,8 +17,8 @@ import io.fabric8.kubernetes.api.builder.VisitableBuilder; import io.fabric8.kubernetes.client.dsl.Resource; -import io.fabric8.kubernetes.client.dsl.base.OperationContext; import io.fabric8.kubernetes.client.dsl.internal.HasMetadataOperationsImpl; +import io.fabric8.kubernetes.client.dsl.internal.OperationContext; import io.fabric8.openshift.api.model.User; import io.fabric8.openshift.api.model.UserBuilder; import io.fabric8.openshift.api.model.UserList; diff --git a/openshift-client/src/main/java/io/fabric8/openshift/client/internal/OpenShiftNamespaceVisitFromServerGetWatchDeleteRecreateWaitApplicableListImpl.java b/openshift-client/src/main/java/io/fabric8/openshift/client/internal/OpenShiftNamespaceVisitFromServerGetWatchDeleteRecreateWaitApplicableListImpl.java index f0fdd4e1d55..fe5a9405ae5 100644 --- a/openshift-client/src/main/java/io/fabric8/openshift/client/internal/OpenShiftNamespaceVisitFromServerGetWatchDeleteRecreateWaitApplicableListImpl.java +++ b/openshift-client/src/main/java/io/fabric8/openshift/client/internal/OpenShiftNamespaceVisitFromServerGetWatchDeleteRecreateWaitApplicableListImpl.java @@ -21,9 +21,9 @@ import io.fabric8.kubernetes.api.model.KubernetesListBuilder; import io.fabric8.kubernetes.client.ClientContext; import io.fabric8.kubernetes.client.KubernetesClientException; -import io.fabric8.kubernetes.client.dsl.base.OperationContext; import io.fabric8.kubernetes.client.dsl.internal.NamespaceVisitFromServerGetWatchDeleteRecreateWaitApplicableListImpl; import io.fabric8.kubernetes.client.dsl.internal.NamespaceVisitOperationContext; +import io.fabric8.kubernetes.client.dsl.internal.OperationContext; import io.fabric8.kubernetes.client.utils.Utils; import io.fabric8.openshift.api.model.Parameter; import io.fabric8.openshift.api.model.Template; diff --git a/openshift-client/src/test/java/io/fabric8/openshift/client/dsl/internal/OpenShiftOperationTest.java b/openshift-client/src/test/java/io/fabric8/openshift/client/dsl/internal/OpenShiftOperationTest.java index a990ee30a73..fe668ee5b07 100644 --- a/openshift-client/src/test/java/io/fabric8/openshift/client/dsl/internal/OpenShiftOperationTest.java +++ b/openshift-client/src/test/java/io/fabric8/openshift/client/dsl/internal/OpenShiftOperationTest.java @@ -15,7 +15,7 @@ */ package io.fabric8.openshift.client.dsl.internal; -import io.fabric8.kubernetes.client.dsl.base.OperationContext; +import io.fabric8.kubernetes.client.dsl.internal.OperationContext; import io.fabric8.openshift.client.OpenShiftConfigBuilder; import org.junit.jupiter.api.Test;