Skip to content

Commit

Permalink
Swap back to client package
Browse files Browse the repository at this point in the history
  • Loading branch information
jimmidyson committed Jul 17, 2015
1 parent f76001a commit ae32af3
Show file tree
Hide file tree
Showing 29 changed files with 80 additions and 81 deletions.
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -100,14 +100,14 @@ Service myservice = client.services().inNamespace("default").withName("myservice
In the same spirit you can inline builders to create:

```java
Namespace myns = client.namespaces().create()
Namespace myns = client.namespaces().createNew()
.editMetadata()
.withName("myns")
.addToLabels("a", "label")
.endMetadata()
.done();

Service myservice = client.services().inNamespace("default").create()A
Service myservice = client.services().inNamespace("default").createNew()
.editMetadata()
.withName("myservice")
.addToLabels("another", "label")
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package io.fabric8.kubernetes.client.dsl;
package io.fabric8.kubernetes.client;

import io.fabric8.kubernetes.api.builder.Builder;
import io.fabric8.kubernetes.api.model.HasMetadata;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package io.fabric8.kubernetes.client.dsl;
package io.fabric8.kubernetes.client;

import com.ning.http.client.AsyncHttpClient;
import com.ning.http.client.AsyncHttpClientConfig;
Expand All @@ -7,8 +7,8 @@
import com.ning.http.client.filter.FilterException;
import com.ning.http.client.filter.RequestFilter;
import io.fabric8.kubernetes.api.model.*;
import io.fabric8.kubernetes.client.dsl.internal.KubeConfigUtils;
import io.fabric8.kubernetes.client.dsl.internal.Utils;
import io.fabric8.kubernetes.client.internal.KubeConfigUtils;
import io.fabric8.kubernetes.client.internal.Utils;
import io.fabric8.openshift.api.model.*;
import org.jboss.netty.handler.ssl.util.InsecureTrustManagerFactory;
import org.slf4j.Logger;
Expand Down Expand Up @@ -142,97 +142,97 @@ public void close() {

@Override
public NamespaceAwareResourceList<Endpoints, EndpointsList, EndpointsBuilder, DoneableEndpoints> endpoints() {
return new io.fabric8.kubernetes.client.dsl.internal.NamespaceAwareResourceList<>(httpClient, masterUrl, "endpoints", Endpoints.class, EndpointsList.class, EndpointsBuilder.class, DoneableEndpoints.class);
return new io.fabric8.kubernetes.client.internal.NamespaceAwareResourceList<>(httpClient, masterUrl, "endpoints", Endpoints.class, EndpointsList.class, EndpointsBuilder.class, DoneableEndpoints.class);
}

@Override
public NamespaceAwareResourceList<Event, EventList, EventBuilder, DoneableEvent> events() {
return new io.fabric8.kubernetes.client.dsl.internal.NamespaceAwareResourceList<>(httpClient, masterUrl, "events", Event.class, EventList.class, EventBuilder.class, DoneableEvent.class);
return new io.fabric8.kubernetes.client.internal.NamespaceAwareResourceList<>(httpClient, masterUrl, "events", Event.class, EventList.class, EventBuilder.class, DoneableEvent.class);
}

@Override
public NonNamespacedResourceList<Namespace, NamespaceList, NamespaceBuilder, DoneableNamespace> namespaces() {
return new io.fabric8.kubernetes.client.dsl.internal.NonNamespacedResourceList<>(httpClient, masterUrl, "namespaces", Namespace.class, NamespaceList.class, NamespaceBuilder.class, DoneableNamespace.class);
return new io.fabric8.kubernetes.client.internal.NonNamespacedResourceList<>(httpClient, masterUrl, "namespaces", Namespace.class, NamespaceList.class, NamespaceBuilder.class, DoneableNamespace.class);
}

@Override
public NonNamespacedResourceList<Node, NodeList, NodeBuilder, DoneableNode> nodes() {
return new io.fabric8.kubernetes.client.dsl.internal.NonNamespacedResourceList<>(httpClient, masterUrl, "nodes", Node.class, NodeList.class, NodeBuilder.class, DoneableNode.class);
return new io.fabric8.kubernetes.client.internal.NonNamespacedResourceList<>(httpClient, masterUrl, "nodes", Node.class, NodeList.class, NodeBuilder.class, DoneableNode.class);
}

@Override
public NamespaceAwareResourceList<PersistentVolume, PersistentVolumeList, PersistentVolumeBuilder, DoneablePersistentVolume> persistentVolumes() {
return new io.fabric8.kubernetes.client.dsl.internal.NamespaceAwareResourceList<>(httpClient, masterUrl, "persistentvolumes", PersistentVolume.class, PersistentVolumeList.class, PersistentVolumeBuilder.class, DoneablePersistentVolume.class);
return new io.fabric8.kubernetes.client.internal.NamespaceAwareResourceList<>(httpClient, masterUrl, "persistentvolumes", PersistentVolume.class, PersistentVolumeList.class, PersistentVolumeBuilder.class, DoneablePersistentVolume.class);
}

@Override
public NamespaceAwareResourceList<PersistentVolumeClaim, PersistentVolumeClaimList, PersistentVolumeClaimBuilder, DoneablePersistentVolumeClaim> persistentVolumeClaims() {
return new io.fabric8.kubernetes.client.dsl.internal.NamespaceAwareResourceList<>(httpClient, masterUrl, "persistentvolumeclaims", PersistentVolumeClaim.class, PersistentVolumeClaimList.class, PersistentVolumeClaimBuilder.class, DoneablePersistentVolumeClaim.class);
return new io.fabric8.kubernetes.client.internal.NamespaceAwareResourceList<>(httpClient, masterUrl, "persistentvolumeclaims", PersistentVolumeClaim.class, PersistentVolumeClaimList.class, PersistentVolumeClaimBuilder.class, DoneablePersistentVolumeClaim.class);
}

@Override
public NamespaceAwareResourceList<Pod, PodList, PodBuilder, DoneablePod> pods() {
return new io.fabric8.kubernetes.client.dsl.internal.NamespaceAwareResourceList<>(httpClient, masterUrl, "pods", Pod.class, PodList.class, PodBuilder.class, DoneablePod.class);
return new io.fabric8.kubernetes.client.internal.NamespaceAwareResourceList<>(httpClient, masterUrl, "pods", Pod.class, PodList.class, PodBuilder.class, DoneablePod.class);
}

@Override
public NamespaceAwareResourceList<ReplicationController, ReplicationControllerList, ReplicationControllerBuilder, DoneableReplicationController> replicationControllers() {
return new io.fabric8.kubernetes.client.dsl.internal.NamespaceAwareResourceList<>(httpClient, masterUrl, "replicationcontrollers", ReplicationController.class, ReplicationControllerList.class, ReplicationControllerBuilder.class, DoneableReplicationController.class);
return new io.fabric8.kubernetes.client.internal.NamespaceAwareResourceList<>(httpClient, masterUrl, "replicationcontrollers", ReplicationController.class, ReplicationControllerList.class, ReplicationControllerBuilder.class, DoneableReplicationController.class);
}

@Override
public NamespaceAwareResourceList<ResourceQuota, ResourceQuotaList, ResourceQuotaBuilder, DoneableResourceQuota> resourceQuotas() {
return new io.fabric8.kubernetes.client.dsl.internal.NamespaceAwareResourceList<>(httpClient, masterUrl, "resourcequotas", ResourceQuota.class, ResourceQuotaList.class, ResourceQuotaBuilder.class, DoneableResourceQuota.class);
return new io.fabric8.kubernetes.client.internal.NamespaceAwareResourceList<>(httpClient, masterUrl, "resourcequotas", ResourceQuota.class, ResourceQuotaList.class, ResourceQuotaBuilder.class, DoneableResourceQuota.class);
}

@Override
public NamespaceAwareResourceList<Secret, SecretList, SecretBuilder, DoneableSecret> secrets() {
return new io.fabric8.kubernetes.client.dsl.internal.NamespaceAwareResourceList<>(httpClient, masterUrl, "secrets", Secret.class, SecretList.class, SecretBuilder.class, DoneableSecret.class);
return new io.fabric8.kubernetes.client.internal.NamespaceAwareResourceList<>(httpClient, masterUrl, "secrets", Secret.class, SecretList.class, SecretBuilder.class, DoneableSecret.class);
}

@Override
public NamespaceAwareResourceList<Service, ServiceList, ServiceBuilder, DoneableService> services() {
return new io.fabric8.kubernetes.client.dsl.internal.NamespaceAwareResourceList<>(httpClient, masterUrl, "services", Service.class, ServiceList.class, ServiceBuilder.class, DoneableService.class);
return new io.fabric8.kubernetes.client.internal.NamespaceAwareResourceList<>(httpClient, masterUrl, "services", Service.class, ServiceList.class, ServiceBuilder.class, DoneableService.class);
}

@Override
public NamespaceAwareResourceList<ServiceAccount, ServiceAccountList, ServiceAccountBuilder, DoneableServiceAccount> serviceAccounts() {
return new io.fabric8.kubernetes.client.dsl.internal.NamespaceAwareResourceList<>(httpClient, masterUrl, "serviceaccounts", ServiceAccount.class, ServiceAccountList.class, ServiceAccountBuilder.class, DoneableServiceAccount.class);
return new io.fabric8.kubernetes.client.internal.NamespaceAwareResourceList<>(httpClient, masterUrl, "serviceaccounts", ServiceAccount.class, ServiceAccountList.class, ServiceAccountBuilder.class, DoneableServiceAccount.class);
}

@Override
public NamespaceAwareResourceList<BuildConfig, BuildConfigList, BuildConfigBuilder, DoneableBuildConfig> buildConfigs() {
return new io.fabric8.kubernetes.client.dsl.internal.NamespaceAwareResourceList<>(httpClient, openShiftUrl, "buildconfigs", BuildConfig.class, BuildConfigList.class, BuildConfigBuilder.class, DoneableBuildConfig.class);
return new io.fabric8.kubernetes.client.internal.NamespaceAwareResourceList<>(httpClient, openShiftUrl, "buildconfigs", BuildConfig.class, BuildConfigList.class, BuildConfigBuilder.class, DoneableBuildConfig.class);
}

@Override
public NamespaceAwareResourceList<DeploymentConfig, DeploymentConfigList, DeploymentConfigBuilder, DoneableDeploymentConfig> deploymentConfigs() {
return new io.fabric8.kubernetes.client.dsl.internal.NamespaceAwareResourceList<>(httpClient, openShiftUrl, "deploymentconfigs", DeploymentConfig.class, DeploymentConfigList.class, DeploymentConfigBuilder.class, DoneableDeploymentConfig.class);
return new io.fabric8.kubernetes.client.internal.NamespaceAwareResourceList<>(httpClient, openShiftUrl, "deploymentconfigs", DeploymentConfig.class, DeploymentConfigList.class, DeploymentConfigBuilder.class, DoneableDeploymentConfig.class);
}

@Override
public NamespaceAwareResourceList<ImageStream, ImageStreamList, ImageStreamBuilder, DoneableImageStream> imageStreams() {
return new io.fabric8.kubernetes.client.dsl.internal.NamespaceAwareResourceList<>(httpClient, openShiftUrl, "imagestreams", ImageStream.class, ImageStreamList.class, ImageStreamBuilder.class, DoneableImageStream.class);
return new io.fabric8.kubernetes.client.internal.NamespaceAwareResourceList<>(httpClient, openShiftUrl, "imagestreams", ImageStream.class, ImageStreamList.class, ImageStreamBuilder.class, DoneableImageStream.class);
}

@Override
public NonNamespacedResourceList<OAuthAccessToken, OAuthAccessTokenList, OAuthAccessTokenBuilder, DoneableOAuthAccessToken> oAuthAccessTokens() {
return new io.fabric8.kubernetes.client.dsl.internal.NonNamespacedResourceList<>(httpClient, openShiftUrl, "oauthaccesstokens", OAuthAccessToken.class, OAuthAccessTokenList.class, OAuthAccessTokenBuilder.class, DoneableOAuthAccessToken.class);
return new io.fabric8.kubernetes.client.internal.NonNamespacedResourceList<>(httpClient, openShiftUrl, "oauthaccesstokens", OAuthAccessToken.class, OAuthAccessTokenList.class, OAuthAccessTokenBuilder.class, DoneableOAuthAccessToken.class);
}

@Override
public NonNamespacedResourceList<OAuthAuthorizeToken, OAuthAuthorizeTokenList, OAuthAuthorizeTokenBuilder, DoneableOAuthAuthorizeToken> oAuthAuthorizeTokens() {
return new io.fabric8.kubernetes.client.dsl.internal.NonNamespacedResourceList<>(httpClient, openShiftUrl, "oauthauthorizetokens", OAuthAuthorizeToken.class, OAuthAuthorizeTokenList.class, OAuthAuthorizeTokenBuilder.class, DoneableOAuthAuthorizeToken.class);
return new io.fabric8.kubernetes.client.internal.NonNamespacedResourceList<>(httpClient, openShiftUrl, "oauthauthorizetokens", OAuthAuthorizeToken.class, OAuthAuthorizeTokenList.class, OAuthAuthorizeTokenBuilder.class, DoneableOAuthAuthorizeToken.class);
}

@Override
public NonNamespacedResourceList<OAuthClient, OAuthClientList, OAuthClientBuilder, DoneableOAuthClient> oAuthClients() {
return new io.fabric8.kubernetes.client.dsl.internal.NonNamespacedResourceList<>(httpClient, openShiftUrl, "oauthclients", OAuthClient.class, OAuthClientList.class, OAuthClientBuilder.class, DoneableOAuthClient.class);
return new io.fabric8.kubernetes.client.internal.NonNamespacedResourceList<>(httpClient, openShiftUrl, "oauthclients", OAuthClient.class, OAuthClientList.class, OAuthClientBuilder.class, DoneableOAuthClient.class);
}

@Override
public NamespaceAwareResourceList<Route, RouteList, RouteBuilder, DoneableRoute> routes() {
return new io.fabric8.kubernetes.client.dsl.internal.NamespaceAwareResourceList<>(httpClient, openShiftUrl, "routes", Route.class, RouteList.class, RouteBuilder.class, DoneableRoute.class);
return new io.fabric8.kubernetes.client.internal.NamespaceAwareResourceList<>(httpClient, openShiftUrl, "routes", Route.class, RouteList.class, RouteBuilder.class, DoneableRoute.class);
}

public static class Config {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package io.fabric8.kubernetes.client.dsl;
package io.fabric8.kubernetes.client;

import io.fabric8.kubernetes.api.model.HasMetadata;
import io.fabric8.kubernetes.api.model.KubernetesResourceList;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package io.fabric8.kubernetes.client.dsl;
package io.fabric8.kubernetes.client;

import io.fabric8.kubernetes.api.model.HasMetadata;
import io.fabric8.kubernetes.api.model.KubernetesResourceList;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package io.fabric8.kubernetes.client.dsl;
package io.fabric8.kubernetes.client;

import io.fabric8.kubernetes.api.model.DoneableEndpoints;
import io.fabric8.kubernetes.api.model.DoneableEvent;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package io.fabric8.kubernetes.client.dsl;
package io.fabric8.kubernetes.client;

import io.fabric8.kubernetes.api.model.Status;

Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package io.fabric8.kubernetes.client.dsl;
package io.fabric8.kubernetes.client;

import io.fabric8.kubernetes.api.builder.Builder;
import io.fabric8.kubernetes.api.model.Doneable;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package io.fabric8.kubernetes.client.dsl;
package io.fabric8.kubernetes.client;

import io.fabric8.kubernetes.api.builder.Builder;
import io.fabric8.kubernetes.api.model.Doneable;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package io.fabric8.kubernetes.client.dsl;
package io.fabric8.kubernetes.client;

import io.fabric8.kubernetes.api.builder.Builder;
import io.fabric8.kubernetes.api.model.Doneable;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package io.fabric8.kubernetes.client.dsl;
package io.fabric8.kubernetes.client;

import com.ning.http.client.ws.WebSocket;
import io.fabric8.kubernetes.api.builder.Builder;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package io.fabric8.kubernetes.client.dsl;
package io.fabric8.kubernetes.client;

import io.fabric8.kubernetes.api.builder.Builder;
import io.fabric8.kubernetes.api.model.Doneable;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package io.fabric8.kubernetes.client.dsl;
package io.fabric8.kubernetes.client;

import io.fabric8.openshift.api.model.*;

Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package io.fabric8.kubernetes.client.dsl;
package io.fabric8.kubernetes.client;

import com.ning.http.client.ws.WebSocket;
import io.fabric8.kubernetes.api.builder.Builder;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package io.fabric8.kubernetes.client.dsl;
package io.fabric8.kubernetes.client;

import io.fabric8.kubernetes.api.model.HasMetadata;

Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package io.fabric8.kubernetes.client.dsl;
package io.fabric8.kubernetes.client;

public interface Watcher<T> {

Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package io.fabric8.kubernetes.client.dsl.internal;
package io.fabric8.kubernetes.client.internal;

import com.fasterxml.jackson.databind.ObjectMapper;
import com.ning.http.client.AsyncHttpClient;
Expand All @@ -7,7 +7,7 @@
import io.fabric8.kubernetes.api.model.Doneable;
import io.fabric8.kubernetes.api.model.HasMetadata;
import io.fabric8.kubernetes.api.model.Status;
import io.fabric8.kubernetes.client.dsl.KubernetesClientException;
import io.fabric8.kubernetes.client.KubernetesClientException;

import java.io.IOException;
import java.net.MalformedURLException;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package io.fabric8.kubernetes.client.dsl.internal;
package io.fabric8.kubernetes.client.internal;

import com.ning.http.client.AsyncHttpClient;
import com.ning.http.client.Response;
Expand All @@ -11,8 +11,8 @@
import io.fabric8.kubernetes.api.model.KubernetesResourceList;
import io.fabric8.kubernetes.api.model.Status;
import io.fabric8.kubernetes.api.model.WatchEvent;
import io.fabric8.kubernetes.client.dsl.KubernetesClientException;
import io.fabric8.kubernetes.client.dsl.Watcher;
import io.fabric8.kubernetes.client.KubernetesClientException;
import io.fabric8.kubernetes.client.Watcher;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;

Expand Down
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
package io.fabric8.kubernetes.client.dsl.internal;
package io.fabric8.kubernetes.client.internal;

import com.ning.http.client.AsyncHttpClient;
import io.fabric8.kubernetes.api.model.Doneable;
import io.fabric8.kubernetes.client.dsl.ResourceList;
import io.fabric8.kubernetes.client.FilteredResourceList;
import io.fabric8.kubernetes.client.ResourceList;
import io.fabric8.kubernetes.api.builder.Builder;
import io.fabric8.kubernetes.client.dsl.FilteredResourceList;
import io.fabric8.kubernetes.api.model.HasMetadata;
import io.fabric8.kubernetes.api.model.KubernetesResourceList;

Expand All @@ -14,7 +14,7 @@
public class DefaultResourceList<T extends HasMetadata, L extends KubernetesResourceList, B extends Builder<T>, D extends Doneable<T>>
extends BaseResourceList<T, L, B, D>
implements ResourceList<T, L, B>,
FilteredResourceList<T, L> {
FilteredResourceList<T, L> {

public DefaultResourceList(AsyncHttpClient httpClient, URL rootUrl, String resourceT, Class<T> clazz, Class<L> listClazz, Class<B> builderClazz, Class<D> updateableClazz) {
super(httpClient, rootUrl, resourceT, clazz, listClazz, builderClazz, updateableClazz);
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package io.fabric8.kubernetes.client.dsl.internal;
package io.fabric8.kubernetes.client.internal;

import com.fasterxml.jackson.databind.ObjectMapper;
import com.fasterxml.jackson.dataformat.yaml.YAMLFactory;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
package io.fabric8.kubernetes.client.dsl.internal;
package io.fabric8.kubernetes.client.internal;

import io.fabric8.kubernetes.api.builder.Builder;
import io.fabric8.kubernetes.api.builder.Visitor;
import io.fabric8.kubernetes.api.model.Doneable;
import io.fabric8.kubernetes.api.model.HasMetadata;
import io.fabric8.kubernetes.client.dsl.BuilderUpdate;
import io.fabric8.kubernetes.client.dsl.KubernetesClientException;
import io.fabric8.kubernetes.client.dsl.NamedNamespacedResource;
import io.fabric8.kubernetes.client.dsl.Update;
import io.fabric8.kubernetes.client.BuilderUpdate;
import io.fabric8.kubernetes.client.KubernetesClientException;
import io.fabric8.kubernetes.client.NamedNamespacedResource;
import io.fabric8.kubernetes.client.Update;

import java.io.IOException;
import java.lang.reflect.InvocationTargetException;
Expand All @@ -17,7 +17,7 @@

public class NamedResource<T extends HasMetadata, B extends Builder<T>, D extends Doneable<T>>
extends BaseResource<T, B, D>
implements io.fabric8.kubernetes.client.dsl.NamedResource<T, B, D>,
implements io.fabric8.kubernetes.client.NamedResource<T, B, D>,
NamedNamespacedResource<T, B, D> {

private URL resourceUrl;
Expand Down
Loading

0 comments on commit ae32af3

Please sign in to comment.