-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
I've made the following changes to cobblersysreport:
1. dropped config file
2. added support to pass fields via command line paramenter
3. added support to multiple interfaces (although display may be a bit
quirky still).
[root@bean2 cobbler]# cobblersysreport -h
Usage: cobblersysreport [options]
Options:
-h, --help show this help message and exit
-s SERVER, --server=SERVER
Server you wish to user
-t TYPE, --type=TYPE Type of output format
-f FIELDS, --fields=FIELDS
Fields for the report. Comma delimited.
Available fields: profile,owners,kickstart,
virt_bridge,name,parent,virt_cpus,virt_type,
dhcp_tag,subnet,hostname,mac_address,ip_address
gateway,vm
-l, --list-types Available types of output
[root@bean2 cobbler]# cobblersysreport -f "name, hostname, vm,
ip_address" -s
cobbler.re.redhat.com -t trac
||name||hostname||vm||ip_address||
||build01_re_redhat_com||build01||Yes||10.10.42.5||
||buildmaster01_re_redhat_com||buildmaster01||Yes||10.10.42.6||
||buildnode01_re_redhat_com||buildnode01||No||10.10.42.10||
||buildnode02_re_redhat_com||buildnode02||Yes||10.10.42.11||
If there is more than one interface configured, let's say, host has 2 IP
addresses, the information (for now would show up like this):
||ip_address||
|| 10.0.0.1 10.0.0.2||
AS
Anderson Silva wrote:
> Forgot to mention, WRT multiple interfaces, it's probably fair to just
> report multiple lines for the system in that case, rather than making it
> bleed over if using any of the Wiki/CSV type outputs. This basically
> makes the system report be a report of it's interfaces. The text can
> probably remain as it is today, though some improvement is welcome there
> too.
> Yes, we'll want to support multiple interfaces as they are in
> wide-enough use that it would cause some confusion if we didn't.
Here is my question about multiple interfaces:
Let say I did:
cobbler system report --fields=name,mac_address
What mac_address would that be? Should one have to specify which
interface they want? Or should we just assume that ==fields,mac_address
will show as many mac_addresses as they are defined for a given system?
Pending the question above, here is my plan:
Alright, I will work on adapting the code to support multiple
interfaces, and also instead of using the config file, I'll add the
--fields parameter.
Once I get that working, I will 'come back' and discuss more about
integrating with cobbler.
Thanks,
AS
_______________________________________________
cobbler mailing list
cobbler(a)lists.fedorahosted.org
https://fedorahosted.org/mailman/listinfo/cobbler
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.7 (GNU/Linux)
Comment: Using GnuPG with Fedora -
http://enigmail.mozdev.org
iD8DBQFImfjtECmX3C4JWKgRAiYPAJ4rl2hC7N8CXA74ouQe46DKr1S0rwCeLbS3
Z1HItbM6Umtex436ZshH2Ts=
=dVrC
-----END PGP SIGNATURE-----