use of com.vmware.photon.controller.model.adapters.awsadapter.AWSConstants.STORAGE_TYPE_EBS in project photon-model by vmware.
the class AWSCostStatsService method queryVolumes.
protected void queryVolumes(AWSCostStatsCreationContext statsData, AWSCostStatsCreationStages nextStage, AWSCostStatsCreationSubStage nextSubStage) {
Set<String> endpointLinks = statsData.awsAccountIdToComputeStates.values().stream().flatMap(// flatten collection of lists to single list
List::stream).flatMap(e -> e.endpointLinks.stream()).collect(// extract endpointLinks of all accounts
Collectors.toSet());
List<String> supportedStorageTypes = Arrays.asList(STORAGE_TYPE_EBS, STORAGE_TYPE_S3);
Query query = Query.Builder.create().addKindFieldClause(DiskState.class).addInCollectionItemClause(DiskState.FIELD_NAME_ENDPOINT_LINKS, endpointLinks, Occurance.MUST_OCCUR).addInClause(DiskState.FIELD_NAME_STORAGE_TYPE, supportedStorageTypes).build();
populateAwsResources(query, statsData, nextStage, nextSubStage);
}
Aggregations