Examples of CloudService


Examples of org.cloudfoundry.client.lib.domain.CloudService

        }

        List<CloudService> updatedServices = new ArrayList<CloudService>();

        for (CloudService boundService : boundServices) {
          CloudService updatedService = existingAsMap.get(boundService.getName());
          // Check if there is an updated mapping to an actual Cloud
          // Service or retain the old one.
          if (updatedService != null) {
            updatedServices.add(updatedService);
          }
View Full Code Here

Examples of org.cloudfoundry.client.lib.domain.CloudService

            CloudFoundryServerBehaviour behaviour = server.getBehaviour();
            if (serviceToApplicationsBindingPart != null && server != null && behaviour != null){
              List<ApplicationToService> applicationsToProcess =
                  serviceToApplicationsBindingPart.getApplicationToService();
             
              CloudService cloudService = null;
                           
              try {
                // Find the Cloud Service that was selected
                List<CloudService> cloudServiceList = behaviour.getServices(null);
                int lenCloudService = cloudServiceList.size();
               
                String serviceName = servicesHandler.toString();
               
                for (int j=0;j<lenCloudService;j++){
                  CloudService currService = cloudServiceList.get(j);
                  if (currService != null){
                    String currServiceName = currService.getName();
                    if (currServiceName != null && currServiceName.equals(serviceName)){
                      cloudService = currService;
                      break;
                    }
                  }
View Full Code Here

Examples of org.cloudfoundry.client.lib.domain.CloudService

  }

  protected CloudService createCloudService(String name, String vendor) throws CoreException {
    CloudServiceOffering serviceConfiguration = getServiceConfiguration(vendor);
    if (serviceConfiguration != null) {
      CloudService service = new CloudService();
      service.setName(name);
      service.setLabel(vendor);
      service.setVersion(serviceConfiguration.getVersion());
      service.setPlan(serviceConfiguration.getCloudServicePlans().get(0).getName());

      createService(service);
      return service;
    }
    return null;
View Full Code Here

Examples of org.cloudfoundry.client.lib.domain.CloudService

    serverBehavior.createService(new CloudService[] { service }, new NullProgressMonitor());
  }

  protected void assertServiceExists(CloudService expectedService) throws Exception {
    String expectedServicename = expectedService.getName();
    CloudService foundService = getCloudService(expectedServicename);
    assertNotNull(foundService);
    assertServiceEquals(expectedService, foundService);
  }
View Full Code Here

Examples of org.cloudfoundry.client.lib.domain.CloudService

    assertNotNull(foundService);
    assertServiceEquals(expectedService, foundService);
  }

  protected void assertServiceExists(String serviceName) throws Exception {
    CloudService foundService = getCloudService(serviceName);
    assertNotNull(foundService);
  }
View Full Code Here

Examples of org.cloudfoundry.client.lib.domain.CloudService

  }

  protected CloudService getCloudService(String serviceName) throws CoreException {

    List<CloudService> services = serverBehavior.getServices(new NullProgressMonitor());
    CloudService foundService = null;
    if (services != null) {
      for (CloudService service : services) {
        if (serviceName.equals(service.getName())) {
          foundService = service;
          break;
View Full Code Here

Examples of org.cloudfoundry.client.lib.domain.CloudService

    return foundService;
  }

  protected void assertServiceNotExist(String expectedServicename) throws Exception {

    CloudService foundService = getCloudService(expectedServicename);

    assertNull(foundService);
  }
View Full Code Here

Examples of org.cloudfoundry.client.lib.domain.CloudService

public class CloudFoundryServicesTest extends AbstractCloudFoundryServicesTest {

  public static final String SERVICE_NAME = "cfEclipseRegressionTestService";

  public void testCreateAndDeleteMysqlService() throws Exception {
    CloudService service = createService();
    assertServiceExists(service);
    deleteService(service);
    assertServiceNotExist(SERVICE_NAME);
  }
View Full Code Here

Examples of org.cloudfoundry.client.lib.domain.CloudService

    deleteService(service);
    assertServiceNotExist(SERVICE_NAME);
  }

  public void testServiceBinding() throws Exception {
    CloudService service = createService();
    String prefix = "testServiceBinding";
    createWebApplicationProject();
    CloudFoundryApplicationModule appModule = assertDeployApplicationStartMode(prefix);

    CloudApplication app = appModule.getApplication();
    assertStopModule(appModule);

    bindServiceToApp(app, service);

    assertStartModule(appModule);

    assertServiceBound(service.getName(), app);

  }
View Full Code Here

Examples of org.cloudfoundry.client.lib.domain.CloudService

    assertServiceBound(service.getName(), app);

  }

  public void testServiceUnBinding() throws Exception {
    CloudService service = createService();

    String prefix = "testServiceUnbinding";
    createWebApplicationProject();

    CloudFoundryApplicationModule appModule = assertDeployApplicationStartMode(prefix);

    CloudApplication app = appModule.getApplication();

    assertStopModule(appModule);
    bindServiceToApp(app, service);

    assertStartModule(appModule);

    assertServiceBound(service.getName(), app);

    assertStopModule(appModule);
    unbindServiceToApp(app, service);
    assertServiceNotBound(service.getName(), app);

  }
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.