[one-users] Need Information on Open Nebula Client Interface.

Ruben S. Montero rubensm at dacya.ucm.es
Mon Jan 12 03:13:08 PST 2009


Hi Lalithamba

On Sunday 11 January 2009 08:20:41 lalithamba.vishwanathaiah at wipro.com wrote:
> Hi William,
>
> Is there any way where the user can get the details of the host by giving
> hostname (ip address or hostname) as the input ? Is there any other
> alternative for this ?

I am not really sure if the JAVA API access the OpenNebula DB. In any case you 
can easily obtain the ID of a host by its name (or the whole record for the 
matter of fact) by querying the sqlite DB like this...

SELECT host_name FROM host_pool WHERE host_name=<the_name_of_the_host>

If Ruby is a valid language for your development purposes you can take a look 
to the onehost command and the one.rb library

Hope this helps...

Ruben

>
>
> Thanks and Regards,
> Lalithamba.
>
> ________________________________
>
> From: William Voorsluys [mailto:williamvoor at gmail.com]
> Sent: Sat 10-Jan-09 7:19 AM
> To: Lalithamba Vishwanathaiah (WT01 - Innovation Group)
> Cc: users at lists.opennebula.org
> Subject: Re: [one-users] Need Information on Open Nebula Client Interface.
>
>
>
> Hi Lalithamba,
>
> I would recommend not using the method "allHostsIds", as it is not
> supported by ONE. There use to be a ticket for such support, but it's
> been closed without a fix. See http://trac.opennebula.org/ticket/33
> for an explanation.
>
> If you really need this feature, you'll have to patch ONE your self. I
> did that on a previous version of ONE. You can find such patch at
> http://trac.opennebula.org/wiki/NimbusIntegration, under Packages.
>
> Cheers,
>
> William
>
> On Sat, Jan 10, 2009 at 1:21 AM,  <lalithamba.vishwanathaiah at wipro.com> 
wrote:
> > Hi,
> >
> > I am using OpenNebula Client Utility to get the Front-end (ONE) details.
> >
> > I am calling oneClient.allHostsIds(session) method from my java program.
> > I am getting the following error :
> >
> > -------------------------------------------------------------------------
> >------------------- org.apache.xmlrpc.XmlRpcException: Method
> > 'one.allhostsids' not defined at
> > org.apache.xmlrpc.client.XmlRpcStreamTransport.readResponse(XmlRpcStreamT
> >ransport.java:186) at
> > org.apache.xmlrpc.client.XmlRpcStreamTransport.sendRequest(XmlRpcStreamTr
> >ansport.java:145) at
> > org.apache.xmlrpc.client.XmlRpcHttpTransport.sendRequest(XmlRpcHttpTransp
> >ort.java:94) at
> > org.apache.xmlrpc.client.XmlRpcSunHttpTransport.sendRequest(XmlRpcSunHttp
> >Transport.java:44) at
> > org.apache.xmlrpc.client.XmlRpcClientWorker.execute(XmlRpcClientWorker.ja
> >va:53) at
> > org.apache.xmlrpc.client.XmlRpcClient.execute(XmlRpcClient.java:166) at
> > org.apache.xmlrpc.client.XmlRpcClient.execute(XmlRpcClient.java:157) at
> > org.apache.xmlrpc.client.XmlRpcClient.execute(XmlRpcClient.java:146) at
> > org.opennebula.stubs.OpenNebulaClientImpl.execute(OpenNebulaClientImpl.ja
> >va:115) at
> > org.opennebula.stubs.OpenNebulaClientImpl.allHostsIds(OpenNebulaClientImp
> >l.java:272)
> > -------------------------------------------------------------------------
> >-------------------
> >
> > Why am I getting the error ?
> >
> > I have added one machine as host using "onehost create" command.
> > How can I get the HID for a given hostname from Front-End using Client
> > Utility ?
> > Can anybody give me a sample code for this.
> >
> > Any help is appreciated.  Anticipating for a response.
> >
> >
> > Thanks and Regards,
> > Lalithamba.
> >
> > Please do not print this email unless it is absolutely necessary.
> >
> > The information contained in this electronic message and any attachments
> > to this message are intended for the exclusive use of the addressee(s)
> > and may contain proprietary, confidential or privileged information. If
> > you are not the intended recipient, you should not disseminate,
> > distribute or copy this e-mail. Please notify the sender immediately and
> > destroy all copies of this message and any attachments.
> >
> > WARNING: Computer viruses can be transmitted via email. The recipient
> > should check this email and any attachments for the presence of viruses.
> > The company accepts no liability for any damage caused by any virus
> > transmitted by this email.
> >
> > www.wipro.com
> >
> > _______________________________________________
> > Users mailing list
> > Users at lists.opennebula.org
> > http://lists.opennebula.org/listinfo.cgi/users-opennebula.org
>
> --
> William Voorsluys
>
> williamvoor.googlepages.com
>
>
>
> Please do not print this email unless it is absolutely necessary.
>
> The information contained in this electronic message and any attachments to
> this message are intended for the exclusive use of the addressee(s) and may
> contain proprietary, confidential or privileged information. If you are not
> the intended recipient, you should not disseminate, distribute or copy this
> e-mail. Please notify the sender immediately and destroy all copies of this
> message and any attachments.
>
> WARNING: Computer viruses can be transmitted via email. The recipient
> should check this email and any attachments for the presence of viruses.
> The company accepts no liability for any damage caused by any virus
> transmitted by this email.
>
> www.wipro.com

-- 
+---------------------------------------------------------------+
 Dr. Ruben Santiago Montero
 Associate Professor
 Distributed System Architecture Group (http://dsa-research.org)

 URL:    http://dsa-research.org/doku.php?id=people:ruben
 Weblog: http://blog.dsa-research.org/?author=7
             
 GridWay, http://www.gridway.org
 OpenNEbula, http://www.opennebula.org
+---------------------------------------------------------------+






More information about the Users mailing list