suppression des plages d'ips par batiments

darcs-hash:20080918212758-c41ad-b07138e4cc528ad55a577218a5b8a4791e9872c5.gz
This commit is contained in:
Jeremie Dimino 2008-09-18 23:27:58 +02:00
parent a8cd71d80f
commit 226f9af045
2 changed files with 7 additions and 18 deletions

View file

@ -2787,16 +2787,12 @@ class Machine(BaseClasseCrans):
net = [ '0.0.0.0/0' ]
pool_ip = lister_ip_dispo('all')
else:
gratuit = 0
proprio = self.proprietaire()
if isinstance(proprio, Adherent):
if not proprio.adherentPayant():
gratuit = 1
if gratuit == 0:
if isinstance(proprio, Adherent) and proprio.adherentPayant():
try:
net = config.NETs[proprio.chbre()[0].lower()]
pool_ip = lister_ip_dispo(proprio.chbre()[0].lower())
net = config.NETs['adherents']
pool_ip = lister_ip_dispo('adherents')
except:
raise RuntimeError(u'Impossible de trouver le réseau où placer la machine.')
else: