summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rwxr-xr-xsrc/flufigut.py6
-rw-r--r--templates/example/http-stream.xml10
-rw-r--r--templates/example/planet.xml2
-rw-r--r--templates/example/worker.xml2
4 files changed, 11 insertions, 9 deletions
diff --git a/src/flufigut.py b/src/flufigut.py
index 923fcb5..ba8c363 100755
--- a/src/flufigut.py
+++ b/src/flufigut.py
@@ -328,7 +328,7 @@ print "generating planet '%s/%s'" % (globals['manager']['machine'], globals['nam
template = env.get_template('planet.xml')
planet = template.render(globals=globals, atmosphere=atmosphere, flow=flow)
-dir = 'output/%s/manager' % globals['manager']['machine']
+dir = 'output/%s/managers/%s/' % (globals['manager']['machine'], globals['name'])
if not os.path.exists(dir):
os.makedirs(dir)
f = open('%s/planet.xml' % (dir), 'w')
@@ -346,13 +346,13 @@ for w in worker:
if w in globals['machines'][machine]:
machine_name = machine
break
- print "generating config for worker '%s/%s'" % (machine_name, w)
+ print "generating worker '%s/%s'" % (machine_name, w)
password = rand_string(12)
template = env.get_template('worker.xml')
ports = "%i-%i" % (port, port+1)
port+=2
workerconf = template.render(globals=globals, name=w, password=password, portrange=ports)
- dir = 'output/%s/worker' % machine
+ dir = 'output/%s/workers' % machine
if not os.path.exists(dir):
os.makedirs(dir)
f = open('%s/%s.xml' % (dir, w), 'w')
diff --git a/templates/example/http-stream.xml b/templates/example/http-stream.xml
index 8027b9f..561097a 100644
--- a/templates/example/http-stream.xml
+++ b/templates/example/http-stream.xml
@@ -7,10 +7,12 @@
<eater name="default">
<feed alias="default">{{ component.feeder }}</feed>
</eater>
- <plug socket="flumotion.component.plugs.rrd.ComponentRRDPlug" type="component-rrd">
- <property name="clients-connected-file">{{ component.rrd_clients }}</property>
- <property name="bytes-transferred-file">{{ component.rrd_bytes }}</property>
- </plug>
+ <plugs>
+ <plug socket="flumotion.component.plugs.rrd.ComponentRRDPlug" type="component-rrd">
+ <property name="clients-connected-file">{{ component.rrd_clients }}</property>
+ <property name="bytes-transferred-file">{{ component.rrd_bytes }}</property>
+ </plug>
+ </plugs>
%% for name, value in component.properties.items()
%% if name != 'samplerate'
<property name="{{ name }}">{{ value }}</property>
diff --git a/templates/example/planet.xml b/templates/example/planet.xml
index 6c6b4bb..454b1bb 100644
--- a/templates/example/planet.xml
+++ b/templates/example/planet.xml
@@ -4,7 +4,7 @@
<manager name="{{ globals.name }}">
%% for name, value in globals.manager.items()
%% if name != 'machine'
- <property name="{{ name }}">{{ value }}</property>
+ <{{ name }}>{{ value }}</{{ name }}>
%% endif
%% endfor
<component name="manager-bouncer" type="htpasswdcrypt-bouncer">
diff --git a/templates/example/worker.xml b/templates/example/worker.xml
index cd9ee5c..b6f4667 100644
--- a/templates/example/worker.xml
+++ b/templates/example/worker.xml
@@ -14,7 +14,7 @@
</authentication>
<feederports>{{ portrange }}</feederports>
-%% if debug != ''
+%% if debug and debug != ''
<debug>{{ debug }}</debug>
%% endif
</worker>