Siobhan Tully | 4bc09f2 | 2013-04-10 21:15:21 -0400 | [diff] [blame] | 1 | import os |
| 2 | from django.db import models |
| 3 | from plstackapi.core.models import PlCoreBase |
| 4 | from plstackapi.core.models import Slice |
| 5 | from plstackapi.openstack.driver import OpenStackDriver |
| 6 | |
| 7 | # Create your models here. |
| 8 | |
| 9 | class Subnet(PlCoreBase): |
| 10 | subnet_id = models.CharField(max_length=256, unique=True) |
| 11 | cidr = models.CharField(max_length=20) |
| 12 | ip_version = models.IntegerField() |
| 13 | start = models.IPAddressField() |
| 14 | end = models.IPAddressField() |
Tony Mack | 771f4b9 | 2013-04-12 01:49:57 -0400 | [diff] [blame] | 15 | slice = models.ForeignKey(Slice, related_name='subnet') |
Siobhan Tully | 4bc09f2 | 2013-04-10 21:15:21 -0400 | [diff] [blame] | 16 | |
| 17 | def __unicode__(self): return u'%s' % (self.name) |
| 18 | |