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:
		
				commit
				
					
						07db974931
					
				
			
		
					 1 changed files with 2 additions and 1 deletions
				
			
		|  | @ -1731,7 +1731,8 @@ class CheckUserVM(APIView): | ||||||
|             response = check_otp(user, realm, token) |             response = check_otp(user, realm, token) | ||||||
|             if response != 200: |             if response != 200: | ||||||
|                 return Response('Invalid token', 403) |                 return Response('Invalid token', 403) | ||||||
|             manager = OpenNebulaManager() |             manager = OpenNebulaManager(settings.OPENNEBULA_USERNAME, | ||||||
|  |                                         settings.OPENNEBULA_PASSWORD) | ||||||
|             # not the best way to lookup vms by ip |             # not the best way to lookup vms by ip | ||||||
|             # TODO: make this optimal |             # TODO: make this optimal | ||||||
|             vms = manager.get_vms() |             vms = manager.get_vms() | ||||||
|  |  | ||||||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue