blob: e8494252076de11d780ac9e5849a3d45ae679b5a [file] [log] [blame]
Scott Baker3de3e372013-05-10 16:50:44 -07001import os
2from django.db import models
3from core.models import PlCoreBase
4from core.models import Site
Siobhan Tullybf1153a2013-05-27 20:53:48 -04005from core.models import Deployment
Scott Baker3de3e372013-05-10 16:50:44 -07006from core.models import ServiceClass
7
8# Create your models here.
9
10class 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)
20
21 def __unicode__(self): return u'%s' % (self.name)