Skip to content

Commit

Permalink
save topology template after applying features
Browse files Browse the repository at this point in the history
  • Loading branch information
lharzenetter committed May 29, 2019
1 parent d521db2 commit 0c09cad
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -278,7 +278,8 @@ public static TTopologyTemplate applyFeaturesForTopology(TTopologyTemplate topol
PropertyDefinitionKVList definedProperties = generatedNodeType.getWinerysPropertiesDefinition().getPropertyDefinitionKVList();

// todo: think about moving this code to a separate ModelUtilities method.
Map<String, String> kvProperties = Objects.nonNull(nodeTemplate.getProperties().getKVProperties())
Map<String, String> kvProperties = Objects.nonNull(nodeTemplate.getProperties())
&& Objects.nonNull(nodeTemplate.getProperties().getKVProperties())
? nodeTemplate.getProperties().getKVProperties()
: new HashMap<>();
if (kvProperties.isEmpty()) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -366,6 +366,10 @@ public TTopologyTemplate applyAvailableFeatures(ArrayList<AvailableFeaturesApiDa
}
});

return EnhancementUtils.applyFeaturesForTopology(this.topologyTemplate, featureMap);
TTopologyTemplate enrichedTopology = EnhancementUtils.applyFeaturesForTopology(this.topologyTemplate, featureMap);
this.parent.setTopology(enrichedTopology, this.type);
RestUtils.persist(this.parent);

return enrichedTopology;
}
}

0 comments on commit 0c09cad

Please sign in to comment.