DeveloperDocs

This page contains developer documentation for python-dhcpd-conf.

Overview

This project will allow many discrete projects such as Ubuntu Server Manager, Linux Terminal Server Project, etc to easily implement features available in isc dhcpd using python.

Basics

Because this is an object oriented abstraction the only requirement on a user is to

import dhcpd-conf

dhcpd = dhcpd-conf()

from then on dhcpd-conf will allow the user to add, modify, and delete any parameters set in the dhcpd.conf file.

global variables can be accessed by

dhcpd.<variable> ex: dhcpd.authorative

global options can be accessed by

dhcpd.options("<variable>") ex: dhcpd.options("dns-server")

for each subnet, class, host, pool, range, zone, shared-network, logging, key, failover, channel, or category stanza a new class, subnet,host, pool, etc should be created with a dictonary key based on the name if more than one exists.

dhcpd.<stanza class>("<name>").<variable> ex: dhcpd.subnets("192.168.1.0 netmask 255.255.255.0").range

these stanza classes may be nested.

dhcpd.<stanza class>s("name").<stanza class>s("name").<variable> ex: dhcpd.shared-networks("224-29").subnets("10.17.224.0 netmask 255.255.255.0").options("routers")

each of the objects available will have beginning and end variables that mark the beginning letter and the semicolon of there declaration and also a filename will be appended to each object so that we can keep track of which file it is in incase a include statement is used.

I believe this should allow any possible combination of a dhcpd.conf file.

PythonDhcpdConf/DeveloperDocs (last edited 2008-08-06 16:21:38 by localhost)