[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]

Re: [fedora-virt] RFC: libosinfo: Library for virt OS/distro metadata 3



On Mon, Jun 15, 2009 at 08:22:16AM -0400, Cole Robinson wrote:
> On 06/15/2009 08:15 AM, Richard W.M. Jones wrote:
> > On Sun, Jun 14, 2009 at 06:50:02PM -0400, Cole Robinson wrote:
> >> The public API looks like:
> >>
> >> /**
> >>  * Values stored in the OS dictionary
> >>  */
> >> enum _os_value_type {
> >>     OS_VALUE_NAME = 1,          /** Human readable family/distro... name */
> >>     OS_VALUE_MEDIA_INSTALL_URL, /** URL to an install tree */
> >> };
> >> typedef enum _os_value_type os_value_t;
> >>
> >> int     os_init();
> >> void    os_close();
> >>
> >> int     os_find_families        (char ***list);
> >> int     os_find_distros         (const char *parent_id, char ***list);
> >> int     os_find_releases        (const char *parent_id, char ***list);
> >> int     os_find_updates         (const char *parent_id, char ***list);
> >>
> >> int     os_lookup_value         (os_value_t value_type,
> >>                                  const char *os_id,
> >>                                  char **value);
> > 
> > There's a (little) overlap and a possible user in virt-inspector.
> > 
> > In virt-inspector we do things the other way around - we look inside
> > the guest for files like /etc/redhat-release and /etc/debian_version,
> > and parse those to determine the OS distro and release (also we parse
> > the registry to do the same for Windows).  The code for Linux is here:
> > 
> > http://git.et.redhat.com/?p=libguestfs.git;a=blob;f=inspector/virt-inspector.pl;h=1d8a84b424eb73ceafee041f0e1d76d371506aa7;hb=HEAD#l410
> > 
> > It would be nice for virt-inspector to output ID strings which are
> > compatible with osinfo.
> > 
> 
> Agreed, I was thinking something along the same lines.

If we keep to a flat list, then trivial answer here is to just use the
official distro name given by the vendor/distributor.

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 :|


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]