Skip to content

Commit

Permalink
Add support for builds().
Browse files Browse the repository at this point in the history
  • Loading branch information
iocanel committed Jul 24, 2015
1 parent eb8771a commit 5434d21
Show file tree
Hide file tree
Showing 3 changed files with 44 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@
import io.fabric8.kubernetes.client.dsl.Resource;
import io.fabric8.kubernetes.client.dsl.ScaleableResource;
import io.fabric8.kubernetes.client.dsl.internal.BuildConfigOperationsImpl;
import io.fabric8.kubernetes.client.dsl.internal.BuildOperationsImpl;
import io.fabric8.kubernetes.client.dsl.internal.DeploymentConfigOperationsImpl;
import io.fabric8.kubernetes.client.dsl.internal.EndpointsOperationsImpl;
import io.fabric8.kubernetes.client.dsl.internal.EventOperationsImpl;
Expand Down Expand Up @@ -248,6 +249,11 @@ public Operation<Template, TemplateList, DoneableTemplate, ProcessableResource<T
return new TemplateOperationsImpl(httpClient, openShiftUrl);
}

@Override
public Operation<Build, BuildList, DoneableBuild, Resource<Build, DoneableBuild>> builds() {
return new BuildOperationsImpl(httpClient, openShiftUrl);
}

@Override
public Operation buildConfigs() {
return new BuildConfigOperationsImpl(httpClient, openShiftUrl);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,8 @@

public interface OpenShiftClient extends KubernetesClient {

Operation<Build, BuildList, DoneableBuild, Resource<Build, DoneableBuild>> builds();

Operation<BuildConfig, BuildConfigList, DoneableBuildConfig, Resource<BuildConfig, DoneableBuildConfig>> buildConfigs();

Operation<DeploymentConfig, DeploymentConfigList, DoneableDeploymentConfig, Resource<DeploymentConfig, DoneableDeploymentConfig>> deploymentConfigs();
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
/**
* 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.dsl.internal;

import com.ning.http.client.AsyncHttpClient;
import io.fabric8.kubernetes.client.dsl.Resource;
import io.fabric8.openshift.api.model.Build;
import io.fabric8.openshift.api.model.BuildList;
import io.fabric8.openshift.api.model.DoneableBuild;

import java.net.URL;

public class BuildOperationsImpl extends BaseOperation<Build, BuildList, DoneableBuild,
Resource<Build, DoneableBuild>> {

public BuildOperationsImpl(AsyncHttpClient httpClient, URL rootUrl) {
super(httpClient, rootUrl, "builds", null, null, Build.class, BuildList.class, DoneableBuild.class);
}

public BuildOperationsImpl(AsyncHttpClient httpClient, URL rootUrl, String namespace, String name) {
super(httpClient, rootUrl, "builds", namespace, name);
}
}

0 comments on commit 5434d21

Please sign in to comment.