Merge branch '7070/fix_opennebula_error' into 'master'

Use opennebula user credentials to find if vm belongs to user

See merge request ungleich-public/dynamicweb!713
This commit is contained in:
pcoder116 2019-08-27 10:58:11 +02:00
commit 07db974931

View file

@ -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()