git://git.onelab.eu
/
plstackapi.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
58a9c7a
)
allow NetworkSliver.ip to be null, fix NO_OBSERVER define
author
Scott Baker
<smbaker@gmail.com>
Mon, 29 Jul 2013 23:03:50 +0000
(16:03 -0700)
committer
Scott Baker
<smbaker@gmail.com>
Mon, 29 Jul 2013 23:03:50 +0000
(16:03 -0700)
planetstack/core/models/network.py
patch
|
blob
|
history
diff --git
a/planetstack/core/models/network.py
b/planetstack/core/models/network.py
index
660107f
..
66c2742
100644
(file)
--- 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.
# If true, then IP addresses will be allocated by the model. If false, then
# we will assume the observer handles it.
-
#NO_OBSERVER=Tru
e
+
NO_OBSERVER=Fals
e
class NetworkTemplate(PlCoreBase):
VISIBILITY_CHOICES = (('public', 'public'), ('private', 'private'))
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)
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):
def save(self, *args, **kwds):
if (not self.ip) and (NO_OBSERVER):