check in reservation models
diff --git a/planetstack/core/models/__init__.py b/planetstack/core/models/__init__.py
index cb5ff7d..179f6f7 100644
--- a/planetstack/core/models/__init__.py
+++ b/planetstack/core/models/__init__.py
@@ -12,4 +12,5 @@
from .slice import Slice
from .slice import SliceMembership
from .sliver import Sliver
-
+from .reservation import ReservedResource
+from .reservation import Reservation
diff --git a/planetstack/core/models/reservation.py b/planetstack/core/models/reservation.py
new file mode 100644
index 0000000..1a41ee5
--- /dev/null
+++ b/planetstack/core/models/reservation.py
@@ -0,0 +1,30 @@
+import os
+from django.db import models
+from core.models import PlCoreBase
+from core.models import Sliver
+from core.models import Slice
+from core.models import ServiceResource
+
+# Create your models here.
+
+class Reservation(PlCoreBase):
+ startTime = models.DateTimeField()
+ slice = models.ForeignKey(Slice, related_name="reservations")
+ duration = models.IntegerField(default=1)
+
+ def __unicode__(self): return u'%s duration %d' % (self.startTime, self.duration)
+
+class ReservedResource(PlCoreBase):
+ sliver = models.ForeignKey(Sliver, related_name="reservedResourrces")
+ resource = models.ForeignKey(ServiceResource, related_name="reservedResources")
+ quantity = models.IntegerField(default=1)
+ reservationSet = models.ForeignKey(Reservation, related_name="reservedResources")
+
+ class Meta(PlCoreBase.Meta):
+ verbose_name_plural = "Reserved Resources"
+
+ def __unicode__(self): return u'%d %s on %s' % (self.quantity, self.resource, self.sliver)
+
+
+
+