private Optional<OpenShiftRuntime> create(final OpenShiftRuntimeConfig runtimeConfig) throws ProvisioningException { final Optional<OpenShiftProvider> _openshiftProvider = runtimeRegistry.getProvider(runtimeConfig.getProviderId(), OpenShiftProvider.class); if (!_openshiftProvider.isPresent()) { return Optional.empty(); } OpenShiftProvider openshiftProvider = _openshiftProvider.get(); OpenShiftClient openshiftClient = openshift.getOpenShiftClient(openshiftProvider); LOG.info("Creating runtime..."); OpenShiftRuntimeState runtimeState; try { runtimeState = openshiftClient.create(runtimeConfig); } catch (OpenShiftClientException ex) { throw new ProvisioningException(ex.getMessage(), ex); } final String id = runtimeConfig.getRuntimeId().toString(); LOG.info("Created runtime: " + id); OpenShiftRuntimeEndpoint endpoint = openshiftClient.getRuntimeEndpoint(id); return Optional.of(new OpenShiftRuntime(id, buildRuntimeName(runtimeConfig, id), runtimeConfig, openshiftProvider, endpoint, new OpenShiftRuntimeInfo(runtimeConfig), runtimeState)); }
endpoint.setContext(appContext); return Optional.of(new WildflyRuntime(id, buildRuntimeName(runtimeConfig, id), runtimeConfig,
endpoint.setContext(appContext); return Optional.of(new WildflyRuntime(id, buildRuntimeName(runtimeConfig, id), runtimeConfig,
dockerRuntimeEndpoint.setContext(""); return Optional.of(new DockerRuntime(shortId, buildRuntimeName(runtimeConfig, shortId), runtimeConfig,
dockerRuntimeEndpoint.setContext(""); return Optional.of(new DockerRuntime(shortId, buildRuntimeName(runtimeConfig, shortId), runtimeConfig,