I'm trying to communicate with opennebula 4.8
via xmlrpc
and python
. Here is the code:
import xmlrpclib
import re
import hashlib
server = 'http://10.1.7.205:2633/RPC2'
user = "oneadmin"
password = "pass"
password = hashlib.sha1(password).hexdigest()
one_auth = '{0}:{1}'.format(user, password)
def getProxy():
return xmlrpclib.ServerProxy(server)
def getVMInfo(id):
response = getProxy().one.vm.info(one_auth,id)
if response[0]:
return response[1]
else:
raise Exception(response[1])
-->
Exception: [VirtualMachineInfo] User couldn't be authenticated, aborting call.
I have this example from the oca package , but its not working with new version of opennebula
and the author don't work on this project anymore.