Search in sources :

Example 6 with ServiceManagerEnvironment

use of org.jboss.tools.openshift.cdk.server.core.internal.listeners.ServiceManagerEnvironment in project jbosstools-openshift by jbosstools.

the class ServiceManagerParsingTest method testServiceManager102Win.

@Test
public void testServiceManager102Win() throws Exception {
    String[] lines = serviceManager102Win();
    HashMap<String, String> map = ServiceManagerUtility.parseLines(lines);
    ServiceManagerEnvironment env = new ServiceManagerEnvironment(map);
    serviceManager102(env, WIN_CERT_PATH);
}
Also used : ServiceManagerEnvironment(org.jboss.tools.openshift.cdk.server.core.internal.listeners.ServiceManagerEnvironment) Test(org.junit.Test)

Example 7 with ServiceManagerEnvironment

use of org.jboss.tools.openshift.cdk.server.core.internal.listeners.ServiceManagerEnvironment in project jbosstools-openshift by jbosstools.

the class ServiceManagerParsingTest method testServiceManager101Linux.

@Test
public void testServiceManager101Linux() throws Exception {
    String[] lines = serviceManager101Linux();
    HashMap<String, String> map = ServiceManagerUtility.parseLines(lines);
    ServiceManagerEnvironment env = new ServiceManagerEnvironment(map);
    serviceManager101(env, LIN_CERT_PATH);
}
Also used : ServiceManagerEnvironment(org.jboss.tools.openshift.cdk.server.core.internal.listeners.ServiceManagerEnvironment) Test(org.junit.Test)

Example 8 with ServiceManagerEnvironment

use of org.jboss.tools.openshift.cdk.server.core.internal.listeners.ServiceManagerEnvironment in project jbosstools-openshift by jbosstools.

the class VagrantPoller method checkOpenShiftHealth.

private boolean checkOpenShiftHealth(IServer server, int timeout) throws OpenShiftNotReadyPollingException {
    ServiceManagerEnvironment adb = ServiceManagerEnvironmentLoader.type(server).getOrLoadServiceManagerEnvironment(server, true);
    if (adb == null) {
        return false;
    }
    String url = adb.getOpenShiftHost() + ":" + adb.getOpenShiftPort();
    return checkOpenShiftHealth(url, timeout);
}
Also used : ServiceManagerEnvironment(org.jboss.tools.openshift.cdk.server.core.internal.listeners.ServiceManagerEnvironment)

Example 9 with ServiceManagerEnvironment

use of org.jboss.tools.openshift.cdk.server.core.internal.listeners.ServiceManagerEnvironment in project jbosstools-openshift by jbosstools.

the class MinishiftPoller method checkOpenShiftHealth.

private boolean checkOpenShiftHealth(IServer server, int timeout) throws OpenShiftNotReadyPollingException {
    ServiceManagerEnvironment adb = ServiceManagerEnvironmentLoader.type(server).getOrLoadServiceManagerEnvironment(server, true, true);
    if (adb == null) {
        return false;
    }
    String url = adb.getOpenShiftHost() + ":" + adb.getOpenShiftPort();
    return checkOpenShiftHealth(url, timeout);
}
Also used : ServiceManagerEnvironment(org.jboss.tools.openshift.cdk.server.core.internal.listeners.ServiceManagerEnvironment)

Example 10 with ServiceManagerEnvironment

use of org.jboss.tools.openshift.cdk.server.core.internal.listeners.ServiceManagerEnvironment in project jbosstools-openshift by jbosstools.

the class CDKDockerUtilityTest method testCreateDockerConnection.

@Test
public void testCreateDockerConnection() throws Exception {
    String name = "foo";
    IServer server = mockServer(name);
    ServiceManagerEnvironment adb = createADB("10.1.2.2");
    IDockerConnection dockerConnection = util.createDockerConnection(server, adb);
    assertNotNull(dockerConnection);
    verify(mgr).addConnection(dockerConnection);
    assertEquals(name, dockerConnection.getName());
    assertEquals("https://10.1.2.2:2376", dockerConnection.getUri());
    assertEquals("/cert/path/.docker", dockerConnection.getTcpCertPath());
}
Also used : IServer(org.eclipse.wst.server.core.IServer) ServiceManagerEnvironment(org.jboss.tools.openshift.cdk.server.core.internal.listeners.ServiceManagerEnvironment) IDockerConnection(org.eclipse.linuxtools.docker.core.IDockerConnection) Test(org.junit.Test)

Aggregations

ServiceManagerEnvironment (org.jboss.tools.openshift.cdk.server.core.internal.listeners.ServiceManagerEnvironment)16 Test (org.junit.Test)13 IServer (org.eclipse.wst.server.core.IServer)7 CDKOpenshiftUtility (org.jboss.tools.openshift.cdk.server.core.internal.listeners.CDKOpenshiftUtility)6 IConnection (org.jboss.tools.openshift.common.core.connection.IConnection)5 ConnectionsRegistry (org.jboss.tools.openshift.common.core.connection.ConnectionsRegistry)3 IStatus (org.eclipse.core.runtime.IStatus)2 IOException (java.io.IOException)1 URISyntaxException (java.net.URISyntaxException)1 CoreException (org.eclipse.core.runtime.CoreException)1 MultiStatus (org.eclipse.core.runtime.MultiStatus)1 NullProgressMonitor (org.eclipse.core.runtime.NullProgressMonitor)1 Status (org.eclipse.core.runtime.Status)1 IDockerConnection (org.eclipse.linuxtools.docker.core.IDockerConnection)1 ControllableServerBehavior (org.jboss.ide.eclipse.as.wtp.core.server.behavior.ControllableServerBehavior)1 ConfigureDependentFrameworksListener (org.jboss.tools.openshift.cdk.server.core.internal.listeners.ConfigureDependentFrameworksListener)1 ServiceManagerEnvironmentLoader (org.jboss.tools.openshift.cdk.server.core.internal.listeners.ServiceManagerEnvironmentLoader)1 CDKRegistryProvider (org.jboss.tools.openshift.cdk.server.core.internal.registry.CDKRegistryProvider)1