Added in serviceClass to Slice, and numberCores to Sliver, adjusted admin.py accordingly
diff --git a/plstackapi/core/admin.py b/plstackapi/core/admin.py
index 90b1963..55b2ec2 100644
--- a/plstackapi/core/admin.py
+++ b/plstackapi/core/admin.py
@@ -228,7 +228,7 @@
class SliverAdmin(PlanetStackBaseAdmin):
form = SliverForm
fieldsets = [
- ('Sliver', {'fields': ['ip', 'name', 'slice', 'flavor', 'image', 'key', 'node', 'deploymentNetwork']})
+ ('Sliver', {'fields': ['ip', 'name', 'slice', 'numberCores', 'flavor', 'image', 'key', 'node', 'deploymentNetwork']})
]
list_display = ['ip', 'name', 'slice', 'flavor', 'image', 'key', 'node', 'deploymentNetwork']
diff --git a/plstackapi/core/models/slice.py b/plstackapi/core/models/slice.py
index 5a5f165..16a2c27 100644
--- a/plstackapi/core/models/slice.py
+++ b/plstackapi/core/models/slice.py
@@ -21,6 +21,10 @@
network_id = models.CharField(max_length=256, help_text="Quantum network")
router_id = models.CharField(max_length=256, help_text="Quantum router id")
+ SVC_CLASS_CHOICES = (('besteffort', 'Best Effort'), ('silver', 'Silver'), ('gold','Gold'))
+ serviceClass = models.CharField(verbose_name="Service Class",default="besteffort",help_text="The Service Class of this slice", max_length=30, choices=SVC_CLASS_CHOICES)
+
+
def __unicode__(self): return u'%s' % (self.name)
def save(self, *args, **kwds):
diff --git a/plstackapi/core/models/sliver.py b/plstackapi/core/models/sliver.py
index 13f94b2..529c131 100644
--- a/plstackapi/core/models/sliver.py
+++ b/plstackapi/core/models/sliver.py
@@ -21,6 +21,8 @@
slice = models.ForeignKey(Slice, related_name='slivers')
node = models.ForeignKey(Node, related_name='slivers')
deploymentNetwork = models.ForeignKey(DeploymentNetwork, verbose_name='deployment', related_name='sliver_deploymentNetwork')
+ numberCores = models.IntegerField(verbose_name="Number of Cores", help_text="Number of cores for sliver", default=2)
+
def __unicode__(self): return u'%s::%s' % (self.slice, self.deploymentNetwork)