From 7d1f26cdd286bb13f05827446955a9391b731fc6 Mon Sep 17 00:00:00 2001 From: "P. Christeas" Date: Mon, 26 Jul 2010 12:33:34 +0300 Subject: [PATCH] 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 --- bin/service/web_services.py | 7 ++++++- list-services.sh | 16 ++++++++++++++++ 2 files changed, 22 insertions(+), 1 deletion(-) create mode 100755 list-services.sh diff --git a/bin/service/web_services.py b/bin/service/web_services.py index 19b178c7caa..1a710708810 100644 --- a/bin/service/web_services.py +++ b/bin/service/web_services.py @@ -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')) diff --git a/list-services.sh b/list-services.sh new file mode 100755 index 00000000000..a90e58479d5 --- /dev/null +++ b/list-services.sh @@ -0,0 +1,16 @@ +#!/bin/bash + +# ADMIN_PASSWD='admin' +method_1() { + cat '-' << EOF + + + list_http_services + + + +EOF +} + +method_1 | POST -c 'text/xml' http://localhost:8069/xmlrpc/common +#eof