[one-users] API method for getting all hosts info
William Voorsluys
williamvoor at gmail.com
Wed Aug 6 03:50:35 PDT 2008
Hello,
2008/8/6 Borja Sotomayor <borja at borjanet.com>:
> The current approach used in "onehost list" and in the OpenNebula/Haizea
> integration is to access the ONE database directly. I believe the rationale
> for this was that (1) the physical host information is something you
> typically only need to know locally (e.g., admin commands, the Haizea
> scheduler, etc.) and not remotely and (2) polling for a (potentially large)
> host list through XMLRPC could be an expensive operation, so direct database
> access was used instead.
>
> I can see how rationale (1) is not really valid if you want a third-party
> component (like VWS, which could be in a different machine) to access the
> host list, so it may make sense to add a new operation to the API to
> retrieve the host list (even if this operation is not used by "onehost
> list"; at least it would be available for other components to use). Could
> you create a ticket in the Trac so we can track the issue there?
I just created an issue there.
Indeed, it makes more sense for third-party components to just have
access to the API. I got the point of accessing the database directly,
but I'd rather go for a change in the API. I'll have a look at the
code to see what's the effort involved in adding such a method. It
shouldn't be hard!
Cheers,
William.
>
> Finally, as a workaround, you can access the ONE database directly for now
> (the only limitation is that VWS and ONE will have to be running on the same
> node; but this assumption can be easily removed when an API call for this
> becomes available). There are a number of options for accessing a SQLite
> database from Java: http://www.sqlite.org/cvstrac/wiki?p=SqliteWrappers. If
> you have any trouble parsing the ONE db, don't hesitate to ask here.
>
> Cheers!
> --
> :::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
> Borja Sotomayor, University of Chicago
> Ph.D. Student, Department of Computer Science
> Ryerson 257-C, 1100 East 58th Street, Chicago, IL
> Haizea: http://haizea.cs.uchicago.edu/
> BorjaNet: http://www.borjanet.com/
> ·····························································
> "Dis maschine vill run und run!"
> -- Kurt Gödel (on the Turing Machine)
> :::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
>
--
William Voorsluys
williamvoor.googlepages.com
More information about the Users
mailing list