Here is a plugin to allow the import of your hosts from OCS Inventory.
Firstly, there is a typo in the fog/commons/functions.include.php file - on line 1422 $os should read $osid - this should be corrected first as it can lead to errors being displayed.
Installation:
Decompress into your fog/management/plugins directory - ensure you have plugins enabled.
Install and activate in FOG via the web interface.
Usage:
You will be presented with a number of fields:
OCS server - IP or hostname of your OCS inventory server
OCS database - typically ocsweb
OCS username - typically ocs (or any account which can access the ocs DB)
OCS password - password for above user
Save these settings and check connectivity with the test button. If the credentials are correct but you cannot connect, check your OCS server mysql DB allows for external connections.
Next you can set the default image settings for the imported hosts:
Image name (dropdown of available images on your FOG server)
Image OS (dropdown)
Join AD (Yes/No) - this will use the default AD settings stored in FOG.
You can then perform "Display Hosts" test pull of the hosts from OCS - the results will be displayed at the bottom of the screen.
Finally, if you're happy all looks good you can "Import Hosts". You'll be presented with a summary at the bottom of the screen once done.
I'm sure the code can be improved and tidied up somewhat (the OCS user PW is displayed in plain text on screen, for example) so feel free to tweak. Hopefully it will prove useful to someone.
Chad
Minor interface and code tidy up, updated version uploaded.
Updated 30-May-2011
You can now filter hosts to be imported on hostname/OCS TAG/IP Address/MAC address. This lets you display the hosts which will be imported before importing them.
The OCS pw is encrypted rather than displayed in plain text
OCS Import Plugin for v0.32
Code updated with changes made by Jinx (see forums) - should now work on FOG v0.32.
If you still have this plugin, I can try recoding it for 1.x.x if needed. Just let me know on the forums.
Thank you,