fixed endpoint to get access key DCImanager 6
This commit is contained in:
parent
cf1cb49a82
commit
33a775dbbd
9
main.py
9
main.py
@ -68,14 +68,7 @@ class Access(object):
|
|||||||
_dict_: _access key_
|
_dict_: _access key_
|
||||||
"""
|
"""
|
||||||
host = self.input_container
|
host = self.input_container
|
||||||
if self.platform == "vm":
|
url = 'http://{}:1500/auth/v4/user/{}/key'.format(host, admin['id'])
|
||||||
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']
|
|
||||||
)
|
|
||||||
headers = {"Internal-Auth": "on", "Accept": "application/json"}
|
headers = {"Internal-Auth": "on", "Accept": "application/json"}
|
||||||
req = requests.post(url, headers=headers, data={})
|
req = requests.post(url, headers=headers, data={})
|
||||||
result = req.json()
|
result = req.json()
|
||||||
|
Loading…
x
Reference in New Issue
Block a user