comparison sat/plugins/plugin_misc_merge_requests.py @ 2959:989b622faff6

plugins schema, tickets, merge_requests: use serialised data for extra dict + some cosmetic changes
author Goffi <goffi@goffi.org>
date Fri, 14 Jun 2019 12:37:34 +0200
parents b2f323237fce
children ab2696e34d29
comparison
equal deleted inserted replaced
2958:e2cb04b381bb 2959:989b622faff6
77 in_sign='ssiassa{ss}s', out_sign='(asa{ss}aaa{ss})', 77 in_sign='ssiassa{ss}s', out_sign='(asa{ss}aaa{ss})',
78 method=self._get, 78 method=self._get,
79 async=True 79 async=True
80 ) 80 )
81 host.bridge.addMethod("mergeRequestSet", ".plugin", 81 host.bridge.addMethod("mergeRequestSet", ".plugin",
82 in_sign='ssssa{sas}ssa{ss}s', out_sign='s', 82 in_sign='ssssa{sas}ssss', out_sign='s',
83 method=self._set, 83 method=self._set,
84 async=True) 84 async=True)
85 host.bridge.addMethod("mergeRequestsSchemaGet", ".plugin", 85 host.bridge.addMethod("mergeRequestsSchemaGet", ".plugin",
86 in_sign='sss', out_sign='s', 86 in_sign='sss', out_sign='s',
87 method=utils.partial(self._s._getUISchema, 87 method=utils.partial(self._s._getUISchema,
189 parsed_data = yield self.parseData(request_type, request_data) 189 parsed_data = yield self.parseData(request_type, request_data)
190 parsed_patches.append(parsed_data) 190 parsed_patches.append(parsed_data)
191 defer.returnValue((tickets_xmlui, metadata, parsed_patches)) 191 defer.returnValue((tickets_xmlui, metadata, parsed_patches))
192 192
193 def _set(self, service, node, repository, method, values, schema=None, item_id=None, 193 def _set(self, service, node, repository, method, values, schema=None, item_id=None,
194 extra=None, profile_key=C.PROF_KEY_NONE): 194 extra=u"", profile_key=C.PROF_KEY_NONE):
195 client, service, node, schema, item_id, extra = self._s.prepareBridgeSet( 195 client, service, node, schema, item_id, extra = self._s.prepareBridgeSet(
196 service, node, schema, item_id, extra, profile_key) 196 service, node, schema, item_id, extra, profile_key)
197 d = self.set(client, service, node, repository, method, values, schema, 197 d = self.set(client, service, node, repository, method, values, schema,
198 item_id or None, extra, deserialise=True) 198 item_id or None, extra, deserialise=True)
199 d.addCallback(lambda ret: ret or u'') 199 d.addCallback(lambda ret: ret or u'')