Revision 39f723aa snf-cyclades-app/synnefo/db/models.py
b/snf-cyclades-app/synnefo/db/models.py | ||
---|---|---|
756 | 756 |
class Meta: |
757 | 757 |
unique_together = ("network", "address", "deleted") |
758 | 758 |
|
759 |
@property |
|
760 |
def public(self): |
|
761 |
return self.network.public |
|
762 |
|
|
763 | 759 |
def release_address(self): |
764 | 760 |
"""Release the IPv4 address.""" |
765 | 761 |
if self.ipversion == 4: |
... | ... | |
825 | 821 |
security_groups = models.ManyToManyField("SecurityGroup", null=True) |
826 | 822 |
state = models.CharField(max_length=32, null=False, default="ACTIVE", |
827 | 823 |
choices=STATES) |
824 |
public = models.BooleanField(default=False) |
|
828 | 825 |
device_owner = models.CharField('Device owner', max_length=128, null=True) |
829 | 826 |
|
830 | 827 |
def __unicode__(self): |
Also available in: Unified diff