Search in sources :

Example 1 with ExtensionsV1beta1Deployment

use of io.kubernetes.client.models.ExtensionsV1beta1Deployment in project java by kubernetes-client.

the class PatchExample method main.

public static void main(String[] args) throws IOException, ApiException {
    PatchExample example = new PatchExample();
    ApiClient client = ClientBuilder.defaultClient();
    Configuration.setDefaultApiClient(client);
    ExtensionsV1beta1Deployment body = (ExtensionsV1beta1Deployment) example.deserialize(jsonDepStr, ExtensionsV1beta1Deployment.class);
    ExtensionsV1beta1Deployment deploy1 = example.createDeployment("default", body, "false");
    System.out.println("original deployment" + deploy1);
    ArrayList<JsonObject> arr = new ArrayList<>();
    arr.add(((JsonElement) example.deserialize(jsonPatchStr, JsonElement.class)).getAsJsonObject());
    ExtensionsV1beta1Deployment deploy2 = example.PatchDeployment("hello-node", "default", arr, "false");
    System.out.println("patched deployment" + deploy2);
}
Also used : ExtensionsV1beta1Deployment(io.kubernetes.client.models.ExtensionsV1beta1Deployment) ArrayList(java.util.ArrayList) JsonObject(com.google.gson.JsonObject) ApiClient(io.kubernetes.client.ApiClient)

Example 2 with ExtensionsV1beta1Deployment

use of io.kubernetes.client.models.ExtensionsV1beta1Deployment in project java by kubernetes-client.

the class PatchExample method createDeployment.

public ExtensionsV1beta1Deployment createDeployment(String namespace, ExtensionsV1beta1Deployment body, String pretty) throws ApiException {
    ExtensionsV1beta1Api api = new ExtensionsV1beta1Api();
    ExtensionsV1beta1Deployment deploy = api.createNamespacedDeployment(namespace, body, pretty);
    return deploy;
}
Also used : ExtensionsV1beta1Api(io.kubernetes.client.apis.ExtensionsV1beta1Api) ExtensionsV1beta1Deployment(io.kubernetes.client.models.ExtensionsV1beta1Deployment)

Example 3 with ExtensionsV1beta1Deployment

use of io.kubernetes.client.models.ExtensionsV1beta1Deployment in project java by kubernetes-client.

the class ExtensionsV1beta1ApiTest method readNamespacedDeploymentTest.

/**
 * read the specified Deployment
 *
 * @throws ApiException
 *          if the Api call fails
 */
@Test
public void readNamespacedDeploymentTest() throws ApiException {
    String name = null;
    String namespace = null;
    String pretty = null;
    Boolean exact = null;
    Boolean export = null;
    ExtensionsV1beta1Deployment response = api.readNamespacedDeployment(name, namespace, pretty, exact, export);
// TODO: test validations
}
Also used : ExtensionsV1beta1Deployment(io.kubernetes.client.models.ExtensionsV1beta1Deployment) Test(org.junit.Test)

Example 4 with ExtensionsV1beta1Deployment

use of io.kubernetes.client.models.ExtensionsV1beta1Deployment in project java by kubernetes-client.

the class ExtensionsV1beta1ApiTest method readNamespacedDeploymentStatusTest.

/**
 * read status of the specified Deployment
 *
 * @throws ApiException
 *          if the Api call fails
 */
@Test
public void readNamespacedDeploymentStatusTest() throws ApiException {
    String name = null;
    String namespace = null;
    String pretty = null;
    ExtensionsV1beta1Deployment response = api.readNamespacedDeploymentStatus(name, namespace, pretty);
// TODO: test validations
}
Also used : ExtensionsV1beta1Deployment(io.kubernetes.client.models.ExtensionsV1beta1Deployment) Test(org.junit.Test)

Example 5 with ExtensionsV1beta1Deployment

use of io.kubernetes.client.models.ExtensionsV1beta1Deployment in project java by kubernetes-client.

the class ExtensionsV1beta1ApiTest method createNamespacedDeploymentTest.

/**
 * create a Deployment
 *
 * @throws ApiException
 *          if the Api call fails
 */
@Test
public void createNamespacedDeploymentTest() throws ApiException {
    String namespace = null;
    ExtensionsV1beta1Deployment body = null;
    String pretty = null;
    ExtensionsV1beta1Deployment response = api.createNamespacedDeployment(namespace, body, pretty);
// TODO: test validations
}
Also used : ExtensionsV1beta1Deployment(io.kubernetes.client.models.ExtensionsV1beta1Deployment) Test(org.junit.Test)

Aggregations

ExtensionsV1beta1Deployment (io.kubernetes.client.models.ExtensionsV1beta1Deployment)24 Type (java.lang.reflect.Type)14 ProgressRequestBody (io.kubernetes.client.ProgressRequestBody)7 ProgressResponseBody (io.kubernetes.client.ProgressResponseBody)7 Test (org.junit.Test)7 ExtensionsV1beta1Api (io.kubernetes.client.apis.ExtensionsV1beta1Api)2 JsonObject (com.google.gson.JsonObject)1 ApiClient (io.kubernetes.client.ApiClient)1 ArrayList (java.util.ArrayList)1