blob: 2f88dc98e97e33cc5056a70e2f94a96dd8f226ea [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):
Sapan Bhatia6bfa2ca2014-11-11 21:47:45 -050011 serviceClass = models.ForeignKey(ServiceClass, related_name = "serviceresources")
Scott Baker3de3e372013-05-10 16:50:44 -070012 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)