Commit 10ad9717 authored by Jérome Perrin's avatar Jérome Perrin

do not prepend dream.plugins to plugin names.

What we could imagine is a name registry mapping short friendly names to
full dotted names.
parent 7d72ea8a
...@@ -139,23 +139,13 @@ def _runSimulation(parameter_dict): ...@@ -139,23 +139,13 @@ def _runSimulation(parameter_dict):
app.logger.error(tb) app.logger.error(tb)
return dict(error=tb) return dict(error=tb)
def getPluginNames(list):
plugin_name_list = []
plugins = list["plugin_list"]
for i in xrange(len(plugins)):
klass_name = plugins[i]["plugin"]
klass_name = "dream.plugins.%s" % klass_name
plugin_name_list.append(klass_name)
return plugin_name_list
def getPluginRestistry(data): def getPluginRestistry(data):
# input plugins # input plugins
input_plugin_list = getPluginNames(data["application_configuration"]["preprocessing"]) input_plugin_list = data["application_configuration"]["preprocessing_plugin_list"]
# output plugins # output plugins
output_plugin_list = getPluginNames(data["application_configuration"]["postprocessing"]) output_plugin_list = data["application_configuration"]["postprocessing_plugin_list"]
# executor plugin # executor plugin
executor_name = data["application_configuration"]["processing"]["plugin_list"][0]["plugin"] executor_name = data["application_configuration"]["processing_plugin"] # XXX default value ?
executor_name = "dream.plugins.%s" % executor_name
# remove the executor plugin from the input plugins list # remove the executor plugin from the input plugins list
registry = PluginRegistry(logger=app.logger, registry = PluginRegistry(logger=app.logger,
input_preparation_class_list=input_plugin_list, input_preparation_class_list=input_plugin_list,
......
...@@ -785,28 +785,24 @@ ...@@ -785,28 +785,24 @@
"gadget": "Output_viewDebugJson" "gadget": "Output_viewDebugJson"
} }
}, },
"preprocessing": { "preprocessing_plugin_list": [
"plugin_list": [
{ {
"plugin": "PartJobShop", "plugin": "dream.plugins.Debug.Debug",
"input_id": "Simulation" "argument": "Argument Value"
}
]
}, },
"processing": {
"plugin_list": [
{ {
"plugin": "ACO" "plugin": "dream.plugins.OldStylePartJobShopWIP.OldStylePartJobShopWIP",
"input_id": "Simulation"
} }
] ],
"processing_plugin": {
"plugin": "ACO"
}, },
"postprocessing": { "postprocessing_plugin_list": [
"plugin_list": [
{ {
"plugin": "CalculateConfidenceIntervals" "plugin": "CalculateConfidenceIntervals"
} }
] ],
},
"general": { "general": {
"properties": { "properties": {
"numberOfReplications": { "numberOfReplications": {
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment