Export command to list the http services.

For debugging reasons, we should know what services we have registered
in our multi-dir http server.

Conflicts:

	bin/service/web_services.py

bzr revid: p_christ@hol.gr-20100726093334-7074r91i63e4g7jg
This commit is contained in:
P. Christeas 2010-07-26 12:33:34 +03:00
parent 3e8a845903
commit 7d1f26cdd2
2 changed files with 22 additions and 1 deletions

View File

@ -385,7 +385,8 @@ class common(_ObjectService):
logger.notifyChannel("web-service", netsvc.LOG_INFO,'Logout %s from database %s'%(login,db))
return True
elif method in ['about', 'timezone_get', 'get_server_environment',
'login_message','get_stats', 'check_connectivity']:
'login_message','get_stats', 'check_connectivity',
'list_http_services']:
pass
elif method in ['get_available_updates', 'get_migration_scripts', 'set_loglevel']:
passwd = params[0]
@ -567,6 +568,10 @@ GNU Public Licence.
res += netsvc.Server.allStats()
return res
def exp_list_http_services(self):
from service import http_server
return http_server.list_http_services()
def exp_check_connectivity(self):
return bool(sql_db.db_connect('template1'))

16
list-services.sh Executable file
View File

@ -0,0 +1,16 @@
#!/bin/bash
# ADMIN_PASSWD='admin'
method_1() {
cat '-' << EOF
<xml>
<methodCall>
<methodName>list_http_services</methodName>
<params>
</params>
</methodCall>
EOF
}
method_1 | POST -c 'text/xml' http://localhost:8069/xmlrpc/common
#eof