Пример #1
0
 def save(self, *args, **kwds):
     if (not self.subnet) and (NO_OBSERVER):
         from util.network_subnet_allocator import find_unused_subnet
         self.subnet = find_unused_subnet(
             existing_subnets=[x.subnet for x in Network.objects.all()])
         print "DEF_MOD_NET_IP", self.start_ip
     super(Network, self).save(*args, **kwds)
Пример #2
0
 def save(self, *args, **kwds):
     if (not self.subnet) and (NO_OBSERVER):
         from util.network_subnet_allocator import find_unused_subnet
         self.subnet = find_unused_subnet(existing_subnets=[x.subnet for x in Network.objects.all()])
         print "DEF_MOD_NET_IP", self.start_ip
     super(Network, self).save(*args, **kwds)