allow NetworkSliver.ip to be null, fix NO_OBSERVER define
authorScott Baker <smbaker@gmail.com>
Mon, 29 Jul 2013 23:03:50 +0000 (16:03 -0700)
committerScott Baker <smbaker@gmail.com>
Mon, 29 Jul 2013 23:03:50 +0000 (16:03 -0700)
planetstack/core/models/network.py

index 660107f..66c2742 100644 (file)
@@ -7,7 +7,7 @@ from django.contrib.contenttypes import generic
 
 # If true, then IP addresses will be allocated by the model. If false, then
 # we will assume the observer handles it.
-#NO_OBSERVER=True
+NO_OBSERVER=False
 
 class NetworkTemplate(PlCoreBase):
     VISIBILITY_CHOICES = (('public', 'public'), ('private', 'private'))
@@ -44,7 +44,7 @@ class Network(PlCoreBase):
 class NetworkSliver(PlCoreBase):
     network = models.ForeignKey(Network)
     sliver = models.ForeignKey(Sliver)
-    ip = models.GenericIPAddressField(help_text="Sliver ip address", blank=True)
+    ip = models.GenericIPAddressField(help_text="Sliver ip address", blank=True, null=True)
 
     def save(self, *args, **kwds):
         if (not self.ip) and (NO_OBSERVER):