blob: 4ea2c40e70d339d28fdc0b389894c95f6884855b [file] [log] [blame]
Siobhan Tully4bc09f22013-04-10 21:15:21 -04001import os
2from django.db import models
3from plstackapi.core.models import PlCoreBase
4from plstackapi.core.models import Slice
5from plstackapi.openstack.driver import OpenStackDriver
6
7# Create your models here.
8
9class 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 Mack771f4b92013-04-12 01:49:57 -040015 slice = models.ForeignKey(Slice, related_name='subnet')
Siobhan Tully4bc09f22013-04-10 21:15:21 -040016
17 def __unicode__(self): return u'%s' % (self.name)
18