Python-oca connection to vOneCloud

Hello,

We’re in the prototyping phase of a deployment of vOneCloud 1.8 and are hoping to set up some automation via the python-oca.

At this stage though I’m getting a nothing but an authentication error when I try to communicate with OpenNebula:

ian@ian-laptop:~/Desktop$ python test2.py

Traceback (most recent call last):
File “test2.py”, line 4, in
hostpool.info()
File “build/bdist.linux-x86_64/egg/oca/pool.py”, line 104, in info
File “build/bdist.linux-x86_64/egg/oca/init.py”, line 124, in call
oca.exceptions.OpenNebulaException: [HostPoolInfo] User couldn’t be authenticated, aborting call.

I’ve stripped down the script I’m running to what I can see as the bear minimum for it to attempt to communicate with the server at all:

import oca
client = oca.Client(‘CloudAdmin:password’, ‘http://1.2.3.4:2633/RPC2’)
hostpool = oca.HostPool(client)
hostpool.info()

I’ve tried several different users; CloudAdmin, oneadmin and created users.

I’ve ran this on both my ubuntu laptop communicating with vOC across the network and on the vOC server (by placing the python-oca files in place rather than a proper integration of them, then communicating with 127.0.0.1) and I get the same error across both.

I have seen that portions of this error show up elsewhere online for people who are configuring ONE and need to use the one_auth file and have tried adding this but to no change, and it doesn’t quite seem to logically fit as I’m specifying authentication through the script anyway.

Does anyone have any thoughts or suggestions about a next step? Does anyone have python-oca working for them?

Hello
try this script and see error is still appear or not

#!/usr/bin/env python2
import xmlrpclib
ONE_AUTH="oneadmin:pass"
server = xmlrpclib.ServerProxy('http://IP:2633/RPC2')
pool = server.one.hostpool.info(ONE_AUTH)
print pool

For vOneCloud related questions, please use the vOneCloud community forum:

https://support.vonecloud.com/hc/communities/public/topics

Thanks a bunch, that’s working.

Sorry about using the wrong forum @tinova the vOC forum seemed to want me to have a support contract to use it. We’re happy to get support contracts, but will wait until closer to production.

Cheers.

Glad you got that working.

Just for the record, the vOneCloud support portal has a community part (accesible from the link sent in my previous message), where members of the community can post questions and answer them without the need of having an active support contract.