Split out a new LAN for building G

darcs-hash:20091118174104-61eff-b9dd767b23fcac868a8054bcaf7a26edc9ef9137.gz
This commit is contained in:
Stephane Glondu 2009-11-18 18:41:04 +01:00
parent e648f38651
commit d4fcd4ecc4
2 changed files with 10 additions and 4 deletions

View file

@ -2833,9 +2833,13 @@ Contactez nounou si la MAC est bien celle d'une carte.""", 3)
net = config.NETs['personnel-ens']
pool_ip = lister_ip_dispo('personnel-ens')
elif not isinstance(proprio, Adherent) or proprio.adherentPayant():
proprio_subnet = 'adherents'
try:
net = config.NETs['adherents']
pool_ip = lister_ip_dispo('adherents')
chbre = proprio.chbre()
if chbre and chbre[0] == 'G':
proprio_subnet = 'adh-g'
net = config.NETs[proprio_subnet]
pool_ip = lister_ip_dispo(proprio_subnet)
except:
raise RuntimeError(u'Impossible de trouver le réseau où placer la machine.')
else: