From 33a775dbbd6c99eedb8d0f57e142f827d3403696 Mon Sep 17 00:00:00 2001 From: MOIS3Y Date: Sun, 25 Sep 2022 15:49:44 +0900 Subject: [PATCH] fixed endpoint to get access key DCImanager 6 --- main.py | 9 +-------- 1 file changed, 1 insertion(+), 8 deletions(-) diff --git a/main.py b/main.py index df99848..a701b56 100644 --- a/main.py +++ b/main.py @@ -68,14 +68,7 @@ class Access(object): _dict_: _access key_ """ host = self.input_container - if self.platform == "vm": - url = 'http://{}:1500/auth/v4/user/{}/key'.format( - host, admin['id'] - ) - if self.platform == "dci": - url = 'http://{}:1500/auth/v4/user/{}/key'.format( - host, admin['email'] - ) + url = 'http://{}:1500/auth/v4/user/{}/key'.format(host, admin['id']) headers = {"Internal-Auth": "on", "Accept": "application/json"} req = requests.post(url, headers=headers, data={}) result = req.json()