Anderson Silva wrote:
> -----BEGIN PGP SIGNED MESSAGE-----
> Hash: SHA1
>
>   
>> Sounds good, next step is to submit a patch adding it to "cobbler report" :)
>>
>> --Michael
>>
>>     
>
> I am starting to look into the cobbler code... At first glance, it seems
> I should be able to patch commands.py
>
> to add the following functionality:
>
> cobbler system report [--name=foo] [--fields=name,mac_address]
> [--type=mediawiki]
>
>
> On commands.py, it seems I need at least 2 things:
>
> 1. allow module to 'understand' the new parameters
> 2. have one or more functions that will take the new parameters and
> collect_fn() and generate the output.
>   

Sounds about right...

> I do have one question though, as cobblersysreport stands today, one is
> able to easily generate new 'outputtypes' for the report, currently
> doku, mediawiki, text and trac exist. See the file structure below:
>
> |-- AUTHORS
> |-- INSTALL
> |-- LICENSE
> |-- MANIFEST.in
> |-- cobblersysreport
> |-- cobblersysreport.spec
> |-- cobblersystemreport
> |   |-- __init__.py
> |   `-- outputtype
> |       |-- __init__.py
> |       |-- doku.py
> |       |-- mediawiki.py
> |       |-- outputformat.py
> |       |-- text.py
> |       `-- trac.py
> `-- setup.py
>
>
> What would be the preferred way to go about creating 'outputtype' within
> cobbler?
>   

The report code is in commands.py which is pretty much the only file you 
really need to change.

If you would want to create a file like action_report.py and move all 
the code into there I think that's reasonable too. commands.py
could call out to that.

We probably don't want a file for each different output format, I 
imagine they are all rather short and can live in that one file.

No worries though, if you submit something and we decided to rearrange 
it later, that's not a problem.
> AS
> -----BEGIN PGP SIGNATURE-----
> Version: GnuPG v1.4.7 (GNU/Linux)
> Comment: Using GnuPG with Fedora - http://enigmail.mozdev.org
>
> iD8DBQFImww0ECmX3C4JWKgRAmvvAJsF4t9gDfTcPUfUOPeHxoT4SlwS2QCfT4Vy
> +CKbck5I+Dd4mbb4az9BC4M=
> =DRsH
> -----END PGP SIGNATURE-----
> _______________________________________________
> cobbler mailing list
> [email protected]
> https://fedorahosted.org/mailman/listinfo/cobbler
>   

_______________________________________________
cobbler mailing list
[email protected]
https://fedorahosted.org/mailman/listinfo/cobbler

Reply via email to