本文整理汇总了Java中org.springframework.cloud.servicebroker.model.ServiceDefinition.getMetadata方法的典型用法代码示例。如果您正苦于以下问题:Java ServiceDefinition.getMetadata方法的具体用法?Java ServiceDefinition.getMetadata怎么用?Java ServiceDefinition.getMetadata使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类org.springframework.cloud.servicebroker.model.ServiceDefinition
的用法示例。
在下文中一共展示了ServiceDefinition.getMetadata方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: createBlueprint
import org.springframework.cloud.servicebroker.model.ServiceDefinition; //导入方法依赖的package包/类
@VisibleForTesting
public String createBlueprint(ServiceDefinition serviceDefinition, CreateServiceInstanceRequest request) {
String location = "localhost"; // default
Plan selectedPlan = null;
for(Plan p : serviceDefinition.getPlans()){
if(p.getId().equals(request.getPlanId())){
selectedPlan = p;
}
}
Map<String, Object> metadata = serviceDefinition.getMetadata();
String brooklynCatalogId = (String) metadata.get("brooklynCatalogId");
String blueprint = ((BlueprintPlan)selectedPlan).toBlueprint(brooklynCatalogId, location, request);
LOG.info("launching from blueprint: [blueprint={}]", blueprint);
return blueprint;
}
开发者ID:cloudfoundry-incubator,项目名称:apache-brooklyn-service-broker,代码行数:17,代码来源:BrooklynServiceInstanceService.java
示例2: toSuffixedServiceDefinition
import org.springframework.cloud.servicebroker.model.ServiceDefinition; //导入方法依赖的package包/类
private ServiceDefinition toSuffixedServiceDefinition(ServiceDefinition serviceDefinition) {
return new ServiceDefinition(withSuffix(serviceDefinition.getId(), serviceOfferingSuffix),
withSuffix(serviceDefinition.getName(), serviceOfferingSuffix),
serviceDefinition.getDescription(),
serviceDefinition.isBindable(),
serviceDefinition.isPlanUpdateable(),
serviceDefinition.getPlans()
.stream()
.map(this::toPlan)
.collect(Collectors.toList()),
serviceDefinition.getTags(),
serviceDefinition.getMetadata(),
serviceDefinition.getRequires(),
serviceDefinition.getDashboardClient());
}
示例3: testEcsBucketMetadata
import org.springframework.cloud.servicebroker.model.ServiceDefinition; //导入方法依赖的package包/类
@Test
public void testEcsBucketMetadata() {
ServiceDefinition ecsBucketService = catalog.getServiceDefinitions()
.get(1);
Map<String, Object> metadata = ecsBucketService.getMetadata();
testServiceDefinitionMetadata(metadata, "ecs-bucket",
"http://www.emc.com/images/products/header-image-icon-ecs.png",
"Dell EMC", "https://community.emc.com/docs/DOC-45012",
"http://www.emc.com/products-solutions/trial-software-download/ecs.htm");
}