JC-SoCal / pyFog

Simple API for Fog
4 stars 1 forks source link

pyFog

pyFog is a simple API which uses mechanize to complete tasks through the FOG Project web interface. There is example code in the example.py file.

I wrote this API to easily automate a few tasks I need to commonly perform with FOG. If you do not see a function that you need to perform feel free to make a feature request or message me on twitter: @JC_SoCal

Requirments

Functions

All functions return a tuple of a status and a message:
status is a boolean.

message is a string. The string will contain information relating to the status.

pyFog.open(url):
    Opens a connection to the webpage. This is required prior to login.
Arguments:

pyFog.login(username, password):
    Logs in to the fog web interface.
Arguments:

pyFog.logout():
     Logs out of the fog web interface.
Arguments:

pyFog.upload(hostname):
    Upload will pull an image from a client computer that will be saved on the server.
Arguments:

pyFog.deploy(hostname):
    Deploy action will send an image saved on the FOG server to the client computer with all included snapins.
Arguments:

pyFog.wol(hostname, schedule):
    Wake Up will attempt to send the Wake-On-LAN packet to the computer to turn the computer on. In switched environments, you typically need to configure your hardware to allow for this (iphelper).
Arguments: