import org.openecomp.sdc.be.datatypes.elements.OperationDataDefinition;
import org.openecomp.sdc.be.datatypes.elements.OperationInputDefinition;
import org.openecomp.sdc.be.datatypes.elements.PropertyDataDefinition;
+import org.openecomp.sdc.be.datatypes.elements.SchemaDefinition;
import org.openecomp.sdc.be.model.InputDefinition;
import org.openecomp.sdc.be.model.InterfaceDefinition;
import org.openecomp.sdc.be.model.operations.impl.UniqueIdBuilder;
propertyDef.setName(k);
propertyDef.setType(type.getType());
propertyDef.setValue(v.toString());
+ if (type.equals(ToscaPropertyType.LIST)) {
+ Gson gson = new Gson();
+ propertyDef.setValue(gson.toJson(v));
+ PropertyDataDefinition pdd = new PropertyDataDefinition();
+ pdd.setType("string");
+ SchemaDefinition sd = new SchemaDefinition();
+ sd.setProperty(pdd);
+ propertyDef.setSchema(sd);
+ }
artifactDataDefinition.addProperty(propertyDef);
}
});
}
}
+
+ if (operationDefinitionMap.get(IMPLEMENTATION.getElementName()) instanceof Map &&
+ ((Map) operationDefinitionMap.get(IMPLEMENTATION.getElementName())).containsKey("timeout")) {
+ final Object timeOut = ((Map) operationDefinitionMap.get(IMPLEMENTATION.getElementName())).get("timeout");
+ artifactDataDefinition.setTimeout((Integer)timeOut);
+ }
+
if (operationDefinitionMap.get(IMPLEMENTATION.getElementName()) instanceof String) {
final String implementation = (String) operationDefinitionMap.get(IMPLEMENTATION.getElementName());
artifactDataDefinition.setArtifactName(generateArtifactName(implementation));
if (value instanceof Float || value instanceof Double) {
return ToscaPropertyType.FLOAT;
}
+ if (value instanceof List) {
+ return ToscaPropertyType.LIST;
+ }
return null;
}