From: Scott Baker Date: Mon, 29 Jul 2013 23:03:50 +0000 (-0700) Subject: allow NetworkSliver.ip to be null, fix NO_OBSERVER define X-Git-Tag: 1.0~1 X-Git-Url: http://git.onelab.eu/?p=plstackapi.git;a=commitdiff_plain;h=026bfe7c69fa0260059cd1c6547a0fee184d8574 allow NetworkSliver.ip to be null, fix NO_OBSERVER define --- diff --git a/planetstack/core/models/network.py b/planetstack/core/models/network.py index 660107f..66c2742 100644 --- a/planetstack/core/models/network.py +++ b/planetstack/core/models/network.py @@ -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):