Search in sources :

Example 1 with RawCustomResourceOperationsImpl

use of io.fabric8.kubernetes.client.dsl.internal.RawCustomResourceOperationsImpl in project syndesis-qe by syndesisio.

the class Syndesis method deleteCr.

private void deleteCr(String name, String version) {
    log.info("Undeploying custom resource \"{}\" in version \"{}\"", name, version);
    RawCustomResourceOperationsImpl syndesisCrClient = getSyndesisCrClient(version);
    OpenShiftUtils.asRegularUser(() -> syndesisCrClient.delete(TestConfiguration.openShiftNamespace(), name));
}
Also used : RawCustomResourceOperationsImpl(io.fabric8.kubernetes.client.dsl.internal.RawCustomResourceOperationsImpl)

Example 2 with RawCustomResourceOperationsImpl

use of io.fabric8.kubernetes.client.dsl.internal.RawCustomResourceOperationsImpl in project syndesis-qe by syndesisio.

the class Syndesis method editCr.

public void editCr(Map<String, Object> cr) {
    RawCustomResourceOperationsImpl syndesisCrClient = getSyndesisCrClient();
    OpenShiftUtils.asRegularUser(() -> {
        try {
            syndesisCrClient.edit(TestConfiguration.openShiftNamespace(), CR_NAME, cr);
        } catch (IOException e) {
            fail("Unable to modify CR: " + e);
        }
    });
}
Also used : RawCustomResourceOperationsImpl(io.fabric8.kubernetes.client.dsl.internal.RawCustomResourceOperationsImpl) IOException(java.io.IOException)

Example 3 with RawCustomResourceOperationsImpl

use of io.fabric8.kubernetes.client.dsl.internal.RawCustomResourceOperationsImpl in project syndesis-qe by syndesisio.

the class Syndesis method editCr.

public void editCr(String cr) {
    RawCustomResourceOperationsImpl syndesisCrClient = getSyndesisCrClient();
    OpenShiftUtils.asRegularUser(() -> {
        try {
            syndesisCrClient.edit(TestConfiguration.openShiftNamespace(), CR_NAME, cr);
        } catch (IOException e) {
            fail("Unable to modify CR: " + e);
        }
    });
}
Also used : RawCustomResourceOperationsImpl(io.fabric8.kubernetes.client.dsl.internal.RawCustomResourceOperationsImpl) IOException(java.io.IOException)

Example 4 with RawCustomResourceOperationsImpl

use of io.fabric8.kubernetes.client.dsl.internal.RawCustomResourceOperationsImpl in project syndesis-qe by syndesisio.

the class Syndesis method createCr.

public void createCr(Map<String, Object> cr) {
    RawCustomResourceOperationsImpl syndesisCrClient = getSyndesisCrClient();
    OpenShiftUtils.asRegularUser(() -> {
        try {
            syndesisCrClient.create(TestConfiguration.openShiftNamespace(), cr);
        } catch (IOException e) {
            fail("Unable to create CR: " + e);
        }
    });
}
Also used : RawCustomResourceOperationsImpl(io.fabric8.kubernetes.client.dsl.internal.RawCustomResourceOperationsImpl) IOException(java.io.IOException)

Aggregations

RawCustomResourceOperationsImpl (io.fabric8.kubernetes.client.dsl.internal.RawCustomResourceOperationsImpl)4 IOException (java.io.IOException)3