turn off server verification in testapiserver
authorThierry Parmentelat <thierry.parmentelat@inria.fr>
Wed, 16 Dec 2015 08:25:02 +0000 (09:25 +0100)
committerThierry Parmentelat <thierry.parmentelat@inria.fr>
Wed, 16 Dec 2015 08:25:02 +0000 (09:25 +0100)
system/TestApiserver.py
system/TestUser.py
system/TestUserSfa.py

index 91f26b1..3ccdb3d 100644 (file)
@@ -4,6 +4,7 @@
 # wrapper to xmlrpc server, that support dry-run commands
 # we dont want to have to depend on PLCAPI, so:
 import xmlrpc.client
+import ssl
 
 # the default value is for the dry run mode
 server_methods = [ ('GetNodes', []),
@@ -79,7 +80,8 @@ class TestApiserver:
 
     def __init__(self, url, dry_run=False):
         self.apiserver = xmlrpc.client.ServerProxy(url, allow_none=True,
-                                                   use_builtin_types=True)
+                                                   use_builtin_types=True,
+                                                   context=ssl._create_unverified_context())
         self.dry_run = dry_run
         for method, defaults in server_methods:
             setattr(self, method, TestApiserver.Callable(self.apiserver, dry_run, method, defaults))
index 0118f32..9a777c4 100644 (file)
@@ -2,7 +2,6 @@
 # Copyright (C) 2010 INRIA 
 #
 import os, sys, time
-import xmlrpc.client
 
 import utils
 
index 7fb08c5..28762c9 100644 (file)
@@ -2,7 +2,6 @@
 # Copyright (C) 2010 INRIA 
 #
 import os, sys, time
-import xmlrpc.client
 
 import utils