7
by James Page
Refactoring, support for multicast cluster, testing hooks |
1 |
<%
|
2 |
import subprocess
|
|
3 |
import json
|
|
4 |
||
5 |
cmd = [ 'relation-list' ]
|
|
6 |
members = subprocess.check_output(cmd).strip().split('\n')
|
|
7 |
%>
|
|
8 |
#for $unit in $members |
|
9 |
<%
|
|
10 |
cmd = [ 'relation-get' , '--format', 'json', '-', unit ]
|
|
11 |
rconfig = json.loads(subprocess.check_output(cmd))
|
|
12 |
%>
|
|
13 |
<Member className="org.apache.catalina.tribes.membership.StaticMember"
|
|
14 |
port="4000"
|
|
15 |
securePort="-1"
|
|
16 |
host="$rconfig['private-address']" |
|
17 |
domain="$rconfig.clustername" |
|
18 |
uniqueId="$rconfig.uniqueid"/> |
|
19 |
#end for |