Table of Contents

Class: Helper pyVC/Helpers/DHCP.py

This object defines a Helper object for a DHCP Server.

This object can be instantiated as: dhcp = Helper(realmachine, networks, conffile = "/tmp/dhcpd.conf") realmachine = Machine networks = [Network, ...] conffile is optional, and defaults to the above value.

Derives from: pyVC.Helpers.Base

Base Classes   
Base.Helper
Methods   
__del__
__init__
__repr__
__str__
create_dhcpd_conf
start
stop
  __del__ 
__del__ ( self )

  __init__ 
__init__ (
        self,
        realmachine,
        networks,
        conffile="/tmp/dhcpd.conf",
        **keywords,
        )

  __repr__ 
__repr__ ( self )

  __str__ 
__str__ ( self )

  create_dhcpd_conf 
create_dhcpd_conf ( self,  dhcpfile )

Creates dhcpd.conf files for the DHCP Server Helper object.

dhcp.create_dhcpd_conf(dhcpfile) dhcpfile should be an open and writable file-like object.

  start 
start ( self )

Starts the DHCP Server process on the real Machine.

This method will perform a no-op if the server is already started or if self._pid is already defined.

This method also registers self.stop() as an atexit function, to ensure proper cleanup of processes and files.

dhcp.start()

  stop 
stop ( self )

Stops the DHCP Server process on the real Machine.

This method will perform a no-op if the server is not started or if self._pid is not defined.

dhcp.stop()


Table of Contents

This document was automatically generated on Thu Jan 18 11:28:09 2007 by HappyDoc version 2.1