[virt-tools-list] Re: libosinfo - RFC v2
Daniel P. Berrange
berrange at redhat.com
Mon Oct 26 21:05:44 UTC 2009
On Sun, Oct 25, 2009 at 03:13:04AM -0400, Arjun Roy wrote:
> Hi all,
>
> This is a second draft of the proposed libosinfo API.
>
> Warning: pretty long.
>
> The basic idea remains:
>
> 1. OS Data would be stored in several XML files.
> 2. The data would have a flat, no hierarchy layout.
>
> I've made some changes, mostly based on suggestions in response to my first
> email:
>
> 1. Primary identifier will now use RDF. In addition, there will be a short name
> parameter that is supposed to be unique as well, for use in console apps and
> other uses where the user will want to refer to a distro.
>
> <distro rdf:about="http://fedoraproject.org/fedora-10">
> <name>Fedora 10</name>
> <kernel>linux</kernel>
> <kernel-version>2.6.30</kernel-version>
> </distro>
>
> <distro rdf:about="http://fedoraproject.org/fedora-11">
> <upgrades rdf:about="http://fedoraproject.org/fedora-10">
> <short-id>fedora11</short-id>
> <name>Fedora 11</name>
> </distro>
>
> 2. A new type will be added to the library, the osi_hypervisor_t. It will
> represent information dependent on the choice of hypervisor, such as supported
> devices. The goal is to query libvirt for hypervisor information, and storing
> the data in the backing store as a fallback.
>
> In XML, a hypervisor could be represented like this:
>
> <hypervisor rdf:about="http://qemu.org/qemu-kvm-0.11.0">
> <name>KVM</name>
> <version>0.11.0</version>
> <audio-driver>ac97</audio-driver>
> <audio-driver>es1371</audio-driver>
> <video-driver>vesa</video-driver>
> </hypervisor>
I think we should consider whether we need to represent drivers as more
than just strings, and also how we should classify device types. We may
need to have multiple types against a device, for example a USB device
may be both an audio & video device at the same time. For that matter we
probably need to note whether the device is an ISA, PCI or USB device
here. If you search the PCI IDs list at http://pci-ids.ucw.cz/ for the
device 'ac97' you'll find about 15 matches, so its not all that great
as a unique identifier - product/vendor pair is more exact. Yeah it is
suboptimal that libvirt uses the string format.
I hate to say it, but do we perhaps need to have a top level <device>
type like ?
<device rdf:about="http://pci-ids.ucw.cz/read/PC/1274/5000">
<short-id>es1371</short-id>
<class type='audio'/>
<bus type='pci' vendor='0x1274' product='x05000'/>
</device>
With the hypervisor section cross-referencing the devices
<hypervisor rdf:about="http://qemu.org/qemu-kvm-0.11.0">
<name>KVM</name>
<version>0.11.0</version>
<device rdf:resource="http://pci-ids.ucw.cz/read/PC/1002/4382'/>
<device rdf:resource="http://pci-ids.ucw.cz/read/PC/1274/5000"/>
....
</hypervisor>
Regards,
Daniel
--
|: Red Hat, Engineering, London -o- http://people.redhat.com/berrange/ :|
|: http://libvirt.org -o- http://virt-manager.org -o- http://ovirt.org :|
|: http://autobuild.org -o- http://search.cpan.org/~danberr/ :|
|: GnuPG: 7D3B9505 -o- F3C9 553F A1DA 4AC2 5648 23C1 B3DF F742 7D3B 9505 :|
More information about the virt-tools-list
mailing list