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. > 'Course we'll need Perl bindings. Did you see this? > > http://rwmj.wordpress.com/2009/04/20/generating-code/ > Thanks, I'll take a look. - Cole _______________________________________________ et-mgmt-tools mailing list et-mgmt-tools@xxxxxxxxxx https://www.redhat.com/mailman/listinfo/et-mgmt-tools