-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

I've written a python utility that interacts with the cobbler API, to
allow a person to select what fields they want reported formatted for
either: media wiki, doku, trac or plain text... here is an example:

Trac output:
[EMAIL PROTECTED] tmp]# cobblersysreport -s cobbler.re.redhat.com -f trac
||profile||name||hostname||ip_address||vm||
||RHEL-5-Server-U1-xen-x86_64||build01_re_redhat_com||build01||10.10.42.5||Yes||
||RHEL-5-Server-U1-xen-x86_64||buildmaster01_re_redhat_com||buildmaster01||10.10.42.6||Yes||
||RHEL-5-Server-U1-i386||buildnode01_re_redhat_com||buildnode01||10.10.42.10||No||


Doku output:
[EMAIL PROTECTED] tmp]# cobblersysreport -s cobbler.re.redhat.com -f doku
^profile^name^hostname^ip_address^vm^
|RHEL-5-Server-U1-xen-x86_64|build01_re_redhat_com|build01|10.10.42.5|Yes|
|RHEL-5-Server-U1-xen-x86_64|buildmaster01_re_redhat_com|buildmaster01|10.10.42.6|Yes|
|RHEL-5-Server-U1-i386|buildnode01_re_redhat_com|buildnode01|10.10.42.10|No|


The fields reported can be picked by the user at
/etc/cobblersysreport.conf, which looks like:

[EMAIL PROTECTED] tmp]# cat /etc/cobblersysreport.conf
# all available fields (assumes only inft0 is available)
# fields = 'profile','owners','kickstart','virt_bridge','name',\
#
'parent','virt_cpus','virt_type','dhcp_tag','subnet','virt_bridge',\
#           'hostname','mac_address','ip_address','gateway','vm'
#
# Fields to Display (order matters)
order = 'profile', 'name', 'hostname', 'ip_address', 'vm'


The only major limitation of this utility right now it that it only
allows 1 interface (intf0) to be selected via the config file.

I've talked privately to DeHaan about this and he suggested I share it
on the list. I'm interesting into merging this feature upstream (as
DeHaan has suggested):

like:
cobbler system report [--name foo] [--format trac|text|...]

But, I am not sure if I should address the intf0 limitation first, and
if this feature would really be worth being merged upstream or if it is
too specific and would end up bloating the project too much.

I am up for discussions... Thanks,


AS
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.7 (GNU/Linux)
Comment: Using GnuPG with Fedora - http://enigmail.mozdev.org

iD8DBQFImcPJECmX3C4JWKgRAiuxAJoDP5ZfQI7U+ug5EoZGNosH/08tQgCfWh4U
1tzHRWxlhGkTfUc5u4K6j34=
=dCrx
-----END PGP SIGNATURE-----
_______________________________________________
cobbler mailing list
[email protected]
https://fedorahosted.org/mailman/listinfo/cobbler

Reply via email to