add default_isolation field to slice
diff --git a/xos/core/admin.py b/xos/core/admin.py
index 4c25939..26c6dba 100644
--- a/xos/core/admin.py
+++ b/xos/core/admin.py
@@ -1051,7 +1051,7 @@
class SliceAdmin(XOSBaseAdmin):
form = SliceForm
- fieldList = ['backend_status_text', 'site', 'name', 'serviceClass', 'enabled','description', 'service', 'slice_url', 'max_instances']
+ fieldList = ['backend_status_text', 'site', 'name', 'serviceClass', 'enabled','description', 'service', 'slice_url', 'max_instances', "default_isolation"]
fieldsets = [('Slice Details', {'fields': fieldList, 'classes':['suit-tab suit-tab-general']}),]
readonly_fields = ('backend_status_text', )
list_display = ('backend_status_icon', 'name', 'site','serviceClass', 'slice_url', 'max_instances')
diff --git a/xos/core/models/slice.py b/xos/core/models/slice.py
index 18d3cb6..df36b26 100644
--- a/xos/core/models/slice.py
+++ b/xos/core/models/slice.py
@@ -19,6 +19,8 @@
# Create your models here.
class Slice(PlCoreBase):
+ ISOLATION_CHOICES = (('vm', 'Virtual Machine'), ('container', 'Container'), ('container_vm', 'Container In VM'))
+
name = StrippedCharField(unique=True, help_text="The Name of the Slice", max_length=80)
enabled = models.BooleanField(default=True, help_text="Status for this Slice")
omf_friendly = models.BooleanField(default=False)
@@ -37,6 +39,8 @@
default_image = models.ForeignKey(Image, related_name = "slices", null=True, blank=True);
mount_data_sets = StrippedCharField(default="GenBank",null=True, blank=True, max_length=256)
+ default_isolation = models.CharField(null=False, blank=False, max_length=30, choices=ISOLATION_CHOICES, default="vm")
+
def __unicode__(self): return u'%s' % (self.name)
@property