On Fri, Nov 4, 2011 at 12:47, Gerhardus Geldenhuis <
gerhardus.geldenhuis(a)gmail.com> wrote:
Hi
This page:
https://fedorahosted.org/cobbler/wiki/CobblerApi states:
As of version 2.0, BootAPI is *not* the recommended way of interfacing
with Cobbler. It directly modifies the config store in a way that may not
be safe. Furthermore the modifications made will not be visible to
cobblerd. The
CobblerXmlrpc<https://fedorahosted.org/cobbler/wiki/CobblerXmlrpc>
interface
should instead be used until at least version 2.2.
Is this still true? Or can we use BootAPI now?
This is still true.
Is there anyway to get error messages back when using xmlrpc? The
https://fedorahosted.org/cobbler/wiki/CobblerXmlrpc page references
https://fedorahosted.org/cobbler/wiki/CobblerExceptions but it does not
exist any more. I want to know if actions were successful or not. I suspect
error checking is better done with the api hence my question.
I'm not sure personally. I want to say I saw errors that I could deal with
when using the xmlrpc, I just don't recall the format. I just pulled a
small snippet that is the only error checking I did against the xmlrpc.
here it is:
try:
cobbler.modify_system(sysid, 'modify_interface', int, token)
except xmlrpclib.Fault, e:
print "system %s errored trying to add %s interface" %
(system, interface)
print e
not great, but hopefully it helps.
One last novice question, does the api only run on the same server
as
cobbler or can I use the api to access a remote cobbler server?
The API should be remotely accessible.