Examples of CloudService


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

    }
    return service;
  }

  protected CloudService getMongodbService() throws Exception {
    CloudService service = getCloudService(MONGODB_SERVICE_NAME);
    if (service == null) {
      service = createCloudService(MONGODB_SERVICE_NAME, "mongodb");
    }
    return service;
  }
View Full Code Here

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

    }
    return service;
  }

  protected CloudService getPostgresqlService() throws Exception {
    CloudService service = getCloudService(POSTGRESQL_SERVICE_NAME);
    if (service == null) {
      service = createCloudService(POSTGRESQL_SERVICE_NAME, "postgresql");
    }
    return service;
  }
View Full Code Here

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

    // Add the external tools actions
    // If only one service is selected, check if there are external
    // tools to launch for that service
    List<CloudService> services = ModifyServicesForApplicationAction.getServices(selection);

    CloudService selectedService = null;
    // Only show external tools launch actions for ONE selection
    if (services != null && services.size() == 1) {
      selectedService = services.get(0);
    }

    if (selectedService != null) {
      // See if there is an existing tunnel that is open
      CaldecottTunnelDescriptor descriptor = CloudFoundryPlugin.getCaldecottTunnelCache().getDescriptor(
          cloudServer, selectedService.getName());

      IAction dataToolsAction = DataToolsTunnelAction.getAction(editorPage, selectedService, descriptor,
          cloudServer);

      // Add connection to Eclipse data tools, if one exists for the given
View Full Code Here

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

        List<CloudService> updatedServices = new ArrayList<CloudService>();
        if (existingServices != null) {
          updatedServices.addAll(existingServices);
        }

        CloudService existingService = null;
        for (CloudService service : updatedServices) {
          if (service.getName().equals(serviceName)) {
            existingService = service;
            break;
          }
View Full Code Here

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

  @Test
  public void getCreateDeleteService() throws MalformedURLException {
    String serviceName = "mysql-test";
    createMySqlService(serviceName);

    CloudService service = connectedClient.getService(serviceName);
    assertNotNull(service);
    assertEquals(serviceName, service.getName());
    assertTimeWithinRange("Creation time should be very recent",
        service.getMeta().getCreated().getTime(), FIVE_MINUTES);

    connectedClient.deleteService(serviceName);
    List<CloudService> services = connectedClient.getServices();
    assertNotNull(services);
    assertEquals(0, services.size());
View Full Code Here

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

  @Test
  public void getService() {
    String serviceName = "mysql-test";

    CloudService expectedService = createMySqlService(serviceName);
    CloudService service = connectedClient.getService(serviceName);

    assertNotNull(service);
    assertServicesEqual(expectedService, service);
  }
View Full Code Here

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

  @Test
  public void getServiceWithVersionAndProvider() {
    String serviceName = "mysql-test-version-provider";

    CloudService expectedService = createMySqlServiceWithVersionAndProvider(serviceName);
    CloudService service = connectedClient.getService(serviceName);

    assertNotNull(service);
    assertServicesEqual(expectedService, service);
    assertEquals(expectedService.getProvider(), service.getProvider());
    assertEquals(expectedService.getVersion(), service.getVersion());
  }
View Full Code Here

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

  @Test
  public void getUserProvidedService() {
    String serviceName = "user-provided-test-service";

    CloudService expectedService = createUserProvidedService(serviceName);
    CloudService service = connectedClient.getService(serviceName);

    assertNotNull(service);
    assertServicesEqual(expectedService, service);
  }
View Full Code Here

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

  }

  private CloudService createMySqlServiceWithVersionAndProvider(String serviceName) {
    CloudServiceOffering databaseServiceOffering = getCloudServiceOffering(MYSQL_SERVICE_LABEL);

    CloudService service = new CloudService(CloudEntity.Meta.defaultMeta(), serviceName);
    service.setProvider(databaseServiceOffering.getProvider());
    service.setLabel(databaseServiceOffering.getLabel());
    service.setVersion(databaseServiceOffering.getVersion());
    service.setPlan(MYSQL_SERVICE_PLAN);

    connectedClient.createService(service);

    return service;
  }
View Full Code Here

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

    return service;
  }

  private CloudService createMySqlService(String serviceName) {
    CloudService service = new CloudService(CloudEntity.Meta.defaultMeta(), serviceName);
    service.setLabel(MYSQL_SERVICE_LABEL);
    service.setPlan(MYSQL_SERVICE_PLAN);

    connectedClient.createService(service);

    return service;
  }
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.