1 # a utility for testing xmlrpclib URL's
4 auth={'AuthMethod':'password','Username':'root@test.onelab.eu','AuthString':'test++'}
9 hostname="%s.pl.sophia.inria.fr"%host
10 ip=socket.gethostbyname(hostname)
15 def try_url (url,xmlrpclib_verbose=False):
17 xmlrpclib.ServerProxy (url, verbose=xmlrpclib_verbose, allow_none=True).GetNodes(auth)
19 except xmlrpclib.ProtocolError as e:
20 print '... (http error %s)'%e.errcode,url
21 except Exception as e:
22 print '---',type(e).__name__,url
23 if verbose: traceback.print_exc()
26 for protocol in ['http','https']:
27 for dest in [ hostname, ip ]:
28 for port in [ '',':80',':443']:
29 # for port in [ ':80',':443']:
30 for path in ['PLCAPI','PLCAPI/']:
31 if protocol=='http' and port==':443': continue
32 if protocol=='https' and port==':80': continue
33 url="%s://%s%s/%s"%(protocol,dest,port,path)