Package com.openshift.client

Examples of com.openshift.client.IDomain.createApplication()


  public static IApplication destroyAndRecreateIfScalable(IApplication application) {
    if (!ApplicationScale.NO_SCALE.equals(application.getGearProfile())) {
      IStandaloneCartridge cartridge = application.getCartridge();
      IDomain domain = application.getDomain();
      application.destroy();
      application = domain.createApplication(
          createRandomApplicationName(), cartridge, ApplicationScale.NO_SCALE);
    }
    return application;
  }
View Full Code Here


    IDomain otherDomain = otherUser.getDomain(domain.getId());
    assertNotNull(otherDomain);

    // operation
    String applicationName = "app" + StringUtils.createRandomString();
    otherDomain.createApplication(applicationName, LatestVersionOf.php().get(otherUser));
    assertThat(domain.getApplications().size()).isEqualTo(numOfApplications);
    domain.refresh();

    // verification
    assertThat(domain.getApplications().size()).isEqualTo(numOfApplications + 1);
View Full Code Here

        String containerName = options.getName();

        long t0 = System.currentTimeMillis();
        IApplication application;
        try {
            application = domain.createApplication(containerName, cartridge, scale, new GearProfile(options.getGearProfile()), initGitUrl, timeout, userEnvVars);
        } catch (OpenShiftTimeoutException e) {
            long t1;
            do {
                Thread.sleep(5000);
                domain.refresh();
View Full Code Here

        IDomain domain = domainId != null ? user.getDomain(domainId) : user.getDefaultDomain();
        if (domainId != null && domain == null) {
            domain = user.createDomain(domainId);
        }

        IApplication application = domain.createApplication(applicationName, new StandaloneCartridge(cartridge), null, new GearProfile(gearProfile));
        System.out.println(application.getCreationLog());
        return null;
    }
}
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.