X-Git-Url: http://git.onelab.eu/?a=blobdiff_plain;f=manifold%2Fmetadata.py;h=90a09eab1401251c6d122abe9e84d732ea359019;hb=ed42b26f72f3b30653630b5e2302f724bb727dad;hp=420821c8c86261a4b0971411f9cdeae8c7fc89be;hpb=91504f162f13c13d8b22a56af3178c84e592d093;p=myslice.git diff --git a/manifold/metadata.py b/manifold/metadata.py index 420821c8..90a09eab 100644 --- a/manifold/metadata.py +++ b/manifold/metadata.py @@ -27,23 +27,29 @@ class MetaData: except: print "metadata.work_offline: failed to decode %s"%offline_filename manifold_api = ManifoldAPI(self.auth) - fields = ['table', 'column.name', 'column.qualifier', 'column.type', 'column.is_array', 'column.description', 'column.default', 'key', 'capability'] + fields = ['table', 'column.name', 'column.qualifier', 'column.type', + 'column.is_array', 'column.description', 'column.default', 'key', 'capability'] #fields = ['table', 'column.column', # 'column.description','column.header', 'column.title', # 'column.unit', 'column.info_type', # 'column.resource_type', 'column.value_type', # 'column.allowed_values', 'column.platforms.platform', # 'column.platforms.platform_url'] - result = manifold_api.Get({ - 'object': 'local:object', # proposed to replace metadata:table - 'fields': fields - }) + request={ 'action': 'get', + 'object': 'local:object', # proposed to replace metadata:table + 'fields': fields , + } + result = manifold_api.forward(request) + # xxx need a way to export error messages to the UI if result['code'] == 1: # warning - messages.warning(request, result['description']) + # messages.warning(request, result['description']) + print ("METADATA WARNING -",request,result['description']) elif result['code'] == 2: - messages.error(request, result['description']) + # messages.error(request, result['description']) + print ("METADATA ERROR -",request,result['description']) # XXX FAIL HERE XXX + return rows = result.ok_value() # API errors will be handled by the outer logic