File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1+ import base64
12import requests
23from typing import List , Dict
34from requests_toolbelt import user_agent
89class ManagerAPI (object ):
910
1011 def __init__ (self ):
12+ token = base64 .b85encode (b"%s:%s" % (
13+ settings .WORKFLOW_MANAGER_ACCESS_KEY .encode ("utf8" ),
14+ settings .WORKFLOW_MANAGER_SECRET_KEY .encode ("utf8" ),
15+ )).decode ("utf8" )
1116 self .headers = {
12- 'Content-Type' : 'application/json' ,
13- 'Authorization' : 'token %s' % settings . WORKFLOW_MANAGER_TOKEN ,
14- 'User-Agent' : user_agent ('Drycc Controller ' , drycc_version )
17+ 'Content-Type' : 'application/json' ,
18+ 'Authorization' : 'token %s' % token ,
19+ 'User-Agent' : user_agent ('Drycc Controller ' , drycc_version )
1520 }
1621
1722 def requests (self , method , url , ** kwargs ):
Original file line number Diff line number Diff line change 477477
478478# Workflow-manager Configuration Options
479479WORKFLOW_MANAGER_URL = os .environ .get ('DRYCC_WORKFLOW_MANAGER_URL' , None )
480- WORKFLOW_MANAGER_TOKEN = os .environ .get ('DRYCC_WORKFLOW_MANAGER_TOKEN' , None )
480+ WORKFLOW_MANAGER_ACCESS_KEY = os .environ .get ('WORKFLOW_MANAGER_ACCESS_KEY' , None )
481+ WORKFLOW_MANAGER_SECRET_KEY = os .environ .get ('WORKFLOW_MANAGER_SECRET_KEY' , None )
You can’t perform that action at this time.
0 commit comments