lister: Unify credentials structure between listers
This becomes a dictionary of key <lister-name>, value a dict of key <instance-name>, value list of dict username/password. Related T1772
This commit is contained in:
parent
d6169c7141
commit
b81621274b
12 changed files with 56 additions and 31 deletions
|
@ -1,4 +1,4 @@
|
|||
# Copyright (C) 2018 the Software Heritage developers
|
||||
# Copyright (C) 2018-2019 the Software Heritage developers
|
||||
# License: GNU General Public License version 3, or any later version
|
||||
# See top-level LICENSE file for more information
|
||||
|
||||
|
@ -28,19 +28,6 @@ class GitLabLister(PageByPageHttpLister):
|
|||
self.PATH_TEMPLATE = '%s&per_page=%s' % (
|
||||
self.PATH_TEMPLATE, per_page)
|
||||
|
||||
@property
|
||||
def ADDITIONAL_CONFIG(self):
|
||||
"""Override additional config as the 'credentials' structure change
|
||||
between the ancestor classes and this class.
|
||||
|
||||
cf. request_params method below
|
||||
|
||||
"""
|
||||
default_config = super().ADDITIONAL_CONFIG
|
||||
# 'credentials' is a dict of (instance, {username, password}) dict
|
||||
default_config['credentials'] = ('dict', {})
|
||||
return default_config
|
||||
|
||||
def request_params(self, identifier):
|
||||
"""Get the full parameters passed to requests given the
|
||||
transport_request identifier.
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue