ajout de la génération du DHCP sur dyson
darcs-hash:20091118210817-61eff-d2426c9a04e1424a15024de5212dc793db6373e3.gz
This commit is contained in:
parent
d4fcd4ecc4
commit
ef1b93cc42
3 changed files with 12 additions and 0 deletions
|
@ -10,6 +10,7 @@ Licence : GPLv2
|
|||
from iptools import AddrInNet
|
||||
from gen_confs import gen_config
|
||||
from ldap_crans import hostname
|
||||
from config import NETs
|
||||
|
||||
class dhcp(gen_config) :
|
||||
""" Génération du fichier de déclaration des hosts.
|
||||
|
@ -28,6 +29,9 @@ class dhcp(gen_config) :
|
|||
elif hostname == 'titanic':
|
||||
restart_cmd = '/etc/init.d/dhcp3-server restart'
|
||||
reseaux = { '10.2.9.0/24' : '/etc/dhcp3/generated/appartements.liste' }
|
||||
elif hostname == 'dyson':
|
||||
restart_cmd = '/etc/init.d/dhcp3-server restart'
|
||||
reseaux = { NETs['adh-g'][0] : '/etc/dhcp3/generate/adh-g.liste' }
|
||||
elif hostname == 'gordon':
|
||||
restart_cmd = '/etc/init.d/dhcp3-server restart'
|
||||
reseaux = { '138.231.144.0/21' : '/etc/dhcp3/generated/wifi.liste' }
|
||||
|
|
|
@ -220,6 +220,11 @@ class komaz(base_reconfigure):
|
|||
def classify(self, ips):
|
||||
self.__fw().classes_p2p_maj(ips)
|
||||
|
||||
class dyson(base_reconfigure):
|
||||
def dhcp(self):
|
||||
from gen_confs.dhcp_new import dhcp
|
||||
self._do(dhcp(), self._machines())
|
||||
|
||||
class sable(base_reconfigure):
|
||||
def dhcp(self):
|
||||
from gen_confs.dhcpd_new import dhcp
|
||||
|
|
|
@ -2828,6 +2828,9 @@ Contactez nounou si la MAC est bien celle d'une carte.""", 3)
|
|||
pool_ip = lister_ip_dispo('all')
|
||||
else:
|
||||
proprio = self.proprietaire()
|
||||
if proprio.chbre()[0] in [ 'g', 'G' ]:
|
||||
net = config.NETs['adh-g']
|
||||
pool_ip = lister_ip_dispo('adh-g')
|
||||
|
||||
if proprio.etudes(0) == 'Personnel ENS':
|
||||
net = config.NETs['personnel-ens']
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue