On Mon, 7 Mar 2011 12:18:35 +0000, "Briggs, Lee" <[email protected]> 
wrote:
> Hi Scott,
> 
> Thanks to your help I managed to get my PHP cobbler XMLRPC implementation 
> working, however;
> 
> I'm trying to get a list of all profile names first and foremost but with 
> get_profiles the name doesn't seem to be returned.
> 
> Is there a way I can get a list of all the cobbler profile names using 
> get_profiles using XMLRPC?

The get_profiles call returns a list of dictionaries, where each
dictionary represents a profile. I believe what you are looking for is
find_profiles. The following code in python works (where c is the xmlrpc
handle to the python server).

profile_names = c.find_profile({'name':'*'})

Additionally, if you wanted to do this with get_profiles, you could do
the following in python.

profiles_names = [ x['name'] for x in c.get_profiles ]

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

Attachment: pgpxF1hLifRWz.pgp
Description: PGP signature

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

Reply via email to