X-Git-Url: http://git.onelab.eu/?a=blobdiff_plain;f=system%2FTestApiserver.py;h=3ccdb3da2021ca22ad00cc803de874c3cb11e793;hb=01223f097c1f78208b6935fc0eab0915da5dc1b6;hp=708e20e0d6763ae7e462b69bbe501d3cf7364ac1;hpb=8666ae7f0291e8d115e166ef555f02abafc40fc8;p=tests.git diff --git a/system/TestApiserver.py b/system/TestApiserver.py index 708e20e..3ccdb3d 100644 --- a/system/TestApiserver.py +++ b/system/TestApiserver.py @@ -4,11 +4,14 @@ # 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' , []), - ('AddNode' , True), +server_methods = [ ('GetNodes', []), + ('AddNode', True), ('SetNodePlainBootstrapfs', True), + ('SetNodeFcdistro', True), + ('SetNodePldistro', True), ('DeleteNode' , True), ('UpdateNode' , True), ('AddInterface' , True), @@ -18,7 +21,7 @@ server_methods = [ ('GetNodes' , []), ('GetTagTypes' , []), ('AddTagType' , True), ('AddInterfaceTag' , True), - ('GetBootMedium' , True), + ('GetBootMedium' , "some non-empty-string"), ('GetNodeGroups' , True), ('AddNodeGroup' , True), ('DeleteNodeGroup', True), @@ -52,6 +55,7 @@ server_methods = [ ('GetNodes' , []), ('GetConfFiles',[]), ('AddConfFile','True'), ('GetSliceTags',[]), + ('GetNodeFlavour','dry-run-nodeflavour'), ('system.listMethods',[]), ] @@ -76,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))