use of alien4cloud.paas.model.PaaSNodeTemplate in project yorc-a4c-plugin by ystia.
the class MappingTosca method quoteProperties.
public static void quoteProperties(final PaaSTopologyDeploymentContext ctx) {
PaaSTopology ptopo = ctx.getPaaSTopology();
for (PaaSNodeTemplate node : ptopo.getAllNodes().values()) {
NodeTemplate nt = node.getTemplate();
Map<String, AbstractPropertyValue> ntProperties = nt.getProperties();
for (String prop : ntProperties.keySet()) {
AbstractPropertyValue absval = ntProperties.get(prop);
if (absval instanceof ScalarPropertyValue) {
ScalarPropertyValue scaval = (ScalarPropertyValue) absval;
if (scaval.getValue().contains("\"")) {
scaval.setValue(scaval.getValue().replace("\"", "\\\""));
}
log.debug("Property: " + prop + "=" + ((ScalarPropertyValue) nt.getProperties().get(prop)).getValue());
}
}
}
}
Aggregations