- return { "command": "addnode"
- # TODO: spec is required to be a json string but runtime api
- # changing this soon hopefully
- , "payload": { "component_spec": json.dumps(c["spec"])
- , "component_id": c["id"]
- , "name": c["name"]
- , "processor": p }
- }
-
- ps = [ parse_processor(p) for p in flow["flowContents"]["processors"] ]
- cs = [ parse_connection(c) for c in flow["flowContents"]["connections"] ]
- return ps+cs
+ return {
+ "command": "addnode"
+ # TODO: spec is required to be a json string but runtime api
+ # changing this soon hopefully
+ ,
+ "payload": {
+ "component_spec": json.dumps(c["spec"]),
+ "component_id": c["id"],
+ "name": c["name"],
+ "processor": p,
+ },
+ }