use of com.vmware.photon.controller.model.adapterapi.EndpointConfigRequest.REGION_KEY in project photon-model by vmware.
the class AWSEndpointAdapterService method computeDesc.
private BiConsumer<ComputeDescription, Retriever> computeDesc() {
return (cd, r) -> {
cd.regionId = r.get(REGION_KEY).orElse(null);
cd.zoneId = r.get(ZONE_KEY).orElse(null);
cd.environmentName = ComputeDescription.ENVIRONMENT_NAME_AWS;
List<String> children = new ArrayList<>();
children.add(ComputeType.ZONE.toString());
cd.supportedChildren = children;
cd.instanceAdapterReference = AdapterUriUtil.buildPublicAdapterUri(getHost(), AWSUriPaths.AWS_INSTANCE_ADAPTER);
cd.enumerationAdapterReference = AdapterUriUtil.buildPublicAdapterUri(getHost(), AWSUriPaths.AWS_ENUMERATION_ADAPTER);
cd.powerAdapterReference = AdapterUriUtil.buildPublicAdapterUri(getHost(), AWSUriPaths.AWS_POWER_ADAPTER);
cd.diskAdapterReference = AdapterUriUtil.buildPublicAdapterUri(getHost(), AWSUriPaths.AWS_DISK_ADAPTER);
{
URI statsAdapterUri = AdapterUriUtil.buildPublicAdapterUri(getHost(), AWSUriPaths.AWS_STATS_ADAPTER);
URI costStatsAdapterUri = AdapterUriUtil.buildPublicAdapterUri(getHost(), AWSUriPaths.AWS_COST_STATS_ADAPTER);
cd.statsAdapterReferences = new LinkedHashSet<>();
cd.statsAdapterReferences.add(costStatsAdapterUri);
cd.statsAdapterReferences.add(statsAdapterUri);
cd.statsAdapterReference = statsAdapterUri;
}
};
}
Aggregations