On Mon, 18 Apr 2011 11:29:46 -0500, Greg Swift <gregsw...@gmail.com> wrote:
> So... I'm trying to get some work done that requires me getting some
> specific rendered data from the cobbler xmlrpc, API could work too, but
> everything written in octa is already off the xmlrpc interface.
> 
> In [35]: server = xmlrpclib.Server("http://127.0.0.1/cobbler_api";)
> In [36]: server.get_system_for_koan('testing')['virt_cpus']
> Out[36]: 4
> In [37]: server.get_system('testing')['virt_cpus']
> Out[37]: '<<inherit>>'

There is a whole set of functions for doing this. They are called
get_*_as_rendered(name). You can use this to get system, distro, repo,
profile, etc. This is basically what koan uses to just get the final
version of the data in quesiton.

    def get_repo_as_rendered(self,name,token=None,**rest):
        """
        Return the repo as passed through cobbler's
        inheritance/graph engine.  Shows what would be installed, not
        the input data.
        """

-- 
Scott Henson
Red Hat CIS Operator
WVU Alum BSAE/BSME

Attachment: pgpmRxfxjqpIn.pgp
Description: PGP signature

_______________________________________________
cobbler-devel mailing list
cobbler-devel@lists.fedorahosted.org
https://fedorahosted.org/mailman/listinfo/cobbler-devel

Reply via email to