Search in sources :

Example 11 with OpenShiftClientException

use of org.guvnor.ala.openshift.access.exceptions.OpenShiftClientException in project kie-wb-common by kiegroup.

the class OpenShiftRuntimeManager method start.

@Override
public void start(RuntimeId runtimeId) throws RuntimeOperationException {
    OpenShiftRuntime runtime = (OpenShiftRuntime) runtimeRegistry.getRuntimeById(runtimeId.getId());
    try {
        LOG.info("Starting runtime: " + runtimeId.getId());
        openshift.getOpenShiftClient(runtime.getProviderId()).start(runtime.getId());
        refresh(runtimeId);
        LOG.info("Started runtime: " + runtimeId.getId());
    } catch (OpenShiftClientException ex) {
        LOG.error("Error Starting runtime: " + runtimeId.getId(), ex);
        throw new RuntimeOperationException("Error Starting runtime: " + runtimeId.getId(), ex);
    }
}
Also used : OpenShiftRuntime(org.guvnor.ala.openshift.model.OpenShiftRuntime) OpenShiftClientException(org.guvnor.ala.openshift.access.exceptions.OpenShiftClientException) RuntimeOperationException(org.guvnor.ala.exceptions.RuntimeOperationException)

Aggregations

OpenShiftClientException (org.guvnor.ala.openshift.access.exceptions.OpenShiftClientException)11 RuntimeOperationException (org.guvnor.ala.exceptions.RuntimeOperationException)6 OpenShiftRuntime (org.guvnor.ala.openshift.model.OpenShiftRuntime)6 IntOrString (io.fabric8.kubernetes.api.model.IntOrString)4 OpenShiftRuntimeState (org.guvnor.ala.openshift.model.OpenShiftRuntimeState)3 OpenShiftProvider (org.guvnor.ala.openshift.model.OpenShiftProvider)2 OpenShiftRuntimeEndpoint (org.guvnor.ala.openshift.model.OpenShiftRuntimeEndpoint)2 KubernetesList (io.fabric8.kubernetes.api.model.KubernetesList)1 Secret (io.fabric8.kubernetes.api.model.Secret)1 Service (io.fabric8.kubernetes.api.model.Service)1 ServiceAccount (io.fabric8.kubernetes.api.model.ServiceAccount)1 DeploymentConfig (io.fabric8.openshift.api.model.DeploymentConfig)1 DoneableDeploymentConfig (io.fabric8.openshift.api.model.DoneableDeploymentConfig)1 ImageStream (io.fabric8.openshift.api.model.ImageStream)1 Route (io.fabric8.openshift.api.model.Route)1 RoutePort (io.fabric8.openshift.api.model.RoutePort)1 RouteSpec (io.fabric8.openshift.api.model.RouteSpec)1 LinkedHashMap (java.util.LinkedHashMap)1 ProvisioningException (org.guvnor.ala.exceptions.ProvisioningException)1 OpenShiftClient (org.guvnor.ala.openshift.access.OpenShiftClient)1