2 from django.db import models
3 from core.models import PlCoreBase
4 from core.models import Site
5 from core.models import Deployment
6 from core.models import ServiceClass
8 # Create your models here.
10 class ServiceResource(PlCoreBase):
11 serviceClass = models.ForeignKey(ServiceClass, related_name = "resources")
12 name = models.CharField(max_length=32)
13 maxUnitsDeployment = models.IntegerField(default=1)
14 maxUnitsNode = models.IntegerField(default=1)
15 maxDuration = models.IntegerField(default=1)
16 bucketInRate = models.IntegerField(default=0)
17 bucketMaxSize = models.IntegerField(default=0)
18 cost = models.IntegerField(default=0)
19 calendarReservable = models.BooleanField(default=True)
21 def __unicode__(self): return u'%s' % (self.name)