Package com.openshift.client

Examples of com.openshift.client.IApplication.destroy()


    // pre-condition
    IApplication application = ApplicationTestUtils.getOrCreateApplication(domain);
    assertThat(application.getName()).isNotEmpty();

    // operation
    application.destroy();

    // verification
    assertThat(domain.getApplications()).excludes(application);
  }
 
View Full Code Here


    IApplication application = ApplicationTestUtils.getOrCreateApplication(domain);
    assertThat(application).isNotNull();
    String name = application.getName();
   
    // operation
    application.destroy();

    // verifications
    assertThat(domain.getApplicationByName(name)).isNull();
  }
View Full Code Here

  protected static void destroyAllNotOfType(IStandaloneCartridge cartridge, List<IApplication> applications) {
    for (Iterator<IApplication> it = applications.iterator(); it.hasNext();) {
      IApplication application = it.next();
      if (!cartridge.equals(application.getCartridge())) {
        application.destroy();
      }
    }
  }
 
  public static void destroyAllApplications(IDomain domain) {
View Full Code Here

  public static void destroyAllByCartridge(ICartridge cartridge, IDomain domain) {
    for (Iterator<IApplication> it = domain.getApplications().iterator(); it.hasNext();) {
      IApplication application = it.next();
      if (!application.getCartridge().equals(cartridge)) {
        application.destroy();
      }
    }
  }

  public static IApplication ensureHasExactly1Application(IStandaloneCartridge cartridge, IDomain domain) {
View Full Code Here

    assertThat(domain).isNotNull();
    final IApplication app = domain.getApplicationByName("springeap6");
    assertThat(app).isNotNull();

    // operation
    app.destroy();

    // verifications
    assertThat(domain.getApplications()).hasSize(1).excludes(app);
  }
View Full Code Here

    assertThat(domain).isNotNull();
    final IApplication app = domain.getApplicationByName("springeap6");
    assertThat(app).isNotNull();

    // operation
    app.destroy();

    // verifications
    assertThat(domain.getApplicationByName("springeap6")).isNull();
  }
 
View Full Code Here

    assertNotNull(otherDomain);
    IApplication otherDomainApplication = otherDomain.getApplicationByName(application.getName());
    assertThat(otherDomainApplication).isNotNull();
   
    // operation
    otherDomainApplication.destroy();
    assertThat(otherDomain.getApplicationByName(application.getName())).isNull();
    domain.refresh();

    // verification
    assertThat(domain.getApplicationByName(application.getName())).isNull();
View Full Code Here

    public void destroy(Container container) {
        assertValid();
        IApplication app = getContainerApplication(container, false);
        if (app != null) {
            try {
                app.destroy();
            } catch (NotFoundOpenShiftException e) {
                LOG.debug("Ignoring '{} when destroying {} container", e.getMessage(), container.getId());
            }
        }
    }
View Full Code Here

    protected Object doExecute() throws Exception {
        IOpenShiftConnection connection = getOrCreateConnection();
        for (IDomain domain : connection.getDomains()) {
            if (domainId == null || domainId.equals(domain.getId())) {
                IApplication application = domain.getApplicationByName(applicationName);
                application.destroy();
            }
        }
        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.