gitlab.lister: Remove request_params method override
This should have been removed along with the code inb816212
. The request authentication has been reworked so that all listers use the same credentials dict. Relatedb816212
Related T1772
This commit is contained in:
parent
72e208aeed
commit
ecdce4b0cc
1 changed files with 0 additions and 29 deletions
|
@ -2,7 +2,6 @@
|
|||
# License: GNU General Public License version 3, or any later version
|
||||
# See top-level LICENSE file for more information
|
||||
|
||||
import random
|
||||
import time
|
||||
from urllib3.util import parse_url
|
||||
|
||||
|
@ -28,34 +27,6 @@ class GitLabLister(PageByPageHttpLister):
|
|||
self.PATH_TEMPLATE = '%s&per_page=%s' % (
|
||||
self.PATH_TEMPLATE, per_page)
|
||||
|
||||
def request_params(self, identifier):
|
||||
"""Get the full parameters passed to requests given the
|
||||
transport_request identifier.
|
||||
|
||||
For the gitlab lister, the 'credentials' entries is configured
|
||||
per instance. For example::
|
||||
|
||||
- credentials:
|
||||
- gitlab.com:
|
||||
- username: user0
|
||||
password: <pass>
|
||||
- username: user1
|
||||
password: <pass>
|
||||
- ...
|
||||
- other-gitlab-instance:
|
||||
...
|
||||
|
||||
"""
|
||||
params = {
|
||||
'headers': self.request_headers() or {}
|
||||
}
|
||||
creds_lister = self.config['credentials'].get(self.instance)
|
||||
if creds_lister:
|
||||
auth = random.choice(creds_lister)
|
||||
if auth:
|
||||
params['auth'] = (auth['username'], auth['password'])
|
||||
return params
|
||||
|
||||
def uid(self, repo):
|
||||
return '%s/%s' % (self.instance, repo['path_with_namespace'])
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue