+ private void addChildren(AAITreeNode node, Future<List<AAITreeNode>> children) {
+ try {
+ node.addChildren(children.get());
+ } catch (Exception e) {
+ node.getChildren().add(createFailureNode(e));
+ }
+ }
+
+ private Map<String,String> convertRelationshipDataToMap(List<RelationshipData> relationshipData) {
+ return relationshipData.stream().collect(
+ Collectors.toMap(RelationshipData::getKey, RelationshipData::getValue));
+ }
+
+ void enrichPlacementData(AAITreeNode node){
+ Optional<Relationship> tenantRelationShip = AAITreeNodeUtils.findFirstRelationshipByRelatedTo(node.getRelationshipList(), "tenant");
+ enrichPlacementDataUsingTenantInfo(node, tenantRelationShip);
+ }
+
+ void enrichPlacementDataUsingTenantInfo(AAITreeNode node, Optional<Relationship> tenantRelationShip) {
+ //no tenant relationship in this node - so no placement data
+ if (!tenantRelationShip.isPresent()) {
+ return;
+ }
+ try {
+ Map<String, String> relationshipsDataMap = convertRelationshipDataToMap(tenantRelationShip.get().getRelationDataList());
+ node.setCloudConfiguration(new CloudConfiguration(
+ relationshipsDataMap.get("cloud-region.cloud-region-id"),
+ relationshipsDataMap.get("tenant.tenant-id"),
+ relationshipsDataMap.get("cloud-region.cloud-owner")));
+ }
+ catch (Exception exception) {
+ LOGGER.error("Failed to extract placement form tenant relationship of {}:{}", node.getType(), node.getId(), exception);
+ }
+ }
+
+ private void getRelatedVfModules(ExecutorService threadPool, ConcurrentSkipListSet<AAITreeNode> nodesAccumulator, String parentURL, AAITreeNode parentNode) {