Use opennebula user credentials to find if vm belongs to user
This commit is contained in:
parent
55f55b6885
commit
b2d597232c
1 changed files with 2 additions and 1 deletions
|
@ -1731,7 +1731,8 @@ class CheckUserVM(APIView):
|
|||
response = check_otp(user, realm, token)
|
||||
if response != 200:
|
||||
return Response('Invalid token', 403)
|
||||
manager = OpenNebulaManager()
|
||||
manager = OpenNebulaManager(settings.OPENNEBULA_USERNAME,
|
||||
settings.OPENNEBULA_PASSWORD)
|
||||
# not the best way to lookup vms by ip
|
||||
# TODO: make this optimal
|
||||
vms = manager.get_vms()
|
||||
|
|
Loading…
Reference in a new issue