Re: [anemon-devs] Is anyone here? |
[ Thread Index |
Date Index
| More anemon.org/devs Archives
]
Matt Wagenknecht wrote:
The distribution list seems to be spam riddled. Is this project dead? I am
interested in it but had a question first.
The project ... "survives" : I'm working on it one month each year and some
rare week-ends.
I am looking for an adhoc DHCPd solution. How difficult would it be to write
in sqlite or flatfile support? I am looking for a solution that doesn't
require mysql.
Originally, I wrote a general database layer. But it was hard to maintain.
Today, all db functions are located in mod_config_mysql and
mod_leases_mysql. These files are selected in the server configuration file :
interface_config['module'] = 'config_mysql'
interface_leases['module'] = 'leases_mysql'
You can write a mod_config_files and load it with the
interface_config['module'] = 'config_files'.
The difficulty is :
- I didn't comment these modules enough. Method entries and output are not
documented. You will need to ask me or read the code. If you are motivated
to do a light document to do this, i will gladly help you.
Here are the methods you must rewrite (some of them will probably be only
"pass" for flat files):
- mod_leases_mysql.py
def __init__(self) :
def Setup(self,_host='localhost',_base='',_user='',_pass='',_port=3306):
def Reconnect(self,maxwait=500) :
def Connect(self) :
def Transaction(self,sql_list) :
def
InsertLease(self,_server,_ipaddr,_chaddr,_identifier,_leasetime,_state='active'):
def DeleteLease(self,_ipaddr,_chaddr,_identifier):
def UpdateLeaseTime(self,_ipaddr,_chaddr,_identifier,_leasetime):
def NewLease(self,_server,_ipaddr,_chaddr,_identifier,_etime,_state) :
def UpdateLease(self,_ipaddr,_chaddr,_identifier,update):
def UpdateLeaseState(self):
def SelectLeaseByChaddrAndIdentifier(self,_chaddr,_identifier):
def SelectLeaseByIp(self,_ip):
- mod_config_mysql.py
def __init__(self) :
def Setup(self,_host='localhost',_base='',_user='',_pass='',_port=3306):
def Reconnect(self,maxwait=500) :
def Connect(self) :
def Transaction(self,sql_list) :
def GetIpByChaddr(self,_chaddr) :
def GetIpByIdentifier(self,_identifier) :
def GetSubnets(self) :
def GetScopes(self,_subnet) :
def GetOptionsForIp(self,_ip) :
Best regards.
--
Mathieu
http://matou.isanerd.net/