Package org.cloudfoundry.client.lib.domain

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


  private List<CloudServiceOffering> getServiceOfferings(String label) {
    Assert.notNull(label, "Service label must not be null");
    List<Map<String, Object>> resourceList = getAllResources("/v2/services?inline-relations-depth=1", null);
    List<CloudServiceOffering> results = new ArrayList<CloudServiceOffering>();
    for (Map<String, Object> resource : resourceList) {
      CloudServiceOffering cloudServiceOffering =
          resourceMapper.mapResource(resource, CloudServiceOffering.class);
      if (cloudServiceOffering.getLabel() != null && label.equals(cloudServiceOffering.getLabel())) {
        results.add(cloudServiceOffering);
      }
    }
    return results;
  }
View Full Code Here


  }

  @Test
  public void testServiceConfigurationsToCommaDelimitedString() {
    List<CloudServiceOffering> list = new ArrayList<CloudServiceOffering>();
    list.add(new CloudServiceOffering(null, "mysql", "vendor", "version"));

    Assert.assertEquals(CommonUtils.serviceOfferingsToCommaDelimitedString(list), "mysql");

    list.add(new CloudServiceOffering(null, "mysql", "vendor", "version"));
    Assert.assertEquals(CommonUtils.serviceOfferingsToCommaDelimitedString(list), "mysql, mysql");
  }
View Full Code Here

TOP

Related Classes of org.cloudfoundry.client.lib.domain.CloudServiceOffering

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.