From 5f03119b3bc1f16e68dd805c4b5773ba1ee7148e Mon Sep 17 00:00:00 2001 From: =?utf8?q?Jordan=20Aug=C3=A9?= Date: Tue, 29 Oct 2013 17:58:07 +0100 Subject: [PATCH] updated manifold API to support the move to SSL for the backend --- manifold/manifoldapi.py | 6 +++++- manifold/metadata.py | 3 ++- myslice/config.py | 6 +++--- myslice/myslice.ini.localhost | 2 +- 4 files changed, 11 insertions(+), 6 deletions(-) diff --git a/manifold/manifoldapi.py b/manifold/manifoldapi.py index 35fd3d74..f23ba20c 100644 --- a/manifold/manifoldapi.py +++ b/manifold/manifoldapi.py @@ -55,7 +55,11 @@ class ManifoldAPI: try: if debug: print "====> ManifoldAPI.%s"%methodName,"auth",self.auth,"args",args,"kwds",kwds - result=getattr(self.server, methodName)(self.auth, *args, **kwds) + annotations = { + 'authentication': self.auth + } + args += (annotations,) + result=getattr(self.server, methodName)(*args, **kwds) if debug: print '<==== backend call %s(*%s,**%s) returned'%(methodName,args,kwds), print '.ctd. Authmethod=',self.auth['AuthMethod'], self.url,'->', diff --git a/manifold/metadata.py b/manifold/metadata.py index 420821c8..4fbbc066 100644 --- a/manifold/metadata.py +++ b/manifold/metadata.py @@ -34,7 +34,8 @@ class MetaData: # 'column.resource_type', 'column.value_type', # 'column.allowed_values', 'column.platforms.platform', # 'column.platforms.platform_url'] - result = manifold_api.Get({ + result = manifold_api.forward({ + 'action': 'get', 'object': 'local:object', # proposed to replace metadata:table 'fields': fields }) diff --git a/myslice/config.py b/myslice/config.py index 53295c4a..04f4aaf8 100644 --- a/myslice/config.py +++ b/myslice/config.py @@ -18,10 +18,10 @@ class Config(object): # the OpenLab-wide backend as managed by UPMC # xxx production should probably use https of course - default_manifold_url = "http://test.myslice.info:7080/" - # the devel/unstable version runs on "http://dev.myslice.info:7080/" + default_manifold_url = "https://test.myslice.info:7080/" + # the devel/unstable version runs on "https://dev.myslice.info:7080/" # if you use a development backend running on this box, use "http://localhost:7080/" - # the INRIA setup is with "http://manifold.pl.sophia.inria.fr:7080/" + # the INRIA setup is with "https://manifold.pl.sophia.inria.fr:7080/" default_manifold_admin_user = 'admin' default_manifold_admin_password = 'demo' diff --git a/myslice/myslice.ini.localhost b/myslice/myslice.ini.localhost index c22836e9..0467c0ba 100644 --- a/myslice/myslice.ini.localhost +++ b/myslice/myslice.ini.localhost @@ -1,4 +1,4 @@ [manifold] -url = http://localhost:7080 +url = https://localhost:7080 admin_user = admin admin_password = admin -- 2.43.0