summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rwxr-xr-xsrc/flufigut.py22
1 files changed, 12 insertions, 10 deletions
diff --git a/src/flufigut.py b/src/flufigut.py
index 6a8da24..a832518 100755
--- a/src/flufigut.py
+++ b/src/flufigut.py
@@ -51,7 +51,8 @@ cf.close();
### initialization ##############################################
#
-data = { 'globals' : config['globals'], 'atmosphere' : {}, 'flow' : {} }
+atmosphere = {}
+flow = {}
machines = {}
### generate porter for all streamer/machines ###################
@@ -80,7 +81,7 @@ for streamer in config['streamer']:
'password': rand_string(size=12),
}
- data['atmosphere']['porter-%s-%i'%(machine, port)] = {
+ atmosphere['porter-%s-%i'%(machine, port)] = {
'type': "porter",
'desc': "Porter for %s on port %i"%(machine, port),
'worker': worker,
@@ -97,29 +98,30 @@ for streamer in config['streamer']:
idx+=1
### generate input components ###################################
-data['flow']['input'] = {}
-
+flow['input'] = {}
+# TODO
### generate encoder components #################################
-# TODO
-data['flow']['encoder'] = {}
+flow['encoder'] = {}
+# TODO
### generate muxer components ###################################
+flow['muxer'] = {}
+
# TODO
-data['flow']['muxer'] = {}
### generate streamer components ################################
-# TODO
-data['flow']['streamer'] = {}
+flow['streamer'] = {}
+# TODO
### initialize and render templates #############################
#
env = Environment(loader=FileSystemLoader('../templates/%s/' % (sys.argv[1])))
template = env.get_template('planet.xml')
-planet = template.render(globals=data['globals'], atmosphere=data['atmosphere'], flow=data['flow'])
+planet = template.render(globals=config['globals'], atmosphere=atmosphere, flow=flow)
sys.stdout.write(planet.encode("utf8"))