On Wed, Sep 24, 2008 at 10:55:36AM -0700, Ian Main wrote:
Howdy folks!
Okay i started playing with this a bit, so a few hints and feedback
The source code repo:
http://git.et.redhat.com/?p=libvirt-qpid.git;a=summary
So I'd like to hear any feedback you guys might have. This file in particular
describes the API that is used to interact with libvirt.
http://git.et.redhat.com/?p=libvirt-qpid.git;a=blob_plain;f=src/libvirt-s...
My TODO list looks like this:
- Not sure on camel case or underscores. Original libvirt API uses
camel case, I went with underscores as I was originally basing it off
the ruby bindings.
I would keep with camel case to maximize similarity with the libvirt
API ideally someone looking just at libvirt documentation or code should
be able to make his way on the libvirt-qpid API just based on the
similarities.
- Need rc scripts, daemonization, better reconnect/error handling
for
both qpid and libvirt. I think it should attempt to reconnect until
successful whenever it gets disconnected. We may need an extra status
property for this state as well.
with an limited exponential backoff timeout to not waste too many
cycles on unconnected laptops :-)
- Return libvirt error codes? (it's just text msgs right now with
error
status bit).
Like Dan suggested try to keep the same kind of structure and fields,
except for the couple of deprecated ones.
- Make it less chatty, but log stuff
If you wish to try it out, I've made rpms for fedora 9 x86_64 and i386.
They are in the ovirt repo, which you can add to yum using:
rpm -ivh
http://ovirt.org/repos/ovirt/9/ovirt-release-LATEST.fc9.noarch.rpm
Note to interested users, you also need to enable the repo
by editing /etc/yum.repos.d/ovirt.repo after install and switch enable
to 1 at least in the first section.
Once you have that set up, 'yum install libvirt-qpid
python-qpid', and then
run (each in their own terminals):
You also need 'yum install qpidd' I suspect this indicates a missing
dependancy maybe in the libvirt-qpid package but I'm not 100% sure
qpidd --auth no
libvirt-qpid (as root to auth with libvirt)
qpid-tool
qpid-tool provides an interface to qpid and allows you to view/manipulate the
qpid models/objects. Here is an example of how it looks using qpid-tool:
$ qpid-tool
Management Tool for QPID
qpid: list
Well ... all I got there was
Waiting for next periodic update
on the other hand the libvirt-qpid is checking every second or so the
current state, I guess the connection isn't made or something.
I tried qpid-tool both as root and $user
BTW i would suggest to rename qpid-tool to libvirt-qpid-tool or
virt-qpid-tool to avoid confusion about the scope.
Some comments about the XML schemas:
- camelCaseDanke :-)
- Node has methods domain_define_xml, storage_pool_define_xml and
storage_pool_create_xml
I think at least for symetry domain_create_xml should be available
there too.
- I would make an Error class mimicking at least partially what's
available in libvirt C or python bindings
- Domain.create() is very confusing, again I would define domain
creation under node, i.e. temporary 'undefined' domains. Then
<method name="create" desc="Start stopped VM"/>
should probably be renamed 'start' to avoid confusion.
and the comment "Start a defined but stopped domain" would be more
adequate by mentioning the define API...
- Is there a way to map constants in schemas, I think they should be
exposed at the API level, for example migration flags should have
an explicit definition here ... if possible.
That sounds cool, I don't know why it doesn't work for me, I still see
no indocation of error in the 3 consoles but still failing for me after
20mn...
qpid: list
Waiting for next periodic update
qpid:
Any verbose option to try to find why this is not carried on the bus
or if the bus is just not established ?
Daniel
--
Daniel Veillard | libxml Gnome XML XSLT toolkit
http://xmlsoft.org/
daniel(a)veillard.com | Rpmfind RPM search engine
http://rpmfind.net/
http://veillard.com/ | virtualization library
http://libvirt.org/