50 |
COMMAND_OPTIONS = [ |
COMMAND_OPTIONS = [ |
51 |
[ 'rpctype',None,'rpc-type',1,None, 'type', |
[ 'rpctype',None,'rpc-type',1,None, 'type', |
52 |
_('Set the GNURPC connection type. The currently supported values ')+ |
_('Set the GNURPC connection type. The currently supported values ')+ |
53 |
_("for <type> are 'xmlrpc' and 'pw_xmlrpc'. For more information on ")+ |
_("for <type> are 'xmlrpc','xmlrpc.py_xmlrpc' and 'xmlrpc.pw_xmlrpc'.")+ |
54 |
_('GNURPC connection types have a look at ')+ |
_("For more information on GNURPC connection types have a look at ")+ |
55 |
_('common/doc/RPC-abstraction. ')], |
_('common/doc/RPC-abstraction. ')], |
56 |
[ 'rpcport',None,'rpc-port',1,None, 'port', |
[ 'rpcport',None,'rpc-port',1,None, 'port', |
57 |
_('Set the GNURPC port. For more information on ')+ |
_('Set the GNURPC port. For more information on ')+ |
106 |
def phaseInit (self): |
def phaseInit (self): |
107 |
rpctype = gConfig ("rpctype") |
rpctype = gConfig ("rpctype") |
108 |
|
|
109 |
if rpctype == "xmlrpc": |
if rpctype in ('xmlrpc','xmlrpc.pw_xmlrpc','xmlrpc.py_xmlrpc'): |
110 |
port = gConfig ("rpcport") |
port = gConfig ("rpcport") |
111 |
print "Exporting our services via xmlrpc (port %s) ..." % port |
print "Exporting our services via %s (port %s) ..." % (rpctype,port) |
|
self.setTransports ({'xmlrpc': |
|
|
{'port': int (port), |
|
|
'allowed_hosts': gConfig ('allowed_hosts')}}) |
|
|
|
|
|
elif rpctype == "pw_xmlrpc": |
|
|
port = gConfig ("rpcport") |
|
|
print "Exporting our services via pw_xmlrpc (port %s) ..." % port |
|
112 |
params = {'port': int (port), |
params = {'port': int (port), |
113 |
'allowed_hosts': gConfig ('allowed_hosts')} |
'allowed_hosts': gConfig ('allowed_hosts')} |
114 |
|
|
117 |
'/status': self.htmlStatus} |
'/status': self.htmlStatus} |
118 |
params.update ({'httpbind': httpbind}) |
params.update ({'httpbind': httpbind}) |
119 |
|
|
120 |
self.setTransports({'pw_xmlrpc': params}) |
self.setTransports({rpctype: params}) |
121 |
|
|
122 |
elif rpctype == "sockets": |
elif rpctype == "sockets": |
123 |
# Sockets not working yet |
# Sockets not working yet |