On Fri, 4 Mar 2011 15:50:35 +0000, "Briggs, Lee" <lee.briggs(a)jpmchase.com>
wrote:
I'm new to xmlrpc and I've been trying to integrate with a
cobbler server in order to pull some info out of it. Unfortunately, the documentation is
at best, sparse so I need some help.
The xmlrpc info for cobbler is here
<?php
include 'xmlrpc.inc';
// Make an object to represent our server.
$server = new xmlrpc_client('https://url/cobbler/cobbler_api');
$token = $server->login("username","password");
echo $server->getprofiles("name");
?>
I get precisely nothing. So, what have I done wrong? How can i check the request is
actually being performed correctly.
obviously I've replaced "url" "username" and "password"
for the purposes of this question.
Can anyone shed any light on what I'm doing wrong, or give me a hand even?
First, if you are doing read only operations, you shouldn't need to
authenticate. Second, there should be a log of what requests are being
made to cobbler in /var/log/cobbler/cobbler.log.
Also, it should be $server->get_profile("name"). You can use
get_profiles if you just want to get all of them, but getting a specific
one should be done with get_profile.
Also note, that anything that is "None" inside of cobbler, will come
across as "~".
--
Scott Henson
Red Hat CIS Operator
WVU Alum BSAE/BSME