summaryrefslogtreecommitdiff
path: root/src/flufigut.py
diff options
context:
space:
mode:
authorChristian Pointner <equinox@spreadspace.org>2014-10-11 15:26:07 +0200
committerChristian Pointner <equinox@spreadspace.org>2014-10-11 15:26:07 +0200
commitbcb167ffba5e718e796d73dfef1de225b9591e43 (patch)
treebdcf95e87e2ccbd60bacc5eeea48a27870da9d2a /src/flufigut.py
parentfixed decklink template (diff)
also create porter for local duplicates
Diffstat (limited to 'src/flufigut.py')
-rwxr-xr-xsrc/flufigut.py30
1 files changed, 30 insertions, 0 deletions
diff --git a/src/flufigut.py b/src/flufigut.py
index f2ddf90..031987e 100755
--- a/src/flufigut.py
+++ b/src/flufigut.py
@@ -263,6 +263,9 @@ if output_format == 'flumotion':
for cluster in stream.keys():
streamer_cnt = stream[cluster]['count']
port = stream[cluster]['port']
+ localdup = None
+ if 'localdup' in stream[cluster].keys():
+ localdup = stream[cluster]['localdup']
for idx in range(streamer_cnt):
stream_worker = '%s%i'%(cluster, idx+1)
if stream_worker not in worker:
@@ -298,6 +301,33 @@ if output_format == 'flumotion':
},
}
+ if localdup:
+ port = localdup['port']
+ if 'porter' in machines[machine]:
+ if port in machines[machine]['porter']:
+ raise SystemExit("ERROR: porter cannot be created because machine '%s' already uses port %i" % (machine, port))
+ else:
+ machines[machine]['porter'] = {}
+
+ machines[machine]['porter'][port] = {
+ 'socket-path': "porter-%s"%(rand_string()),
+ 'username': rand_string(size=12),
+ 'password': rand_string(size=12),
+ }
+
+ atmosphere['porter-%s-%i'%(machine, port)] = {
+ 'type': "porter",
+ 'desc': "Porter (local-only) for %s on port %i"%(machine, port),
+ 'worker': stream_worker,
+ 'properties': {
+ 'port': port,
+ 'interface': "localhost",
+ 'socket-path': machines[machine]['porter'][port]['socket-path'],
+ 'username': machines[machine]['porter'][port]['username'],
+ 'password': machines[machine]['porter'][port]['password'],
+ },
+ }
+
for mux_name in stream[cluster]['muxes']:
for format in mux[mux_name]['formats'].keys():
for profile in mux[mux_name]['formats'][format]: