Package com.openshift.client

Examples of com.openshift.client.IUser


    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 {
            domain = user.getDefaultDomain();
        }

        return domain;
    }
View Full Code Here


        if (excessWorkload <= 0) return;

        OpenShiftSlave slave = getSlave(slaves, builderName);

        IUser user = this.getOpenShiftConnection().getUser();

        if (slave != null && builderExists(builderName, user)) {
            LOGGER.info("Slave exists. Not provisioning");
            return;
        }
View Full Code Here

  public void shouldNoDefaultDomainAfterRefresh() throws OpenShiftException, FileNotFoundException, IOException {
    // precondition
    IDomain domain = DomainTestUtils.ensureHasDomain(user);
    assertNotNull(domain);

    IUser otherUser = new TestConnectionBuilder().defaultCredentials().disableSSLCertificateChecks().create().getUser();
    DomainTestUtils.destroyAllDomains(otherUser);
    assertNull(otherUser.getDefaultDomain());
   
    // operation
    user.refresh();

    // verification
View Full Code Here

            "foobarz", GET_DOMAINS_FOOBARZ_APPLICATIONS_3EMBEDDED)
        .mockGetApplicationCartridges(
            "foobarz", "springeap6",
            GET_DOMAINS_FOOBARZ_APPLICATIONS_SPRINGEAP6_CARTRIDGES_3EMBEDDED)
        .client();
    IUser user = new TestConnectionBuilder().defaultCredentials().create(client).getUser();
    IDomain domain = user.getDomain("foobarz");
    IApplication application = domain.getApplicationByName("springeap6");
    assertThat(application.getEmbeddedCartridges()).onProperty("name").contains("switchyard-0");

    // operation
    IEmbeddedCartridge switchyard = application.getEmbeddedCartridge("switchyard-0");
View Full Code Here

  public IHttpClient client() {
    return client;
  }

  public IDomain getDomain(String string) throws OpenShiftException, FileNotFoundException, IOException {
    IUser user = new TestConnectionBuilder().defaultCredentials().create(client).getUser();
    return user.getDomain("foobarz");
  }
View Full Code Here

      .mockGetDomains(GET_DOMAINS)
      .mockGetApplications("foobarz", GET_DOMAINS_FOOBARZ_APPLICATIONS_1EMBEDDED)
      .mockGetApplication("foobarz", "springeap6", GET_DOMAINS_FOOBARZ_APPLICATIONS_SPRINGEAP6_1EMBEDDED)
      .mockGetGearGroups("foobarz", "springeap6", GET_DOMAINS_FOOBARZ_APPLICATIONS_SPRINGEAP6_GEARGROUPS)
      .client();
    IUser user = new TestConnectionBuilder().defaultCredentials().create(client).getUser();
    this.domain = user.getDomain("foobarz");
  }
View Full Code Here

      IOException {
    // pre-conditions
    IApplication application = ApplicationTestUtils.ensureHasExactly1Application(domain);
    EmbeddedCartridgeTestUtils.ensureHasEmbeddedCartridges(LatestVersionOf.mySQL(), application);
    // verify using user instance that's not the one used to create
    IUser user2 = new TestConnectionBuilder().defaultCredentials().disableSSLCertificateChecks().create().getUser();
    IApplication user2Application = user2.getDefaultDomain().getApplicationByName(application.getName());
    assertThat(new ApplicationAssert(user2Application))
        .hasEmbeddedCartridge(LatestVersionOf.mySQL());

    // operation
View Full Code Here

    // pre-conditions
    IApplication application = ApplicationTestUtils.ensureHasExactly1Application(domain);
    EmbeddedCartridgeTestUtils.ensureHasEmbeddedCartridges(
        LatestVersionOf.mySQL(), application);
    // verify using user instance that's not the one used to create
    IUser user2 = new TestConnectionBuilder().defaultCredentials().disableSSLCertificateChecks().create().getUser();
    IApplication user2Application = user2.getDefaultDomain().getApplicationByName(application.getName());
    EmbeddedCartridgeTestUtils.ensureHasEmbeddedCartridges(
        LatestVersionOf.mySQL(), user2Application);

    // operation
View Full Code Here

    // pre-conditions
    IApplication application = ApplicationTestUtils.ensureHasExactly1Application(domain);
    EmbeddedCartridgeTestUtils.ensureHasEmbeddedCartridges(
        LatestVersionOf.postgreSQL(), application);
    // verify using user instance that's not the one used to create
    IUser user2 = new TestConnectionBuilder().defaultCredentials().disableSSLCertificateChecks().create().getUser();
    IApplication user2Application = user2.getDefaultDomain().getApplicationByName(application.getName());
    assertThat(new ApplicationAssert(user2Application)).hasEmbeddedCartridge(
        LatestVersionOf.postgreSQL());

    // operation
View Full Code Here

    // verification
    new EmbeddedCartridgeAssert(jbossAs.getEmbeddedCartridge(LatestVersionOf.mongoDB().get(user)))
        .hasUrlProperty();
    // verify using user instance that's not the one used to create
    IUser user2 = new TestConnectionBuilder().defaultCredentials().disableSSLCertificateChecks().create().getUser();
    IApplication user2Application = user2.getDefaultDomain().getApplicationByName(jbossAs.getName());
    IEmbeddableCartridge mongo = LatestVersionOf.mongoDB().get(user2);
    new EmbeddedCartridgeAssert(user2Application.getEmbeddedCartridge(mongo))
        .hasUrlProperty();
  }
View Full Code Here

TOP

Related Classes of com.openshift.client.IUser

Copyright © 2018 www.massapicom. 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.