From bf9985019a4e92ccc5b99999e2de3a021db79f27 Mon Sep 17 00:00:00 2001 From: Christian Pointner Date: Sat, 29 Sep 2012 11:32:12 +0200 Subject: no more useless data --- src/flufigut.py | 22 ++++++++++++---------- 1 file changed, 12 insertions(+), 10 deletions(-) (limited to 'src') 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")) -- cgit v1.2.3