Examples of IOpenShiftConnection


Examples of com.openshift.client.IOpenShiftConnection

      return false;
    }
  }

  public Future<Boolean> waitForAccessibleAsync(final long timeout) throws OpenShiftException {
    IOpenShiftConnection connection = getConnection();
    return connection.getExecutorService().submit(new Callable<Boolean>() {

      public Boolean call() throws Exception {
        return waitForAccessible(timeout);
      }
    });
View Full Code Here

Examples of com.openshift.client.IOpenShiftConnection

      return false;
    }
  }

  public Future<Boolean> waitForAccessibleAsync(final long timeout) throws OpenShiftException {
    IOpenShiftConnection connection = getConnection();
    return connection.getExecutorService().submit(new Callable<Boolean>() {

      public Boolean call() throws Exception {
        return waitForAccessible(timeout);
      }
    });
View Full Code Here

Examples of com.openshift.client.IOpenShiftConnection

        return answer;
    }

    public static IDomain loginAndGetDomain(OpenShiftEndpoint endpoint, String openshiftServer) {
        // grab all applications
        IOpenShiftConnection connection =
                new OpenShiftConnectionFactory().getConnection(endpoint.getClientId(), endpoint.getUsername(), endpoint.getPassword(), openshiftServer);

        IUser user = connection.getUser();

        IDomain domain;
        if (endpoint.getDomain() != null) {
            domain = user.getDomain(endpoint.getDomain());
        } else {
View Full Code Here

Examples of com.openshift.client.IOpenShiftConnection

import java.io.IOException;

public class Util {
    public static IApplication getApplicationFromUuid(String uuid) {
        IOpenShiftConnection connection;
        try {
            connection = OpenShiftCloud.get().getOpenShiftConnection();
        } catch (IOException e) {
            throw new RuntimeException(e);
        }

        for(IDomain domain : connection.getDomains()) {
            for(IApplication app : domain.getApplications()) {
                if(app.getUUID().equals(uuid)) {
                    return app;
                }
            }
View Full Code Here

Examples of com.openshift.client.IOpenShiftConnection

      return false;
    }
  }

  public Future<Boolean> waitForAccessibleAsync(final long timeout) throws OpenShiftException {
    IOpenShiftConnection connection = getConnection();
    return connection.getExecutorService().submit(new Callable<Boolean>() {

      public Boolean call() throws Exception {
        return waitForAccessible(timeout);
      }
    });
View Full Code Here

Examples of com.openshift.client.IOpenShiftConnection

      return false;
    }
  }

  public Future<Boolean> waitForAccessibleAsync(final long timeout) throws OpenShiftException {
    IOpenShiftConnection connection = getConnection();
    return connection.getExecutorService().submit(new Callable<Boolean>() {

      public Boolean call() throws Exception {
        return waitForAccessible(timeout);
      }
    });
View Full Code Here

Examples of com.openshift.client.IOpenShiftConnection

  private IUser user;
  private IDomain domain;

  @Before
  public void setUp() throws Exception {
    IOpenShiftConnection connection = new TestConnectionBuilder().defaultCredentials().disableSSLCertificateChecks().create();
    this.user = connection.getUser();
    this.domain = DomainTestUtils.ensureHasDomain(user);
  }
View Full Code Here

Examples of com.openshift.client.IOpenShiftConnection

  @Before
  public void setup() throws Throwable {
    this.mockDirector = new HttpClientMockDirector();
    this.clientMock = mockDirector.client();

    final IOpenShiftConnection connection =
        new TestConnectionBuilder(SERVER).credentials(PASSWORD).create(clientMock);
    this.user = connection.getUser();
  }
View Full Code Here

Examples of com.openshift.client.IOpenShiftConnection

  private HttpClientMockDirector mockDirector;

  @Before
  public void setUp() throws HttpClientException, OpenShiftException, IOException {
    this.mockDirector = new HttpClientMockDirector();
    final IOpenShiftConnection connection =
        new TestConnectionBuilder().defaultCredentials().disableSSLCertificateChecks().create();
    this.user = connection.getUser();
  }
View Full Code Here

Examples of com.openshift.client.IOpenShiftConnection

    assertNotNull(authorization.getToken());
    String token = authorization.getToken();
    assertEquals(authorization.getScopes(), IAuthorization.SCOPE_SESSION);

    // operations
    IOpenShiftConnection connection =
        new TestConnectionBuilder().token(authorization.getToken()).create();
    authorization = connection.getUser().getAuthorization();

    // verifications
    assertEquals(authorization.getScopes(), IAuthorization.SCOPE_SESSION);
    assertEquals(token, authorization.getToken());
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.