Compare commits

...

No commits in common. "modified_script" and "master" have entirely different histories.

8 changed files with 9 additions and 15 deletions

View File

View File

View File

View File

View File

View File

View File

View File

@ -50,21 +50,17 @@ def put_request(url, headers,body):
return response
def CreateToken(DTAPIToken, DTENV,nwzone, dtEnvInfo, tokenname,scope):
env = DTENV
DTAPIToken = DTAPIToken
DTAPIURL = env + "/api/v2/apiTokens"
headers = {
'Content-Type': 'application/json',
'Authorization': 'Api-Token ' + DTAPIToken
}
DynatraceInstaller = [
"InstallerDownload",
"SupportAlert"
]
DevOps_Read = [
"DataExport", # Access problem and event feed, metrics, and topology.
"DTAQLAccess", # User sessions.
@ -77,7 +73,6 @@ def CreateToken(DTAPIToken, DTENV,nwzone, dtEnvInfo, tokenname,scope):
"releases.read", # Read releases.
"activeGates.read"
]
ReadAll = [
"DataExport", # Access problem and event feed, metrics, and topology.
"ReadConfig", # Read configuration.
@ -118,7 +113,6 @@ def CreateToken(DTAPIToken, DTENV,nwzone, dtEnvInfo, tokenname,scope):
r = post_request(DTAPIURL,headers,data)
print(r)
row = {'Environment':dtEnvInfo,'DT_API_URL':env +"/api", 'DT_[API|PAAS]_TOKEN':r.json()['token'],'DT_NETWORK_ZONE':nwzone}
return row
#################