[one-users] XML-RPC API's

Borja Sotomayor borja at borjanet.com
Tue Sep 15 01:16:05 PDT 2009


Hi Harsha,

The oneadmin account is created the first time OpenNebula starts,
although I don't know what the default password is (I'll let the
OpenNebula developers clarify this; it's not entirely obvious from the
documentation). However, if you can use the onevm, onehost, etc.
commands, checking the password is simple: just look at your ONE_AUTH
environment variable:

   echo $ONE_AUTH

However, in case the password _is_ 'oneadmin', take into account that
the XMLRPC API expects the password's SHA1 hash (not the password
itself). So, if you're currently sending the password verbatim, make
sure you modify your code so it will send the SHA1 hash instead.
Assuming 'oneadmin' is the password, the session string would look
something like this:

   oneadmin:7bc8559a8fe509e680562b85c337f170956fcb06

Cheers!
--Borja

On Tue, Sep 15, 2009 at 9:57 AM, Harsha Buggi <Harsha_Buggi at mindtree.com> wrote:
> Sorry for the deluge of mails.
>
> I am assuming that the password of oneadmin user is oneadmin. What is the password of oneadmin user?
> ________________________________
> From: Harsha Buggi
> Sent: Tuesday, September 15, 2009 1:20 PM
> To: users at lists.opennebula.org
> Subject: RE: XML-RPC API's
>
> I tried
>
> $vminfo=$server->call("one.vmpool.info","oneadmin:oneadmin",-2);
> print @$vminfo->[1];
>
> and I get the error
>
> "User is not authenticated, aborting RequestManagerPoolInfo call"
>
> I am running the script as 'root' and I have the ONE_AUTH="oneadmin:oneadmin" set as an env variable.
>
> Regards,
> Harsha
> ________________________________
> From: Harsha Buggi
> Sent: Tuesday, September 15, 2009 12:17 PM
> To: users at lists.opennebula.org
> Subject: XML-RPC API's
>
> Hi,
>
>     I have used perl CGI scripts to build an web interface around nebula. All that I am doing in this is have a login page with authenticates by checking for the username:password string in the system env variable and then after authentication user is given an option to upload a topology file or select random OS's that s/he wants deployed.
>
>     I want to use the one.vm.allocate and vm.pool.info methods to deploy VM's and  display the VM's associated only with that particular user on the home page respectively. What is the syntax for packaging the parameters and making the corresponding function calls. I am using the Frontier::Client perl module to make the xml-rpc calls. Can I have an example? I am specially confused with the syntax and values for passing the session string.
>
> Regards,
> Harsha
>
> ________________________________
> http://www.mindtree.com/email/disclaimer.html
> _______________________________________________
> Users mailing list
> Users at lists.opennebula.org
> http://lists.opennebula.org/listinfo.cgi/users-opennebula.org
>



More information about the Users mailing list