API for Managing Tasks?



  • Hello,

    I’ve just found FOG and it appears to do almost everything that I need to control imaging on 70 machines now, growing to 115 in just a few weeks. We have these 115 machines spread out across different subnets with groups of 15 behind their own DHCP/NAT. I’ve been pleasantly surprised at how adaptable FOG seems to be.

    However, there is one sticking point: I would like to be able to programmatically add a task to reimage a machine when it reboots. Is there any API (or not-too-hard way) to add a task like that?

    • Mike

  • Moderator

    You need to look into the way fog does it now. I believe it calls one of the scripts under {webdir}/fog/service/, passing in as POST arguments the information needed to create the task in the database and file under /tftpboot/pxelinux.cfg/

    If you expand out the /tftpboot/fog/images/init.gz (instruction on wiki), and look into the /bin/fog folder, you’ll see the fog.man.reg file, which is what runs when you choose the Full Host registration and inventory from the PXE boot menu. If you can look through that file, you can see how the script is calling the page which creates the imaging task, and you can replicate that in whatever program you are wanting to interface with FOG.


Log in to reply
 

344
Online

39.3k
Users

11.0k
Topics

104.4k
Posts

Looks like your connection to FOG Project was lost, please wait while we try to reconnect.